! to the table of contents
< to the previous section:
> to the next section:
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?
(for Quantum drives the following is true: Quantum defines 1MB to be exactly 1000000 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:
For more information, refer to the df and mkfs man pages.