How can I change the mount point for a ZFS pool/dataset that is currently in use? I don't mind if it doesn't change immediately and I need to reboot, but I can't work out how to do it:
$ zfs set mountpoint=/srv/oldpool pool umount: /srv/pool/dataset1: target is busy. cannot unmount '/srv/pool/dataset1': umount failed $ zfs get mountpoint pool NAME PROPERTY VALUE SOURCE pool mountpoint /srv/pool local
It refuses to make the change unless it can unmount all the datasets successfully.
When the system boots, the ZFS volumes are immediately in use so it would be nice to be able to change the mount point for the next boot, but it doesn't look like that's possible?
I'd like to avoid having to boot into single-user mode if possible!
(The reason for asking is I've copied the pool off failing disks onto a new pool on different disks, and now I want to swap everything over to the new pool by mounting it in place of the old one.)