The NEXTSTEP/OpenStep FAQ

! to the table of contents
< to the previous section:
> to the next section:


7.3 My formatted disk has much less space then advertised!

filesystem, overhead disk space space, disk filesystem, space

Let's assume you bought a disk drive advertised with 400 MB unformatted capacity. Vendors are not consistent with the MB definition. You may have much less space less than you think you have. Which of the following did you buy?

400 * 1000 * 1000 = 400,000,000 bytes 400 * 1024 * 1000 = 409,600,000 bytes 400 * 1024 * 1024 = 419,430,400 bytes

The disk must be formatted. This is often done by the vendor, but occasionally by the user. Formatting maps the disk into sectors. Space is reserved for the disk geometry and bad sectors. Formatting can take 10-20% of the capacity depending on the sector size. Common sector sizes are 512 and 1024. Generally, bigger sectors mean less waste.

Once formatted, the UNIX file system must be created. On the NeXT, this is one of the steps performed by the BuildDisk application. It invokes the mkfs command to make a file system. This reserves space for the UNIX file system (e.g., superblocks, inode tables). This overhead can take another 2-3% of the available disk space.

If you issue the df command, you may be surprised to see another 10 the available disk space has disappeared. The df command shows the total, used, and available disk space. The df units are in kbytes (1024 bytes). The sum of the used and available numbers will generally be about 10 allow the UNIX file system to be efficient in its storage allocation. If your disk fills up, only the superuser can store files in the remaining 10%.

To complete the picture, here's a snapshot of what may occur:

Capacity Lost/Used/Reserved Reason (in bytes) (in bytes) 419,430,000 19,430,000 Marketing hype (~5\%) 400,000,000 60,000,000 Formatting (~15\%) 340,000,000 6,800,000 UNIX file system (~2\%) 333,200,000 33,320,000 Efficiency & superuser (~10\%) 299,880,000

For more information, refer to the df and mkfs man pages.



This document was converted from LaTeX using Karl Ewald's latex2html.