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

Review Request #111 - Created Nov. 2, 2015 and updated

Alexandre Lécuyer

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() )


  • 2
  • 3
  • 0
  • 5
Description From Last Updated
zfs_create(): what error does lzc_create() if you try to create a filesystem that already exists? A. What if the dataset ... Matthew Ahrens Matthew Ahrens
I assume it's OK to not manipulate the unique avl because we know this is not mounted. Can you add ... Matthew Ahrens Matthew Ahrens
Alexandre Lécuyer
Yuri Pankov
Matthew Ahrens
Alexandre Lécuyer
Alexandre Lécuyer
Alexandre Lécuyer
Review request changed

Change Summary:

Use EBADF instead of EEXIST if fsid_guid is invalid or already used (zfs_ioc_set_prop and zfs_ioc_create do not currently use EBADF)


Revision 4 (+6 -4)

Show changes