我有一个存在于和/proc/mounts
中的 ZFS 数据集/etc/mtab
,但文件夹在文件系统中不存在,zfs umount
报告数据集不存在,并zfs mount
报告数据集已挂载。
这是在 RHEL 8.8(完全更新)上运行 zfs dkms 2.1.11-1
是否可以在不重启服务器的情况下卸载此数据集?我该如何开始解决此类问题?
我认为这种情况发生在数据集上启用 sharenfs 设置,然后zfs umount
在 nfs 守护进程共享时尝试执行 a 操作时。我尝试过设置sharenfs=off
(成功了,但不能解决问题)。nfs 服务已关闭,问题仍然存在。我可以将zfs send
数据集传输到另一个系统并验证它们是否完好无损,但我只需要将它们安装在这服务器。
我没有使用容器或者额外的挂载命名空间(据我所知)。
坐骑列表如下/etc/mtab
:/proc/mounts
topher@nzxt:/$ grep Backups -H /etc/mtab /proc/mounts
/etc/mtab:array/Backups /array/Backups zfs rw,seclabel,nosuid,nodev,noexec,noatime,xattr,noacl 0 0
/etc/mtab:array/Backups/gwen /array/Backups/gwen zfs rw,seclabel,nosuid,nodev,noexec,noatime,xattr,noacl 0 0
/proc/mounts:array/Backups /array/Backups zfs rw,seclabel,nosuid,nodev,noexec,noatime,xattr,noacl 0 0
/proc/mounts:array/Backups/gwen /array/Backups/gwen zfs rw,seclabel,nosuid,nodev,noexec,noatime,xattr,noacl 0 0
文件系统中不存在该目录
topher@nzxt:/$ ls /array/Backups
ls: cannot access '/array/Backups': No such file or directory
数据集确实存在于 zfs 中(池是array
)
topher@nzxt:/$ zfs list array/Backups array/Backups/gwen
NAME USED AVAIL REFER MOUNTPOINT
array/Backups 2.62T 1.59T 1.71T /array/Backups
array/Backups/gwen 364G 1.59T 364G /array/Backups/gwen
卸载(延迟、强制或其他方式)失败。
topher@nzxt:/$ sudo zfs umount array/Backups
cannot unmount '/array/Backups/gwen': no such pool or dataset
topher@nzxt:/$ sudo zfs umount array/Backups/gwen
cannot unmount '/array/Backups/gwen': no such pool or dataset
topher@nzxt:/$ sudo umount /array/Backups/gwen
umount: /array/Backups/gwen: no mount point specified.
topher@nzxt:/$ sudo umount /array/Backups
umount: /array/Backups: no mount point specified.
我也无法导出 zfs 池。
topher@nzxt:~$ sudo zpool export array
cannot unmount '/array/Backups/gwen': unmount failed
尝试重新挂载目录,但报告称该目录已挂载
topher@nzxt:/$ sudo zfs mount array/Backups
cannot mount 'array/Backups': filesystem already mounted
topher@nzxt:/$ sudo zfs mount array/Backups/gwen
cannot mount 'array/Backups/gwen': filesystem already mounted
lsof
尝试遍历受影响的目录时会抛出错误,并且不会返回这些路径中任何打开的文件句柄
topher@nzxt:/$ sudo lsof | grep Backups
lsof: WARNING: can't stat() zfs file system /array/Backups
Output information may be incomplete.
lsof: WARNING: can't stat() zfs file system /array/Backups/gwen
Output information may be incomplete.
fuser
认为该坐骑不存在
topher@nzxt:~$ sudo fuser -vm /array/Backups
Specified filename /array/Backups does not exist.
topher@nzxt:~$ sudo fuser -vm /array/Backups/gwen
Specified filename /array/Backups/gwen does not exist.
答案1
尝试一下偷懒或者强制umount
,看看会发生什么?
umount -l
或者umount -f
看:https://github.com/openzfs/zfs/issues/2435和Linux 挂载点无论如何都无法卸载?