E2compr 0.4 User Manual – Block size

Wayback MachineAbout this captureCOLLECTED BY Organization: Alexa Crawls Starting in 1996, Alexa Internet has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to the Wayback Machine after an embargo period. Collection: Alexa Crawls DE Crawl data donated by Alexa Internet. This data is currently not publicly accessible TIMESTAMPSloadingGo to the first, previous, next, last section, table of contents.

In the ext2 filesystem (at least until fragments are implemented),disk space is allocated to a file in units called blocks.

When you create a filesystem (using mkfs or mke2fs), youhave the option of specifying the block size that all files on thatfilesystem will use, which will be either 1024, 2048, or 4096 bytes.(If you don’t specify then the blocksize will be 1024 bytes.)

There is very little reason to use a blocksize other than 1024 bytes, bythe way.

(I try to use the term `filesystem blocks’, because some people mightotherwise think that I meant a different unit of storage when I write`block’. This document always intends `filesystem block’ when it usesthe noun `block’.)

In e2compr, cluster sizes are specified in terms of number offilesystem blocks rather than number of kilobytes. If you say`chattr -b 4 file’, and file is on a filesystem with4096-byte blocks, then file will use clusters of 16KB (i.e. 4 * 4096bytes). When you do `lsattr file’, it will display `4’for the cluster size, which means 4 filesystem blocks (consistent withchattr), which means 16KB on a filesystem with 4096-byte blocks.

Fortunately, most people’s filesystems have just 1024-byte blocks, inwhich case it doesn’t matter whether they think in terms of kilobytes orfilesystem blocks.

Go to the first, previous, next, last section, table of contents.

Leave a Reply

Your email address will not be published. Required fields are marked *