Why does my freshly-formatted disk have 450 MB of data on it?
The answer is probably obvious, but I'm sure enquiring minds want to know: if I erase a disk and reformat it, what's already taking up almost half a gigabyte of space? In this case, it's formatted HFS+ journaled on Mac OS X.
You don't say what make and model disk, how you arrived at it's expected capacity or how you measured actual available capacity - so it could be some or all (or none) of the following:
-
Disk vendors state sizes in powers of 1000, Operating systems report sizes in powers of 1024(recent OSX doesn't) -
Filesystems reserve space for Filesystem structures like inode tables. Journalled filesystems reserve space for Journals.
-
Some disks have special partitions on them, e.g. for recovery(apparently OSX doesn't) -
low-level formatting involves writing data to the disk to mark out sectors, this uses some of the notional capacity of the disk.(or maybe not) -
Disks can contain bad sectors that the drive electronics mark as such.(perhaps not an issue)
450 MB is a lot to explain away on a 1 GB disk, but not so problematic on a 2 TB disk.
There's a discussion on macworld that says
man newfs_hfs
-J [journal-size] Creates a journaled HFS+ volume. The default journal size is 8MB. Appending an 'M' to the journal size implies megabytes (i.e. 64M is 64 megabytes). The maximum journal size is 512 megabytes.
and
HFS Plus uses a number of interrelated structures to manage the organization of data on the volume. These structures include:
the volume header
the catalog file
the extents overflow file
the attributes file
the allocation file (bitmap)
the startup file
Apple have published some details of HFS+ I'm pretty sure that if you start to read this, before you reach the end you'll stop worrying about that "missing" 450 MB.
I liked the bit where it discussed a "Metadata Zone" which is only used for metadata (obviously) and "hot files". Obviously less space for all your boring files. Presumably OSX tools that report "free disk space" include free space in the Metadata Zone in the total reported free space?
You can use diskutil
to check the size of the Journal. On a 60 GB partition I just erased, it was about 8 MB:
MacPro:~ mdouma46$ diskutil info disk4s6
Device Identifier: disk4s6
Device Node: /dev/disk4s6
Part Of Whole: disk4
File System: Journaled HFS+
Type: hfs
Name: Mac OS Extended (Journaled)
Journal: Journal size 8192 KB at offset 0x1c2000
Owners: Enabled
Total Size: 60.0 GB (60000002048 Bytes) (exactly 117187504 512-Byte-Blocks)
Volume Free Space: 59.8 GB (59843522560 Bytes) (exactly 116881880 512-Byte-Blocks)
Using DiskWarrior (a fantastic app, btw), after clicking to Rebuild that volume and looking in Console.app, I could see it report the following:
DiskWarrior App: disk4s6 Extents, Catalog and Attributes tree sizes total 139 MB.
So it appears that the "missing space" consists primarily of the disk directory itself (these are the "files" shown in the image above in RedGrittyBrick's post).