SOLVED How to move dataset

Fred974

Contributor
Joined
Jul 2, 2016
Messages
190
Hi,

I have 2 top level datasets as follow:
minio_storage
|- srv-minio1
|- srv-minio2
|- srv-minio4
|- srv-minio5
production_backup

I want to make the minio_storage dataset a sublevel of production_backup. The end result should look like this:
production_backup
|-minio_storage

|- srv-minio1
|- srv-minio2
|- srv-minio4
|- srv-minio5
I Stopped all the running jails and plugin and ran mv /mnt/z2_bunker/minio_storage /mnt/z2_bunker/production_backup which resulted with this error:
Code:
root@truenas[/mnt/z2_bunker]# mv /mnt/z2_bunker/minio_storage /mnt/z2_bunker/production_backup
mv: rename /mnt/z2_bunker/minio_storage to /mnt/z2_bunker/production_backup/minio_storage: Operation not supported


Could anyone please provide some assistance?

Thank you
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
what you probably want to know is that there's a zfs rename command... which works more-or-less like the mv command, but with datasets rather than directories.

So you use the dataset addressing, not the mounted location:
zfs rename z2_bunker/minio_storage z2_bunker/production_backup/minio_storage
 

krantz

Dabbler
Joined
Jun 2, 2013
Messages
41
what you probably want to know is that there's a zfs rename command... which works more-or-less like the mv command, but with datasets rather than directories.

So you use the dataset addressing, not the mounted location:
zfs rename z2_bunker/minio_storage z2_bunker/production_backup/minio_storage
Even now, after so many years since the creation of this post, is still useful and valid. Cheers!
 
Top