A file's "space on disk" doesnt match the file's size

0

I just got a new larger external hard drive and transferred all the files from my old drive to the new one.

When I was checking the used space to make sure everything transferred, I found that the new drive was about 70gb larger than the old one, despite being entirely empty previous to backing up the old drive onto it.

Upon further investigation I found that while every file said it was the same size, the "__ space on disk" did not match the files byte size. Here's an example

properties

Tech specs:

Old Drive: seagate 1 TB HFS+ format 8,03.7 GB used
New Drive: seagate 4 TB exfat format 8,71.0 GB used

I formatted the new one with exfat so it would work with both mac and pc. Is the extra used space caused by the difference in format?

zander

Posted 2018-11-07T06:19:34.030

Reputation: 101

The actual (data) size of files very rarely matches the on disk size of files, because of sector block sizes that leave unused space at the end of files. Or sparse files, or some compressed filesystems, etc. What does the same folder's properties look like on the old drive? – Xen2050 – 2018-11-07T06:55:14.320

Why is there such a big difference between “Size” and “Size on disk”?. The question and answers there are mostly Windows-centric, still you can get a good general insight from them. – Kamil Maciorowski – 2018-11-07T08:25:24.060

@Xen2050 the old drive has some differences too but typically much smaller like a couple MB max where as the new drive has differences about a GB or more – zander – 2018-11-07T08:59:22.613

What's the block/sector size of both drives? Filesystem types? – Xen2050 – 2018-11-07T09:01:06.497

how do i find the block/sector size of my drives? – zander – 2018-11-07T09:02:07.437

I also noticed this and as the previous comment mentioned the block size or also know as the the allocation unit size choosen when formatting a hard drive affects the space a file takes up on that hard drive. – Alz Belz – 2018-11-07T08:11:21.570

Answers

1

This is likely due to a difference in sector/block size on the disk... Which is probably due to the change in disk format from HFS+ to ExFAT.

Drives can only store a single file in a sector, with larger files spanning many sectors. Files that are smaller than a sector still occupy that sector, which means they use more space on the disk than their actual file size.

Stese

Posted 2018-11-07T06:19:34.030

Reputation: 1 037

is there a way to change the sector/block size or is there any way to have the drive reorganize itself so that it uses the space more efficiently? The wasted space is even larger than i thought initially, clocking in at a whopping 130GB of wasted space – zander – 2018-11-07T09:42:00.637

to a degree, yes, some formats allow the changing the default sector size, depending on the OS etc. Don't forget that you'll also be seeing difference from 'reported' sizes between 'bits' and 'bytes'. See this document for a full write up on the issue. https://www.lifewire.com/drive-storage-capacities-833435

– Stese – 2018-11-07T09:50:31.790