Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone discuss the exact difference between block size and byte size, when it comes to disk sizes for Linux/Unix filesystems.

share|improve this question

The byte size is equivalent to the physical size of the disk. e.g. a 1TB disk has a byte size of 1,099,511,627,776 bytes.

The block size is disk dependent. A 1TB hard drive could potentially have a block size of 512 bytes or 4096 bytes (or something entirely different).

The block size simply refers to the amount of storage 1 block will consume on a hard drive.

For example, consider the following text:

Hello world!

That is 13 bytes of data (12 bytes + 1 null char for EOF). On an HD with a block size of 512, this text file may only be 13 bytes big, but it will consume 512 bytes of space on the hard drive because the drive writes 512 bytes per block (which data is written in blocks not bytes).

Block/byte size is hard drive/filesystem specific, not OS (Windows/Linux/OSX). So a filesystem (like NTFS/ext4) could support higher block sizes, but the OS may not support that type of filesystem (No ext4 support on Windows for example).

That's kind of the 'in-a-nutshell' description, hope that helps.

share|improve this answer
Just a little added info. An inode = one block. This can cause your drive to appear to only have 50% of the space used, but all the blocks are utilized causing operations to fail. – Lipongo Nov 24 '12 at 22:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .