Re: Dsik usage error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/1/13 david walcroft <d_j_w46@xxxxxxxxxxxxxx>:
> On 01/14/2010 09:20 AM, Sam Sharpe wrote:
>> 2010/1/13 William John Murray<bill.murray@xxxxxxxxxx>:
>>>
>>>   Hello all,
>>>          Can anyone help me with a disk usage problem? I have a disk
>>> partition of 65GB in LVM; df says:
>>>
>>> /dev/dm-0             65570580  60494828   1744888  98% /
>>>
>>> However, if I use either du or Baobab they reckon the directories in it
>>> add up to 30Gb or so. As it is my root directory, and there are various
>>> others it is a little difficult to get the total, so I booted under
>>> liveUSB and saw exactly the same - 30Gb used.
>>>    So something is stealing half my disk. If I try to write more it is
>>> out of space.
>>>    Any ideas how I get my space back? fsck reports the disk is clean.
>>
>> I often find that it's files which are deleted, that are still held
>> open. e.g. rotated logs where the owning process has not been
>> reloaded.
>>
>> Try:
>>
>> lsof | grep deleted
>>
>> That should show up and deleted files still open.
>>
>> --
>> Sam
>
> Can you delete these files and If so,how

They disappear when the process holding them open dies. Often that's
as simple as "service httpd restart", but sometimes requires some
manual killing of whatever PID lsof tells you is holding them. Here's
a manufactured example for training purposes ;o)

[sam@samlap ~]$ sudo tail -f /var/log/messages > /tmp/list &
[4] 19925

[sam@samlap ~]$ sudo lsof | grep list
sudo      19925      root    1w      REG               0,18         0
  3287739 /tmp/list

... so we are writing to /tmp/list - lets delete it from underneath
the process ...

[sam@samlap ~]$ sudo rm /tmp/list

... what does lsof show now?

[sam@samlap ~]$ sudo lsof | grep list
sudo      19925      root    1w      REG               0,18         0
  3287739 /tmp/list (deleted)

... lets kill the process holding the file ...

[sam@samlap ~]$ sudo kill -9 19925
[4]+  Killed                  sudo tail -f /var/log/messages > /tmp/list

... now lsof doesn't have a (deleted) file ...

[sam@samlap ~]$ sudo lsof | grep list
[sam@samlap ~]$

--
Sam
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe: https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux