/home/user # cd /home
/home # df -h .
Filesystem Size Used Available Use% Mounted on
/dev/mmcblk0p2 2.0G 1.4G 488.7M 74% /home
/home #
but if I check how much is used:
/home # du -xhs .
183.7M .
Is there something I'm missing ? There is a discrepancy of roughly 1.2Gb!
du adds up all the file sizes. It does not count the unused space in the last cluster of a file. If you have a lot of small files, this wasted space adds up. The VFAT Mydocs is even worse for small files.
du adds up all the file sizes. It does not count the unused space in the last cluster of a file. If you have a lot of small files, this wasted space adds up. The VFAT Mydocs is even worse for small files.
AFAIK it's actually the other way around: du shows how much of the disk is used, not how much a file size is. Thus the use of du is correct in trying to figure out how much disk space a directory occupies.
AFAIK it's actually the other way around: du shows how much of the disk is used, not how much a file size is. Thus the use of du is correct in trying to figure out how much disk space a directory occupies.
Then why does du take longer to run, and why is df almost instantaneous? I was not making things up with my answer.
Then why does du take longer to run, and why is df almost instantaneous? I was not making things up with my answer.
du takes longer to run as it needs to look at every single file to get the details, whereas df only needs to look at the filesystem metadata (see "tune2fs -l" for example). du should report the actual space used (unless run with the --apparent-size flag), taking into account the filesystem block size.
/home/user # cd /home
/home # df -h .
Filesystem Size Used Available Use% Mounted on
/dev/mmcblk0p2 2.0G 1.4G 488.7M 74% /home
/home #
but if I check how much is used:
/home # du -xhs .
183.7M .
Is there something I'm missing ? There is a discrepancy of roughly 1.2Gb!
This looks like you've got some filesystem corruption. I'd suggest running (as root) "fsck -n -f /dev/mmcblk0p2" and seeing whether there's any errors reported. Fixing it could be very tricky though as the /home partition can't be unmounted.
Download the firmware (RX-51_2009SE_2.2009.51-1_PR_COMBINED_MR0_ARM.bin) and the eMMC VANILLA one (note that you have to install the old version - RX-51_2009SE_1.2009.41-1.VANILLA_PR_EMMC_MR0_ARM.bin).
Install the eMMC first and then the last combined firmware later.
Enjoy!
Pd: Don't forget to backup previusly... this will leave your N900 like out of the box