39

example:

When I created the pool, I set it to mount to /mystorage

zpool create -m /mystorage mypool raidz /dev/ada0 dev/ada1 /dev/ada2

But now I want the pool to mount to /myspecialfolder.

Any ideas how it can be done? I've searched the net and look at zpool and zfs manpages and found nothing.

Thanks

mrjayviper
  • 1,971
  • 3
  • 25
  • 41

1 Answers1

53
zfs set mountpoint=/myspecialfolder mypool
Tim Fletcher
  • 886
  • 7
  • 7
  • I didn't realize I can change the mount point while the pool in in use. I thought I needed to export it first and then change the mount point during import. Thank you! – mrjayviper Sep 22 '16 at 11:44
  • 3
    @mrjayviper If you use the normal commands (not special options like `-F` or similar) and stay away from `destroy`, you cannot do much harm on ZFS. If an operation is not possible, you would get *resource busy*, *dataset in use* or similar. Of course, this is only for the filesystem - your applications may react differently (should handle such events themselves). – user121391 Sep 23 '16 at 08:44
  • 9
    `zfs create -o mountpoint=/myspecialfolder mypool` at create time – ThorSummoner Oct 22 '18 at 00:18