Weird behavior when moving files between disks (empty space not reclaimed?)


NLS

Recommended Posts

OK, so I am downloading a HUGE torrent (legal, if you need to know) and since the spread of files is not super (more on this later), I decided to micro-manage some of the file management.

The first "problem" (but the way Linux works AFAIK), is the files were reporting their "real" size, even before taking their real files.

I mean the huge torrent is split in 900MB sized files, sizing the folder reports the files as 900 x (number of files), but seeing the actual content (before the torrent is finished) shows their proper current size. This leads to mishandling of the spread of files.

Yes this is not using the cache (cache couldn't handle the torrent size anyway).

As the files "fill up" and start taking their proper space (i.e. start becoming 900MB each for real) the disks get full and seemingly will fill some disks to full (one disk DID report 100%).

 

So the above problem (which I think doesn't have a proper solution), lead me to moving files WHILE torrent is running (torrent is looking at share not disk).
Since I know how torrents work (pieces, not files), I take care to move files that I see are complete.

 

AND HERE IS THE MAIN ISSUE (sorry for the long intro): I move the files, but in "MAIN" tab, while the destination disk is filling (and I see the files MOVING not copied - i.e. they DO disappear from source), the source disk is NOT emptying.

And yes I refresh the page (F5).

 

Does the dashboard periodically refresh and is not showing live info?

Or something else is happening?

WHILE I was writing this, space in the source DID show up eventually. Well after I made the move though...

So I am still curious of the process and if this is normal.

EDIT: No it didn't, I was looking at another disk. Still shows the space like I never moved the files, but the files ARE moved.

Edited by NLS
Link to comment

Nobody finds this weird?

Nobody has any explanation?

I use Krusader for the moves and the moves ARE happening.

The torrent eventually errored as the files started to grow to their final sizes (900MB each), so since the empty space was not reclaimed (???????), they grew out of the size of two of my disks.

Again: I took files AWAY from those two disks, yet I don't see the space actually growning in those two disks.

Right now, with the torrent stopped (errored), I will do some more moves and then I will restart qbittorrent container (in case it keeps any hidden locks?) and then hash-check the torrent to revalidate it and hopefully it will continue.

But this is a major issue.

 

Edited by NLS
Link to comment

The most likely reason I can see for this behaviour is that some program have the files open (for reading or writing).   When you are moving the files to another disk using krusader this deletes the directory entry (so from your perspective the files no longer exists on the disk), but the actual space occupied by the file is not released until all programs that have the file open release their file handles on the file.   This is standard Linux behaviour.

Link to comment
4 minutes ago, remotevisitor said:

The most likely reason I can see for this behaviour is that some program have the files open (for reading or writing).   When you are moving the files to another disk using krusader this deletes the directory entry (so from your perspective the files no longer exists on the disk), but the actual space occupied by the file is not released until all programs that have the file open release their file handles on the file.   This is standard Linux behaviour.

 

I thought of that. Hoping that stopping the container will "fix" this.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.