LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-22-2008, 06:02 AM   #1
Myrmornis
LQ Newbie
 
Registered: Jun 2007
Distribution: Ubuntu
Posts: 3

Rep: Reputation: 0
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.
 
Old 01-22-2008, 06:14 AM   #2
deepumnit
Member
 
Registered: Dec 2006
Location: NOIDA, India
Distribution: Debian, SUSE, Fedora
Posts: 334
Blog Entries: 1

Rep: Reputation: 31
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/?
 
Old 01-22-2008, 07:34 AM   #3
Myrmornis
LQ Newbie
 
Registered: Jun 2007
Distribution: Ubuntu
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
testing if device is already mounted kushalkoolwal Programming 7 09-30-2005 11:40 AM
swap device not getting mounted jacobselvin Linux - Newbie 9 07-20-2005 09:48 AM
Access on mounted device!? mindspin Fedora 1 12-18-2004 06:47 AM
Mounted Device names Rodzilla Linux - Newbie 7 09-25-2003 10:39 AM
software raid - add device wrongly marked faulty back into array? snoozy Linux - General 2 06-27-2003 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration