LinHES Forums
http://forum.linhes.org/

disk space not being freed after deletion
http://forum.linhes.org/viewtopic.php?f=6&t=2729
Page 1 of 1

Author:  carmex [ Mon Oct 18, 2004 11:11 pm ]
Post subject:  disk space not being freed after deletion

I'm running R4V5 and I have been manually deleting some of my recordings (via mythweb and an xbox frontend) and I noticed that my % free disk space has not been increasing. I first noticed it through myth-web which is reporting: "5 programs, using 12 GB (3 hrs 30 mins) out of 30 GB". Wow... considering I'm using mpeg4 I knew something must be wrong.

So I logged in and checked it out:

Code:
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             2.3G  1.7G  491M  78% /
/dev/root.old         2.2M  342K  1.8M  16% /initrd
/dev/hda3             4.1G   24K  4.1G   1% /cache
/dev/hda4              31G   13G   18G  42% /myth


Same result. Bare in mind that I have no mp3s, roms, etc on my /myth partition, only recorded shows. Just to be sure, I did an inode check:
Code:
# df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/hda1             243808   84149  159659   35% /
/dev/root.old           2504     434    2070   18% /initrd
/dev/hda3               1056      12    1044    2% /cache
/dev/hda4               7808      76    7732    1% /myth


No problems there. So I decided to try another method of seeing how much space was used:
Code:
# du -h /myth
16K     /myth/lost+found
4.0K    /myth/pretty
3.3G    /myth/tv
4.0K    /myth/gallery
4.0K    /myth/music
4.0K    /myth/games/nes/roms
4.0K    /myth/games/nes/screens
12K     /myth/games/nes
4.0K    /myth/games/pc/screens
8.0K    /myth/games/pc
4.0K    /myth/games/snes/roms
4.0K    /myth/games/snes/screens
12K     /myth/games/snes
4.0K    /myth/games/xmame/cabs
4.0K    /myth/games/xmame/flyers
4.0K    /myth/games/xmame/hiscores
4.0K    /myth/games/xmame/history
4.0K    /myth/games/xmame/roms
4.0K    /myth/games/xmame/screens
28K     /myth/games/xmame
64K     /myth/games
4.0K    /myth/backup
312K    /myth/image_cache
4.0K    /myth/video/motion
8.0K    /myth/video
4.0K    /myth/tmp
3.3G    /myth


Ah! That's more like it. There are 3.3GB of files on that partition. So where has my other 9GB gone? I tried restarting the backend to see what effect that would have:
Code:
 # /etc/init.d/mythtv-backend restart
Restarting MythTV server: mythbackend.
.
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             2.3G  1.7G  491M  78% /
/dev/root.old         2.2M  342K  1.8M  16% /initrd
/dev/hda3             4.1G   24K  4.1G   1% /cache
/dev/hda4              31G  3.3G   28G  11% /myth


Now my free space is back! Has anyone else experienced an issue like this or know why it might be happening? It doesn't seem like I would need to restart the backend in order for space to be freed up. Thanks.

Author:  tjc [ Mon Oct 18, 2004 11:28 pm ]
Post subject: 

It sounds like there is a file descriptor leak in the backend. The files aren't getting closed for some reason, so despite the directory entries being unlinked, the inodes (which actually control the space) can't be released.

Author:  WillJitsu [ Tue Oct 19, 2004 12:36 am ]
Post subject: 

I'm not sure what the problem is that you're having, but I have noticed that if you delete recordings via MythWeb, you have to refresh the page in the browser for the free space info at the bottom to update.

Author:  carmex [ Tue Oct 19, 2004 2:34 am ]
Post subject: 

It's not a simple matter of refreshing the web page. The space is not available by any means until the backend is restarted.

The file descriptor leak sounds like the problem. Is this something that should be brought to the attention of the developers? Is there any way I can troubleshoot it further?

If there is a file descriptor leak it seems like everyone would have noticed this problem and it would have been fixed long ago. What's unique about my situation that is causing this to happen? I never delete files directly from the backend, I always do it either through my xbox frontend or the mythweb interface. Is this unusual?

Author:  davem [ Tue Oct 19, 2004 7:33 am ]
Post subject: 

There has been chatter about this on the myth list, but mostly regarding 0.16. They're saying it only affects people with remote frontends who do not use nfs to access myth content. It's fixed in cvs I guess.

Author:  computerguy5 [ Tue Nov 09, 2004 7:55 am ]
Post subject: 

This is happening to me with the frontend and backend on the same machine. Obviously remote nfs is not the only case of it happening.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/