-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZFS file system id is not persistent #888
Comments
I have experimented with a quick patch that makes f_fsid.val to be zfs dataset guid and it appears to work quite well. |
Yes, I can see how that would be a problem. d_sb->s_dev may differ between hosts. It looks like internally OpenSolaris is also using the guid for the fsid so that's a good choice. usr/src/uts/common/fs/zfs/zfs_vfsops.c:zfs_domount()
My only issue with the patch is that we should probably ensure a known byte ordering so this doesn't change between little/big endian systems. The ext4_statfs() function has one reasonable example of this. |
I've spent some time looking through the code that uses f_fsid.val and it is my understanding that it is used as a value, rather than as a byte array. Since GUID itself is endian-neutral it wan't change between little/big endian systems. Unfortunately I lack access to any Linux capable big endian machine in order ot prove it. Illumos/OpenSolaris, by the way does the same - the code doesn't do anything special for little/big endian systems. If, however, I have missed something obvious I'll be glad to stand corrected. |
Use ZFS dataset fsid guid as a unique file system id, similar to what is done on Illumos/OpenSolaris. Issue openzfs#888 Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com>
…zfs#888) Bumps [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) from 0.3.6 to 0.3.8. - [Commits](sunfishcode/linux-raw-sys@v0.3.6...v0.3.8) --- updated-dependencies: - dependency-name: linux-raw-sys dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
When moving zpool between different hosts the file system id of a given filesystem is not persistent. If this procedure is used for NFS servers failover NFS clients have little chance to survive as their NFS handles become stale.
Apparently commit SHA: 53cf50e introduced the next code in fs_statvfs()
d_sb->s_dev may be different on different hosts, since it comes from (if I am not mistaken) mount_nodev()/get_sb_nodev().
The text was updated successfully, but these errors were encountered: