6333 ZFS should let the user specify or modify the fsid_guid of a dataset

Review Request #111 — Created Nov. 2, 2015 and updated — Latest diff uploaded


This is useful if you need to migrate NFS clients from a target system to another, without having to umount/remount all clients.

The fsid_guid is used to construct the vfs_fsid when mounting a dataset. vfs_fsid is then used as the fh3_fsid by NFS when sharing the dataset.

Usage :
zfs create -o fsid_guid=xxx tank/test
zfs set fsid_guid=xxx tank/test

- that the property is reflected in the VFS ID when mounting the dataset.
- that migrating NFS client from a source system to another system on which the dataset fsid_guid matches the source dataset works without needing to remount clients (no "Stale NFS file handle" errors).
- that you cannot assign a fsid_guid identical to a dataset that is currently mounted. If you assign a dataset a fsid_guid identical to a currently unmounted dataset, the latter will be assigned a new fsid_guid upon being mounted. (as already happens in the case of a "real" collision. See existing comment at the beginning of dsl_dataset_sync() )