This is less “how do I” and more “is what I’m planning to do going to work”.
I have a cursed zpool named DONKEY made of about a dozen small drives of different sizes. I finally got a small number of drives which together can make a nice RAIDz2 vdev larger than that whole pool.
I have many many devices configured to access NFS shares from DONKEY, and I don’t really want to go around reconfiguring all of them. Thus, I want to move the datasets to the new zpool and keep the same share path.
I think what I can do is:
- Create a zpool named DONKEY2
- Clone snapshots of each dataset from DONKEY to DONKEY2
- Remove DONKEY
- Rename DONKEY2 to DONKEY by exporting and then importing the zpool with the new name
- Enable the NFS share again with the imported pool
Will this work? Thanks.
NFS doesn’t really have a concept of a share path per se. You’re literally exporting filesystem paths. There are some hackish things you can do with NFS reparse points to basically redirect the client to the appropriate FS path, but we don’t have UI / backend support for them at the moment.
Yes, I would have liked from the very beginning if I could have established paths which were not directly tied to the zpool and dataset names. But c’est la vie.
If you want to do that then you could potentially use SMB shares rather than NFS exports (since those are tied to share name from client perspective rather than filesystem paths).
Then I’d have to go around changing all my clients to use smb AND have a different path 
And anyway, I think there is some kind of gang that roams around beating people who use SMB with Linux clients.
Considering that Linux has an in-tree kernel SMB client that, I’d say not really 
Reporting back that this did work. I had to re-establish the mounts for my apps, and of course I need to set up any replication/snapshotting again, but other than that it seems to have behaved as I expected.