External Harddrive - Files take up more space on External than they do on Harddrive

Discussion in 'Mac Accessories' started by SPNarwhal, Sep 1, 2011.

  1. SPNarwhal macrumors 65816

    SPNarwhal

    Joined:
    Apr 22, 2009
    Location:
    illinois
    #1
    So I'm partitioning my girlfriend's external, and I took her stuff off just to be safe, but for some reason all of her stuff on the external takes up 223.8gb of space, but when I transfer it to my iMac's harddrive it only takes up 219.81gb.

    What gives?
     
  2. blueroom macrumors 603

    blueroom

    Joined:
    Feb 15, 2009
    Location:
    Toronto, Canada
  3. SPNarwhal thread starter macrumors 65816

    SPNarwhal

    Joined:
    Apr 22, 2009
    Location:
    illinois
  4. CylonGlitch macrumors 68030

    CylonGlitch

    Joined:
    Jul 7, 2009
    Location:
    SoCal
    #4
    That's why. FAT32 uses a large block size to accommodate the larger hard drives. But in doing so, uses up more space at the end of every file. If the block size is 32kb then even a 1 byte file will use 32kb and all files are rounded to a 32kb size. Now the file system knows where the real end of the file is, but needs to allocate the full 32kb regardless if 1 byte is used, or all 32kb are used.

    On nfs, ntfs, hpfs, and other file systems, this problem doesn't exist.
     
  5. SPNarwhal thread starter macrumors 65816

    SPNarwhal

    Joined:
    Apr 22, 2009
    Location:
    illinois
    #5
    Ah, alright. That makes a lot of sense.

    Another question.

    When I go into informatiion for the Harddrive it says
    219,697,165,912 bytes) for 42,946 items

    But when I go into information for it's copy (on my iMac) it says
    (219,715,384,432 bytes) for 43,057 items

    So why is there more items/files in the copy than there are in the original? And the one with more files is actually smaller.

    I just want to make sure I got everything before I partition/wipe her drive, just confused as to why there's more files when it was just a copy of the exact same thing. Hopefully there's another logical answer for this. someone?
     
  6. jdechko macrumors 68040

    Joined:
    Jul 1, 2004
    #6
    NTFS defaults to 4k clusters/blocks
    HFS+ defaults to 512 byte clusters/blocks

    But cluster size is still a possible explanation of the problem at hand.

    EDIT: So according to wikipedia, HFS+ uses 512byte blocks, but according to Apple developer documentation, HFS+ uses 4k blocks.

    https://secure.wikimedia.org/wikipedia/en/wiki/HFS_Plus
    https://developer.apple.com/library/mac/#technotes/tn/tn1150.html
     
  7. CylonGlitch macrumors 68030

    CylonGlitch

    Joined:
    Jul 7, 2009
    Location:
    SoCal
    #7
    Yeah, the point is that FAT32 does a lousy job of optimizing space.

    ----------

    I'm guessing what it is counting are the hidden files that the OS makes. Typically the .DS_Store file is one per directory. :( Could be others, but that one rings a bell.
     
  8. Ruahrc macrumors 65816

    Joined:
    Jun 9, 2009
    #8
    Well that is not entirely true. IIRC you can format a FAT32 drive with 4k clusters, it's just that Windows and OS X do not do so by default. I remember back in the day I could format a FAT32 drive using the windows command line tool and you can specify in the format command to use 4k clusters.

    It might be possible to do the same with an HFS+ drive using the terminal- there is probably a verbose command mode that you can use to specify the desired block size.

    Ruahrc
     

Share This Page