SOLVED Moving files between datasets on same volume with not much free space

Status
Not open for further replies.

LeoSum

Dabbler
Joined
Dec 13, 2015
Messages
36
Hi there,
I copied all my files to a dataset on my 3TB ZFS volume on my FreeNAS, leaving roughly 20% free.
As all the files are in some sort of "entry" dataset that I initially created, I now want to move the files to orderly datasets according to content.

I just started the first moving process (about 1TB) via the mv command. Now as I watch the partition diskspace in the webinterface, I notice that what the system is doing is actually a copy.

No diskspace in the origin dataset is freed up but the target dataset is filling up. I am guessing the delete on the origin will only happen after the entire 1TB are copied. This will lead to the volume running out of space.

Is there a way to move the files so that they are deleted from the origin immediately (like I would expect the move command to do it actually)?

Thanks for advice!
 
Last edited:

LeoSum

Dabbler
Joined
Dec 13, 2015
Messages
36
I came accross the "--remove-source-files" argument for rsync. Looks like this does exactly what I wanted.
So I aborted the "mv" command and trying
Code:
rsync -avPHK --remove-source-files SRC/ DST/
now.

After aborting the "mv" command, some of the files in the origin dataset are actually gone, while they appeared in the destination dataset.
But still, the diskspace has vanished. Is there some kind of recycle bin?
 

LeoSum

Dabbler
Joined
Dec 13, 2015
Messages
36
No. But after a few hours it came back now. Maybe the display of the webgui is just a bit slow.
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Just a word of warning, if your rsync task is interrupted (power outage, whatever) or the rsync process terminates for any reason, you'll have a real mess on your hands because there won't be a trivial way to recover. I'd never do this with important data. :/
 
Status
Not open for further replies.
Top