Rename a dataset?

Hello all,

I have a Dataset that has a legacy naming schemed and I would like to rename it, rather than recreate the whole dataset. Is there a way to do this?

Many thanks,
P

zfs rename pool/dataset pool/newdataset

5 Likes

Also works to move them around the dataset tree. Just be careful with inherited properties if you do that.

3 Likes

Thanks, very helpful. I have VM’s stored on the dataset I wish to rename, will the ZFS update the storage path location for the Virtual Machine setup in Scale? Or will this be something I have to manually adjust?

Just want to make sure that after the rename I do not bork the VM’s from working.

I wouldn’t expect so.

Ok no problem. I am not at the machine but I am fairly sure you can update the VM path via the config GUI.

I wouldn’t do it while the vm is running :wink:

In fact, renaming datasets and zvols will fail if they’re in use, iirc.