linux – ZFS数据集在重新启动时消失

linux – ZFS数据集在重新启动时消失,第1张

概述我已经在我的Centos 7中安装了ZFS(0.6.5)并且我还创建了一个zpool,除了我的数据集在重新启动时消失这一切之外,一切正常. 我一直试图在各种在线资源和博客的帮助下调试此问题,但无法获得所需的结果.重启后,当我发出zfs list命令时,我得到“没有数据集可用”,zpool list给出“没有可用的池” 在做了大量的在线研究之后,我可以通过使用zpool import -c cach 我已经在我的Centos 7中安装了ZFS(0.6.5)并且我还创建了一个zpool,除了我的数据集在重新启动时消失这一切之外,一切正常.
我一直试图在各种在线资源和博客的帮助下调试此问题,但无法获得所需的结果.重启后,当我发出zfs List命令时,我得到“没有数据集可用”,zpool List给出“没有可用的池”
在做了大量的在线研究之后,我可以通过使用zpool import -c cachefile手动导入缓存文件来使其工作,但是我仍然必须在重启之前运行zpool set cachefile = / etc / zfs / zpool.cache Pool稍后重启后导入它.
这就是systemctl状态zfs-import-cache的样子,

zfs-import-cache.service – 按缓存文件导入ZFS池
加载:已加载(/usr/lib/systemd/system/zfs-import-cache.service; static)
活动:不活动(死机)

cat / etc / sysconfig / zfs

# Zol userland configuration.# Run `zfs mount -a` during system start?ZFS_MOUNT='yes'# Run `zfs unmount -a` during system stop?ZFS_UNMOUNT='yes'# Run `zfs share -a` during system start?# nb: The shareiscsi,sharenfs,and sharesmb dataset propertIEs.ZFS_SHARE='yes'# Run `zfs unshare -a` during system stop?ZFS_UNSHARE='yes'# Specify specific path(s) to look for device nodes and/or links for the# pool import(s). See zpool(8) for more information about this variable.# It supersedes the old USE_disK_BY_ID which indicated that it would only# try '/dev/disk/by-ID'.# The old variable will still work in the code,but is deprecated.#ZPOol_import_PATH="/dev/disk/by-vdev:/dev/disk/by-ID"# Should the datasets be mounted verbosely?# A mount counter will be used when mounting if set to 'yes'.VERBOSE_MOUNT='no'# Should we allow overlay mounts?# This is standard in linux,but not ZFS which comes from Solaris where this# is not allowed).DO_OVERLAY_MOUNTS='no'# Any additional option to the 'zfs mount' command line?# Include '-o' for each option wanted.MOUNT_EXTRA_OPTIONS=""# Build kernel modules with the --enable-deBUG switch?# Only applicable for Debian GNU/linux {dkms,initramfs}.ZFS_DKMS_ENABLE_DEBUG='no'# Build kernel modules with the --enable-deBUG-dmu-tx switch?# Only applicable for Debian GNU/linux {dkms,initramfs}.ZFS_DKMS_ENABLE_DEBUG_DMU_TX='no'# Keep deBUGging symbols in kernel modules?# Only applicable for Debian GNU/linux {dkms,initramfs}.ZFS_DKMS_disABLE_STRIP='no'# Wait for this many seconds in the initrd pre_mountroot?# This delays startup and should be '0' on most systems.# Only applicable for Debian GNU/linux {dkms,initramfs}.ZFS_INITRD_PRE_MOUNTROOT_SLEEP='0'# Wait for this many seconds in the initrd mountroot?# This delays startup and should be '0' on most systems. This might help on# systems which have their ZFS root on a USB disk that takes just a little# longer to be available# Only applicable for Debian GNU/linux {dkms,initramfs}.ZFS_INITRD_POST_MODPROBE_SLEEP='0'# List of additional datasets to mount after the root dataset is mounted?## The init script will use the mountpoint specifIEd in the 'mountpoint'# property value in the dataset to determine where it should be mounted.## This is a space separated List,and will be mounted in the order specifIEd,# so if one filesystem depends on a prevIoUs mountpoint,make sure to put# them in the right order.## It is not necessary to add filesystems below the root fs here. It is# taken care of by the initrd script automatically. These are only for# additional filesystems needed. Such as /opt,/usr/local which is not# located under the root fs.# Example: If root FS is 'rpool/ROOT/rootfs',this would make sense.#ZFS_INITRD_ADDITIONAL_DATASETS="rpool/ROOT/usr rpool/ROOT/var"# List of pools that should NOT be imported at boot?# This is a space separated List.#ZFS_POol_EXCEPTIONS="test2"# Optional arguments for the ZFS Event Daemon (ZED).# See zed(8) for more information on available options.#ZED_ARGS="-M"

我不确定这是否是一个已知问题,如果是,是否有任何解决方法?也许是一种在重启后保存我的数据集的简单方法,最好不需要缓存文件的开销.

解决方法 请确保启用了zfs服务(目标).这就是在启动/关闭时处理池导入/导出的原因.

zfs.target加载了活动的活动ZFS启动目标

你永远不应该为此而挣扎.如果有机会,请在zfs发行版上运行更新,因为我知道初创公司的服务在过去几个版本中有所改进:

[root@zfs2 ~]# rpm -qi zfsname        : zfsVersion     : 0.6.5.2Release     : 1.el7.centos
总结

以上是内存溢出为你收集整理的linux – ZFS数据集在重新启动时消失全部内容,希望文章能够帮你解决linux – ZFS数据集在重新启动时消失所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1043586.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存