You are not logged in.

#1 2012-07-12 12:39:25

mirto
Member
From: Barcelona
Registered: 2012-05-17
Posts: 11

removing files doesn't free the space

Dear Arch Community!

I use Arch on my quite old laptop, even though I am not enough advanced user, so please be patient and explicite.
I always try to solve problems searching forums/wiki and spending a lot of time to try to learn, but this time I didn't manage to find any similar problem posted.

Behaviour:
When I delate files/directories (both ways: putting them to trash and then emptying it or 'rm' them form command line) they do disappear from the files tree, but there is no space on the disc freed. It happens most of the time, but not always.

Also I remember that few months ago with some system update suddanly I got about 3G of home directory space back. That time I had no time to investigate.

I have no idea what part of the system may be responsible for such a strange behaviour, what tools to use to detect it.
What information should I provide you?

Thanks in advance,
Mirto

Offline

#2 2012-07-12 12:42:58

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: removing files doesn't free the space

use "ncdu" to see what is eating up your space.


  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#3 2012-07-12 13:11:57

altbdoor
Member
From: KL, Malaysia
Registered: 2012-04-25
Posts: 128

Re: removing files doesn't free the space

hi mirto! welcome to arch linux!

mirto wrote:

When I delate files/directories (both ways: putting them to trash and then emptying it or 'rm' them form command line) they do disappear from the files tree, but there is no space on the disc freed. It happens most of the time, but not always.

1. what is your system setup? what kind of X setup (window/desktop manager) do you have?
2. how do you check for the freed space?

Offline

#4 2012-07-12 21:43:45

mirto
Member
From: Barcelona
Registered: 2012-05-17
Posts: 11

Re: removing files doesn't free the space

yes, sorry for delay.

so:
1.

3.4.4-2-ARCH  i686
DE: LXDE (WM: openbox)
ext4 on home dir.

2.
* df -h :
Filesystem              Size         Used        Avail       Use%        Mounted on
rootfs                    13G          7.8G         3.8G        68%          /
...
/dev/sda4                61G         57G        186M        100%       /home

* ncdu for home:
"Total disk usage: 37.2GiB"

* gparted
sda4 - /home - Size: 60.2G / Used: 57.02G / Unused 3.19 G

* pcmanfm displays: "Free space: 194.7 MB (Total: 64.5 GB)"



Surely I have removed 3G file recently. So I would expect at least that.

Any other info needed?

Thanx
mirto

Offline

#5 2012-07-12 22:21:00

Terminator
Member
From: Belgium
Registered: 2012-05-07
Posts: 265

Re: removing files doesn't free the space

The actual output of ncdu ~ would probably be useful.

Except for cache (which is unlikely to fill so much space) the only thing that I can think of is that the files you deleted are recovered when fsck runs (at boot). If that's the case you hard disc is probably dying so hopefully someone finds a fixable problem when you give more information.

Offline

#6 2012-07-12 23:31:40

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,237
Website

Re: removing files doesn't free the space

Check if the file(s) are still open:
https://bbs.archlinux.org/viewtopic.php … 5#p1127065

Offline

#7 2012-07-13 09:50:21

mirto
Member
From: Barcelona
Registered: 2012-05-17
Posts: 11

Re: removing files doesn't free the space

Hi All,

* ncdu ~
(nothing surprising, IMHO)

