Timeline for Interpreting results of du -sh on different file systems
Current License: CC BY-SA 4.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 14 at 6:39 | comment | added | Gyro Gearloose | @DavidG.Bingo, this "reduces" the displayed size from 5.6G to 717M. But, still, I lack understanding and I fear that the difference is somehow used up and not available. | |
| Aug 13 at 21:17 | comment | added | David G. |
What happens if you add the "--apparent-size" option to the du command lines? That will cause it to report the bytes in the files instead of the blocks taken up.
|
|
| Aug 13 at 20:24 | comment | added | Gyro Gearloose | @StéphaneChazelas I don't think so. I copied the directory in question on exfat to exfat, with du giving the same size of 5.6G. Maybe I missed something in your link, but one of my first thoughts was about fragmentation and counting unused space. If so, it would be different sizes before and after copy. | |
| Aug 13 at 20:16 | comment | added | Stéphane Chazelas | Possible duplicate of Why are there so many different ways to measure disk usage? | |
| Aug 13 at 19:59 | comment | added | ilkkachu | file system block size is not the same as the block device block size (e.g. ext4 usually / almost always uses 4096, even if the underlying media has a block size of 512) | |
| Aug 13 at 19:47 | comment | added | Gyro Gearloose |
@doneal24 I've checked sudo blockdev --getpbsz /dev/sda1on where root "/" is mounted as well as on both USB devices: 512. Must be a different cause.
|
|
| Aug 13 at 19:41 | comment | added | doneal24 |
Substituting the actual devices for /dev/sda1 for the two devices in question, use blockdev --getpbsz /dev/sda1.
|
|
| Aug 13 at 19:38 | comment | added | Gyro Gearloose | @doneal24 looks quite possible. Do you happen to have command ready to check this? | |
| Aug 13 at 19:28 | comment | added | doneal24 | Curious about the block size. The difference in the total size is around a factor of 8, so if vfat has a 512b block size and exfat has 4096b and the files are small, that may account for the difference in allocations. | |
| Aug 13 at 19:17 | comment | added | Gyro Gearloose |
@doneal24 Yes, that was my first thought. I did diff -r with no differences. I even did { stat -c '%s' */*.jpg | tr '\n' '+';echo 0; } | bc on both directories, resulting on 762M, both times.
|
|
| Aug 13 at 19:10 | comment | added | doneal24 |
Can you do a checksum on a file on both filesystems to confirm that they match? And you can tar up all the files for your backup without worrying about the underlying filesystem. And unlikely to be the cause, but what are the block sizes for each device. Use blockdev --getpbsz /dev/sd? to find out.
|
|
| Aug 13 at 19:06 | comment | added | Gyro Gearloose | @muru No, just plain files. | |
| Aug 13 at 19:04 | comment | added | muru | You have a lot of hard links? | |
| Aug 13 at 19:02 | history | asked | Gyro Gearloose | CC BY-SA 4.0 |