advice on moving data from 1 dataset to another

nikkon

Contributor
Joined
Dec 16, 2012
Messages
171
Hello,
I need an advice on something:
a long time ago, when I created the Raidz, I had only one dataset create and everything in that. Now I intend to separate data, and move everything (media, photos, stuff) to its own dataset.
can I move data with the mv command with by default is recursive? or should I do it in a different fashion? I tried with mv, but is damn slow. 8GB took me 10 minutes.
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
What you're running into the is main limitation of the fabulous copy-on-write feature of ZFS. In order to move data between datasets, data must be copied from one dataset to the other, which means a simultaneous read and write in your pool. Unlike data moves intra-dataset, which are just simple pointer changes.

It may be faster to copy the data off of the pool, and then copy it back onto the pool (for example, with a second pool, or through an external drive).
 

nikkon

Contributor
Joined
Dec 16, 2012
Messages
171
thanks for the reply. i will probably copy-paste it one by one and see how iostat looks like. hope to be faster
 

nikkon

Contributor
Joined
Dec 16, 2012
Messages
171
i decided to do it with rsync. seems a bit faster than cp.
 
Top