
On Thu, 20 Aug 2015 03:14:54 PM David Zuccaro wrote:
On 20/08/15 15:06, Rohan McLeod wrote:
I take it there is no TRIM issue where the USB controller is failing to report ,
deleted file space as free-space to the OS ?
regards Rohan McLeod
It could be a TRIM issue Rohan. I just would have thought that if I delete a directory containing 30GB it would be reflected by the df command or has something changed somewhere along the way?
TRIM has no affect on the output of df. df reports disk space allocated by the filesystem, TRIM is below the filesystem level. Flash devices have their own "filesystem" to present what looks like a regular block device to the OS, TRIM frees space on that "filesystem" which is not seen by the OS. If you have flash hardware that doesn't have such a "filesystem" then you need to use a Linux filesystem like JFFS2 which knows how flash hardware works. rm -rf doesn't use a trash folder unless you have something unusual going on. Deleting files doesn't free space if the files are hard-linked somewhere else. rsync can preserve hard-links if the -H option is used. Also when I'm doing a rsync backup of a new system I usually start with "cp -rl" or "cp -a --reflink=always" of the backup of another system running the same distribution. That initially saves a few gig of disk space and network transfer, if the 2 systems in question are running a stable release of Linux then over the next few years there probably won't be many changes made so the space savings will continue. If you do this then rm -rf of one backup won't free the space that was shared with another backup. The Ext2/3/4 filesystems reserve some space for root. This space isn't reported as free by df but can be used by root not regular users. You probably run backups as root so this space would be used. tune2fs(8) says that 5% of disk space is reserved by default, 5% of 1.4T is 70G so if you delete 30G of files from a 1.4T Ext2/3/4 filesystem that was really full then df wouldn't report any free space. Run tune2fs -m0 /dev/whatever to fix this. While reserved space is good for the case where home directories are on the root filesystem it does no good for a backup filesystem. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/