LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   df wrongly says mounted device is full (https://www.linuxquestions.org/questions/linux-general-1/df-wrongly-says-mounted-device-is-full-615452/)

Myrmornis 01-22-2008 06:02 AM

df wrongly says mounted device is full
 
I am using a 75G external hard drive (an apple ipod) and I am confident that only 41G has been used up on it. That is also what du tells me:
Code:

~> du --max-depth=0 /mnt/ipod/
42319056        /mnt/ipod/

However, df reports that it is almost full:
Code:

~> df /mnt/ipod/
Filesystem          1K-blocks      Used Available Use% Mounted on
/dev/sdb2            77973488  77797872    175616 100% /mnt/ipod

And indeed I am told that I'm out of space when I try to copy large files.

Why does the output of du disagree with that of df, and how do I correct the situation so that I can use the remaining 34G that df says is unavailable?

Thanks a lot,

Dan

p.s. I have previously seen this sort of thing being caused by files stored below the mountpoint, that are "hidden" by the mounted device. However, when I unmount the device, there is nothing stored at /mnt/ipod
Code:

~> umount /mnt/ipod
~> du /mnt/ipod/
4      /mnt/ipod/

p.p.s. I posted the same question on linuxquestions.org; if that is bad form, could someone tell me so, and sorry.

deepumnit 01-22-2008 06:14 AM

Did you see if there are any hidden files? Use 'df' with the '-h' option for human readable formats. Did you check for .Trash directory on /mnt/ipod/?

Myrmornis 01-22-2008 07:34 AM

Thanks deepumnit,

du with the -h flag confirms that only 41G are used:

Code:

~> du -h --max-depth=0 /mnt/ipod/
41G    /mnt/ipod/

which seems competely inconsistent with df -h:

Code:

~> df -h /mnt/ipod/
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb2              75G  75G  14M 100% /mnt/ipod

There are no large hidden files, and in any case, I think du includes hidden files in its reported disk usage.

I'm a bit stuck here and would really appreciate further suggestions as to how to make my OS understand that there is room on the device. (Fedora core 5 incidentally).

Here's the relevant lines of /etc/mtab and /etc/fstab:

Code:

~> cat /etc/mtab | grep ipod
/dev/sdb2 /mnt/ipod vfat rw,noexec,nosuid,nodev,user=dan 0 0

~> cat /etc/fstab | grep ipod
/dev/sdb2              /mnt/ipod              vfat    rw,noauto,user  1 2

Cheers,

Dan


All times are GMT -5. The time now is 11:47 AM.