[3875] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: Cluster size?

daemon@ATHENA.MIT.EDU (Hal L. DeVore Jr.)
Mon Nov 11 12:41:01 1996

To: redhat-list@redhat.com
In-Reply-To: Your message of "Mon, 11 Nov 1996 02:03:03 GMT."
             <199611111003.CAA22972@rho.ben2.ucla.edu> 
Reply-To: hdevore@crow.bmc.com
Date: Mon, 11 Nov 1996 11:24:13 -0600
From: "Hal L. DeVore Jr." <hdevore@crow.bmc.com>
Resent-From: redhat-list@redhat.com

kirill@ucla.edu said:
> I don't know if something similar is true for the Linux partitions,  
> but I suspect so. Does anyone know the answer?

Yes.  The problem theoretically exists in the Linux ext2 filesystem but 
won't be a real problem until disks get a bit bigger.

The close cousin to DOS' cluster number (explained below) in Linux and UNIX 
is the inode number.  The inode number is stored in a signed(?) 32-bit 
integer.  YOU control the bytes-per-inode ratio when you make the filesystem 
(see man mke2fs).  At 1,024 bytes/inode you are "limited" to a single 
filesystem (i.e., partition) size of about 2 terabytes (terabyte = 
1024*gigabyte).  I don't know the legal values of bytes/inode for mke2fs but 
other UNIX file systems allow values of 1K, 2K, 4K and 8K.

And since Linux and UNIX "join" filesystems into a single unified directory 
tree the size limit on a single filesystem is not near as important as it is 
in DOS (IMNSHO).


DOS details for anyone who cares:

The DOS cluster size "problem" is a side-effect of the File Allocation Table 
(FAT) design in which every "hunk" of disk space is "addressed" by an index 
value.  That index value is called the cluster number.  The cluster is the 
smallest "addressable" unit of disk space in a DOS FAT filesystem (I'm 
ignorant of VFAT filesystem structure at the present time) and every single 
addressable unit of disk space is represented by an entry in the FAT which 
is stored, twice, on the disk.

In the Very Old Days (DOS V2 and earlier) the cluster number was stored (for 
example in the directory) in an unsigned 12-bit field.  Now it's stored in 
an unsigned 16-bit field.  An unsigned 16-bit field gives cluster number 
that can range between 0 and 65,535 but there are a handful of reserved 
values so you can really only have 65,527 clusters.

From there it's just arithmetic to figure out how many 512-byte sectors get 
clustered together in DOS FAT file systems.  There is no user control of 
this factor, DOS FORMAT picks it based on the size of the partition being 
formatted.



Hal DeVore (hdevore@bmc.com)



--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post