----------------/home/lena ------------
   15.3GiB [##########] /Mus                                                                                             
    7.5GiB [####      ] /fil
    7.4GiB [####      ] /Pic
    2.1GiB [#         ] /Books
    1.9GiB [#         ] /Vid
  500.3MiB [          ] /alc
  354.7MiB [          ] /stu
  328.0MiB [          ] /.scribus
  304.5MiB [          ] /.config
  261.9MiB [          ] /dwhelper
  207.0MiB [          ] /Art
   91.6MiB [          ] /A6
   77.8MiB [          ] /.mozilla
   69.9MiB [          ] /.thunderbird
   51.0MiB [          ] /.gimp-2.6
   50.8MiB [          ] /Downloads
   48.3MiB [          ] /.gimp-2.8
   46.8MiB [          ] /.wifi
   43.4MiB [          ] /Mko
   28.2MiB [          ] /Doc
   26.0MiB [          ] /.thumbnails
   25.2MiB [          ] /.widelands
   17.5MiB [          ] /.claws-mail
   14.1MiB [          ] /.cache
   13.9MiB [          ] /friki
    9.0MiB [          ] /.local
    8.0MiB [          ] /.fra
    6.4MiB [          ] /.dictionaries
    5.7MiB [          ]  P.mp3
    5.5MiB [          ] /.adobe
    5.4MiB [          ] /Ra
    3.5MiB [          ] /ba
    1.9MiB [          ] /.gnome2 
    1.2MiB [          ] /.java
    1.0MiB [          ]  programme-guide-2012_en.pdf
  964.0KiB [          ] /.gstreamer-0.10
  912.0KiB [          ] /.quodlibet
  844.0KiB [          ] /.fontconfig
  748.0KiB [          ] /.purple
  624.0KiB [          ] /.gconf
  576.0KiB [          ] /anaphraseus
H 552.0KiB [          ]  Parent Bulletin November 14 2011.pdf
  476.0KiB [          ] /.e16
  448.0KiB [          ] /.xchat2
  332.0KiB [          ] /.omegat
  304.0KiB [          ] /.freeciv
H 216.0KiB [          ]  .recently-used.xbel.GX7K1U
  188.0KiB [          ] /.dvdcss
  184.0KiB [          ]  es.pdf
  168.0KiB [          ] /.kde4
  120.0KiB [          ]  application_form.pdf
   84.0KiB [          ]  euaggelion
   76.0KiB [          ]  I move - part 1.abw
   72.0KiB [          ]  application_form.doc
   68.0KiB [          ] /.nautilus
   64.0KiB [          ] /.xine
   64.0KiB [          ] /.themes
   52.0KiB [          ] /.python-eggs
   48.0KiB [          ] /.fluxbox
   44.0KiB [          ]  I move 2.abw
H  40.0KiB [          ]  .recently-used
   40.0KiB [          ] /.pulse
   40.0KiB [          ] /.gnupg.bck
   36.0KiB [          ]  FR.doc
   36.0KiB [          ] /.macromedia
   32.0KiB [          ]  ad.doc
   32.0KiB [          ] /.gnupg      
   28.0KiB [          ] /.designer
   28.0KiB [          ] /.ssh
   28.0KiB [          ] /.zenmap
   20.0KiB [          ] /.AbiSuite
   20.0KiB [          ] /.emacs.d
   20.0KiB [          ] /.mc
   16.0KiB [          ]  notes.odt
   16.0KiB [          ] /.gegl-0.0
   16.0KiB [          ] /.lftp
   12.0KiB [          ]  not.odt
   12.0KiB [          ]  belg
   12.0KiB [          ] /.irssi
H  12.0KiB [          ]  .xsession-errors.old
   12.0KiB [          ]  I move.odt
   12.0KiB [          ] /.dbus
   12.0KiB [          ] /.icons
   12.0KiB [          ] /.wireshark
H   8.0KiB [          ]  .bash_history
H   8.0KiB [          ]  .freeciv-client-rc-2.2
    8.0KiB [          ] /.gconfd
    8.0KiB [          ]  .viminfo
    8.0KiB [          ] /.Esperantilo
    8.0KiB [          ] /.links
H   8.0KiB [          ]  .ICEauthority
    8.0KiB [          ] /.vim
    8.0KiB [          ] /.gphoto
    8.0KiB [          ] /.mplayer
    4.0KiB [          ] /.wicd
e   4.0KiB [          ] /Desktop
e   4.0KiB [          ] /.wapi
e   4.0KiB [          ] /.gnome2_private
H   4.0KiB [          ]  .xsession-errors
    4.0KiB [          ]  ixquick.xml
H   4.0KiB [          ]  .lesshst
H   4.0KiB [          ]  .civserver_history
H   4.0KiB [          ]  convert_wavs.sh
H   4.0KiB [          ]  .pulse-cookie
H   4.0KiB [          ]  .xinitrc
    4.0KiB [          ]  .gtk-bookmarks
H   4.0KiB [          ]  .mysql_history
H   4.0KiB [          ]  hostapd.sh~
H   4.0KiB [          ]  hostapd.sh
H   4.0KiB [          ]  .bashrc
H   4.0KiB [          ]  .xsession
H   4.0KiB [          ]  .dmrc
    4.0KiB [          ]  .Xauthority
H   4.0KiB [          ]  .esd_auth
H   4.0KiB [          ]  .bash_profile
    0.0  B [          ]  lista FR
    0.0  B [          ]  fb4.odt
e   0.0  B [          ] /.gvfs
H   0.0  B [          ]  .gksu.lock  

* lsof

[root@mirto lena]# lsof -n | grep deleted
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/lena/.gvfs
      Output information may be incomplete.
lxtermina  817       lena   14u      REG        8,3         8        327 /tmp/vteINN7GW (deleted)
lxtermina  817       lena   15u      REG        8,3         0        340 /tmp/vte14A7GW (deleted)
lxtermina  817       lena   16u      REG        8,3         0        651 /tmp/vteK7A7GW (deleted)
lxtermina  817       lena   17u      REG        8,3     10803        753 /tmp/vteGSWCHW (deleted)
lxtermina  817       lena   18u      REG        8,3      1120        766 /tmp/vte62WCHW (deleted)
lxtermina  817       lena   19u      REG        8,3      1027        813 /tmp/vteZ6TYGW (deleted)
lxtermina  817       lena   20u      REG        8,3       128        842 /tmp/vteZDUYGW (deleted)
lxtermina  817       lena   21u      REG        8,3       896       1412 /tmp/vteW9UYGW (deleted)
lxtermina  817       lena   24u      REG        8,3       378       1785 /tmp/vte4UL7GW (deleted)
lxtermina  817       lena   25u      REG        8,3        24       1832 /tmp/vte31L7GW (deleted)
gmain      817  821  lena   14u      REG        8,3         8        327 /tmp/vteINN7GW (deleted)
gmain      817  821  lena   15u      REG        8,3         0        340 /tmp/vte14A7GW (deleted)
gmain      817  821  lena   16u      REG        8,3         0        651 /tmp/vteK7A7GW (deleted)
gmain      817  821  lena   17u      REG        8,3     10803        753 /tmp/vteGSWCHW (deleted)
gmain      817  821  lena   18u      REG        8,3      1120        766 /tmp/vte62WCHW (deleted)
gmain      817  821  lena   19u      REG        8,3      1027        813 /tmp/vteZ6TYGW (deleted)
gmain      817  821  lena   20u      REG        8,3       128        842 /tmp/vteZDUYGW (deleted)
gmain      817  821  lena   21u      REG        8,3       896       1412 /tmp/vteW9UYGW (deleted)
gmain      817  821  lena   24u      REG        8,3       378       1785 /tmp/vte4UL7GW (deleted)
gmain      817  821  lena   25u      REG        8,3        24       1832 /tmp/vte31L7GW (deleted)
midori     918       lena   19r      REG        8,4     99560      24617 /home/lena/.local/share/gvfs-metadata/home (deleted)
midori     918       lena   20r      REG        8,4     32768      32869 /home/lena/.local/share/gvfs-metadata/home-a2e41f12.log (deleted)
gdbus      918  919  lena   19r      REG        8,4     99560      24617 /home/lena/.local/share/gvfs-metadata/home (deleted)
gdbus      918  919  lena   20r      REG        8,4     32768      32869 /home/lena/.local/share/gvfs-metadata/home-a2e41f12.log (deleted)
midori     918  920  lena   19r      REG        8,4     99560      24617 /home/lena/.local/share/gvfs-metadata/home (deleted)
midori     918  920  lena   20r      REG        8,4     32768      32869 /home/lena/.local/share/gvfs-metadata/home-a2e41f12.log (deleted)
dconf      918  922  lena   19r      REG        8,4     99560      24617 /home/lena/.local/share/gvfs-metadata/home (deleted)
dconf      918  922  lena   20r      REG        8,4     32768      32869 /home/lena/.local/share/gvfs-metadata/home-a2e41f12.log (deleted)
midori     918  923  lena   19r      REG        8,4     99560      24617 /home/lena/.local/share/gvfs-metadata/home (deleted)
midori     918  923  lena   20r      REG        8,4     32768      32869 /home/lena/.local/share/gvfs-metadata/home-a2e41f12.log (deleted)
midori     918  932  lena   19r      REG        8,4     99560      24617 /home/lena/.local/share/gvfs-metadata/home (deleted)
midori     918  932  lena   20r      REG        8,4     32768      32869 /home/lena/.local/share/gvfs-metadata/home-a2e41f12.log (deleted)

Offline

#8 2012-07-13 11:29:37

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: removing files doesn't free the space

whats the output of

df -i /home

https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#9 2012-07-13 11:53:02

mirto
Member
From: Barcelona
Registered: 2012-05-17
Posts: 11

Re: removing files doesn't free the space

yeah, I have checked that before... it is not the issue.

[lena@mirto ~]$ df -i /home
Filesystem      Inodes IUsed   IFree IUse% Mounted on
/dev/sda4      3948544 70014 3878530    2% /home 

Offline

#10 2012-07-13 12:58:58

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,464

Re: removing files doesn't free the space

edit-
duplicated fukawi2 question, sorry.

Last edited by kokoko3k (2012-07-13 13:00:44)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#11 2012-07-13 13:33:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,480
Website

Re: removing files doesn't free the space

How about ncdu output of /home

Your home directory should not be taking up that much space, but we have no information about anything else in the /home/ directory


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#12 2012-07-13 13:44:36

mirto
Member
From: Barcelona
Registered: 2012-05-17
Posts: 11

Re: removing files doesn't free the space

ncdu /home


--- /home ----------------------------------------------------------------------
   36.8GiB [##########] /lena                                                   
.   6.3MiB [          ] /backups
.   6.3MiB [          ] /je
!  16.0KiB [          ] /lost+found
!   4.0KiB [          ] /ka
!   4.0KiB [          ] /.Trash-0 
Total disk usage: 36.8GiB Apparent size: 37.0GiB Items: 20865

Offline

#13 2012-07-13 13:47:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,480
Website

Re: removing files doesn't free the space

Thanks, that clears that up - unfortunately it doesn't lead anywhere useful.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#14 2012-07-13 14:09:33

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,464

Re: removing files doesn't free the space

Oh, wait, maybe the deleted files are opened by root?
what about sudo lsof -n | grep deleted ?

-edit-
Again, sorry, you already did it.

Last edited by kokoko3k (2012-07-13 14:10:39)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#15 2012-07-13 14:18:09

mirto
Member
From: Barcelona
Registered: 2012-05-17
Posts: 11

Re: removing files doesn't free the space

Trilby wrote:

unfortunately it doesn't lead anywhere useful.

no, it doesn't.

Can anyone with some understanding of the situation explain me what can be occuring?
Or is it just a regular black hole?


Terminator wrote:

the only thing that I can think of is that the files you deleted are recovered when fsck runs (at boot)

What does that exactely mean?

Offline

#16 2012-07-13 15:49:32

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: removing files doesn't free the space

mirto wrote:
Terminator wrote:

the only thing that I can think of is that the files you deleted are recovered when fsck runs (at boot)

What does that exactely mean?

It means that fsck thinks that the files were deleted accidently, maybe due to hardware error, as terminator said. But, i find that very hard to believe. But, who knows.

Offline

#17 2012-07-13 16:07:14

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: removing files doesn't free the space

You could try

sudo find /home -name lost+found -ls -exec ls -l '{}' \;

to check that there's not a load of recovered files somewhere.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#18 2012-07-13 16:44:22

mirto
Member
From: Barcelona
Registered: 2012-05-17
Posts: 11

Re: removing files doesn't free the space

skanky wrote:

(...) to check that there's not a load of recovered files somewhere.

nice try, but nope hmm

Offline

#19 2012-07-13 19:15:23

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: removing files doesn't free the space

mirto, have you tried to check HDD for bad sectors then and filesystem for errors?
http://hddguru.com/software/2005.10.02-MHDD/
http://hddguru.com/software/2005.10.02- … al.en.html
Perform scan with F4.

Offline

#20 2012-07-13 20:43:07

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 288

Re: removing files doesn't free the space

For badblocks is... badblocks. But it would be better to check the filesystem first.

Offline

#21 2012-07-13 23:54:20

mirto
Member
From: Barcelona
Registered: 2012-05-17
Posts: 11

Re: removing files doesn't free the space

mkkot wrote:

But it would be better to check the filesystem first.

I forced fsck at boot - it would report problems, if there would be any? Or do I need to run it explicitely, on /home, after unmounting it?
(I read on your web about fsck - nice)

@ Mr. Alex
Checking HDD seems great idea, but to use MHDD I prefere to have all my data back-uped and that will happen next week.
Also not sure if I can attain "deep knowledge" of hdd functioning till then.

Is there maybe any easier tool I could use?

enjoy your week-end!
Lena

Offline

#22 2012-07-13 23:58:24

mirto
Member
From: Barcelona
Registered: 2012-05-17
Posts: 11

Re: removing files doesn't free the space

Oh, yeah, got the part about badblocks!

Offline

#23 2012-07-14 06:17:16

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: removing files doesn't free the space

Since we are talking about bad hardware, maybe a smart scan would be helpful.

Install smartmontools and post the output of

smartctl --all /dev/sda

Offline

#24 2012-07-14 08:03:24

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 288

Re: removing files doesn't free the space

mirto wrote:
mkkot wrote:

But it would be better to check the filesystem first.

I forced fsck at boot - it would report problems, if there would be any? Or do I need to run it explicitely, on /home, after unmounting it?
(I read on your web about fsck - nice)

Thanks! smile

Well, fsck should be run on an unmounted partition. How you achieve this, is your own invention.

fsck /dev/sda4 -f -v
mirto wrote:

Is there maybe any easier tool I could use?

enjoy your week-end!
Lena

smartctl -a /dev/sda is a great idea, we can interpret this. There is also smartctl -t long to perform a long HDD test (with bad blocks checking). You can just run it during normal work. The result will be displayed in smartctl -a after the time mentioned by smartctl -t long output. It's 100% safe to your data.

However, we either can't free a space in the filesystem, or the fs is broken. HDD malfunction can be the cause of problems with filesystem but there could be also other reason. It's better to check the fs first.

Last edited by mkkot (2012-07-14 08:04:57)

Offline

#25 2012-07-14 08:50:35

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: removing files doesn't free the space

mkkot wrote:

For badblocks is... badblocks.

With one difference. MHDD displays not only bad blocks but also their condition (condition of all blocks so you can see the state of drive).

Offline

Board footer

Powered by FluxBB