Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
How did you determine the initial capacity, and from what do you conclude there is 450 MB of data on it? –  houbysoft Dec 15 '10 at 0:36
1  
@houbysoft Disk Utility tells you in the status bar at the bottom, and it's right after formatting. –  Daniel Beck Dec 15 '10 at 2:36

2 Answers 2

up vote 10 down vote accepted

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.

HFS+MetaData

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?

share|improve this answer
    
Mac OS X reports sizes in powers of 1000. A newly formatted HFS+ disk would not have a recovery partition. Not sure what your last point means. It's most likely to do with your second point although it would be great to include details specific to the HFS+ filesystem. –  fideli Dec 15 '10 at 0:01
    
I've also noticed it on new disks, and even on the virtual disks that are provided by my Drobo. Kill options 1, 3, 4, and 5 and I think you're good. –  Daniel Beck Dec 15 '10 at 2:38
    
@fideli: OS X v10.6 reports sizes in powers of 1000; earlier versions used powers of 1024 (meaning your disk appears to get bigger when you upgrade to 10.6!) –  Gordon Davisson Dec 15 '10 at 3:30
    
Assuming you lot know what you are talking about, I have updated my answer accordingly. I feel like a man who brought five crates of beer to a party and had four of them dumped in the trash can - oh well. –  RedGrittyBrick Dec 15 '10 at 9:32

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.