Mike Kazantsev wrote:
Hi,

Here's a bit of a puzzle for me...

I've got an 40G LVM partition with empty reiserfs on it.
Then I've started rtorrent using this fs as a storage and added two 50G
torrents to it.
Rtorrent had no problems with the fact that partition is smaller than
either of them and created all the downloaded files as sparse, so that
"du -s --apparent-size" showed 100G.
df reported that fs is still empty.

Few days passed and some data actually hit the file system.
Knowing that it can't handle that much of data I've downloaded files
selectively, pushing completed ones to another fs, leaving a symlink in
their place.

df now shows that only 5G is free but "du -s" says that files occupy
15G and apparent size is 65G.

I might be wrong, but here's my take on it:

The files you moved won't be deleted until they are closed. That means quiting the torrent client. "du" shows space occupied by files that actually have a filename. The files you deleted are still there if the torrent client still has handles on them; they just lack an entry in the directory and therefore "du" doesn't pick them up, but of course "df" does since it's not looking at files individually but asks the filesystem directly.

So I suppose simply quitting the torrent client will result in no more handles pointing at those files and therefore they will finally be deleted by the filesystem. If you don't quit the client, new data will be stored in the "invisible" deleted files rather than in the ones pointed to by the symlinks, resulting in "df" showing less and less free space even though "du" won't agree (and losing the downloaded data too since its stored in the deleted files.)


Reply via email to