-
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
Healthy Zpool unmountable due to error 1 (archzfs 0.6.5.7_4.5.4_1-1) #4729
Comments
UpdateWith help from ryao on the freenode IRC channel #zfsonlinux I could figure out the cause of the "filesystem 'Data' can not be mounted due to error 1" / "Invalid Argument" - Error. Possible Solutions:
troubleshooting steps I took:
As can be seen above |
Thanks for opening an issue and finding the root cause. Thanks again for taking the time to document this. |
You saved my day!! Since kernel version 4.9 is the latest LTS I wasn't able to mount my zfs filesystem and couldn't find the reason. nbmand=off was the hot-fix solution. Thx so much |
Commit torvalds/linux@9e8925b6 allowed for kernels to be built without support for mandatory locking (MS_MANDLOCK). This will result in 'zfs mount' failing when the nbmand=on property is set and the kernel is build without CONFIG_MANDATORY_FILE_LOCKING. Unfortunately we can't detect prior to the mount(2) system call if the kernel was built with this support. The best we can do is check if the mount failed with EPERM and if we passed 'mand' as a mount option and print a more useful error message. e.g. filesystem 'tank' has the 'nbmand=on' property set, this mount option may be disabled in your kernel. Use 'zfs set nbmand=off' to disable this option and try to mount the filesystem again. Additionally, switch the default error message case to use strerror() to produce a more human readable message. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#4729
I had a chance to look in to this and the best we can do is print a more useful error message in this case. Commit torvalds/linux@9e8925b allows for kernels to be built without support for mandatory file locking (CONFIG_MANDATORY_FILE_LOCKING) and distributions are now disabling it in their kernels. That means the options are rebuild your kernel with this option enabled, or set I've opened #6199 with a small patch to add a useful error message for this case. e.g.
|
Commit torvalds/linux@9e8925b6 allowed for kernels to be built without support for mandatory locking (MS_MANDLOCK). This will result in 'zfs mount' failing when the nbmand=on property is set if the kernel is built without CONFIG_MANDATORY_FILE_LOCKING. Unfortunately we can not reliably detect prior to the mount(2) system call if the kernel was built with this support. The best we can do is check if the mount failed with EPERM and if we passed 'mand' as a mount option and then print a more useful error message. e.g. filesystem 'tank/fs' has the 'nbmand=on' property set, this mount option may be disabled in your kernel. Use 'zfs set nbmand=off' to disable this option and try to mount the filesystem again. Additionally, switch the default error message case to use strerror() to produce a more human readable message. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#4729 Closes openzfs#6199
Commit torvalds/linux@9e8925b6 allowed for kernels to be built without support for mandatory locking (MS_MANDLOCK). This will result in 'zfs mount' failing when the nbmand=on property is set if the kernel is built without CONFIG_MANDATORY_FILE_LOCKING. Unfortunately we can not reliably detect prior to the mount(2) system call if the kernel was built with this support. The best we can do is check if the mount failed with EPERM and if we passed 'mand' as a mount option and then print a more useful error message. e.g. filesystem 'tank/fs' has the 'nbmand=on' property set, this mount option may be disabled in your kernel. Use 'zfs set nbmand=off' to disable this option and try to mount the filesystem again. Additionally, switch the default error message case to use strerror() to produce a more human readable message. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#4729 Closes openzfs#6199
Commit torvalds/linux@9e8925b6 allowed for kernels to be built without support for mandatory locking (MS_MANDLOCK). This will result in 'zfs mount' failing when the nbmand=on property is set if the kernel is built without CONFIG_MANDATORY_FILE_LOCKING. Unfortunately we can not reliably detect prior to the mount(2) system call if the kernel was built with this support. The best we can do is check if the mount failed with EPERM and if we passed 'mand' as a mount option and then print a more useful error message. e.g. filesystem 'tank/fs' has the 'nbmand=on' property set, this mount option may be disabled in your kernel. Use 'zfs set nbmand=off' to disable this option and try to mount the filesystem again. Additionally, switch the default error message case to use strerror() to produce a more human readable message. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #4729 Closes #6199
Hello, I have a bit of a problem with ZFS.
I created a mirrored Zpool on 2 LUKS volumes, after exporting, reboot and importing it, it reports:
Status:
While on Manjaro:
I downgraded now to the LTS / version for 4.4.11 of ZFS (from archzfs repo) and linux (kernel) which made the zpool mountable again.
Setup Info:
system specs
Manjaro, Arch
Zpool properties (After rename attempt), Zpool status
troubleshooting steps I took:
chronological steps I took before the zpool wasn't mountable under arch (4.5.*) anymore:
-> for more details see 'complete log'
log of commands from creation of zpool (and underlying LUKS volumes) till mount failure:
complete log incl. strace
zdb Data (very large text file)
Guide I followed (mostly): ZFS on Linux with LUKS encrypted disks | make then make install
As you can see there are no signs of corruption, errors or any other reported problems, just the inability of mounting them. As "scrub" and "zdb Data" successfully completes (and latter outputes files) I'm think there's nothing wrong with the zpool and data is readable, I could mount zpools without issues on with multiple test zpools with same name and scripts for mounting/unmounting.
Only other search result fore someone having Error 1 was also a guy with Arch but he had an EPERM in his mount strace which resulted the error 1, I don't
Conclusion
not mountable:
archzfs/zfs-linux & its dependencies
mountable:
archzfs/zfs-linux-lts & its dependencies
local/spl-utils 0.6.5.7-1 (manjarozfs) & its dependencies
For now I have to stay on linux-lts and tolerate various other packages and ALSA (sound) not working anymore because of the downgrade to be able to access ZFS.
More info in this subreddit post where I posted this problem before here with suggested solutions that also didn't work.
The text was updated successfully, but these errors were encountered: