您的位置:首页 > 运维架构 > Linux

xfs在rhel/centos下挂载的bug

2018-01-18 10:02 141 查看

在rhel下挂载xfs文件系统,重启后进入emergency mode。百思不得其解。最后在红帽官网找到了答案,是因为bug所致。可以通过添加mount选项_netdev解决此问题。

以下是引用:

RHEL7 boots up to emergency mode when using a separate journal for XFS

环境

Red Hat Enterprise Linux 7

问题

A RHEL7 machine boots to emergency mode if a new XFS filesystem is created that uses a separate device for the journal with the logdev argument.
It works fine to mount the filesystem manually, but if an entry is added in /etc/fstab and the machine is rebooted, it stops at the "Welcome to emergency mode" prompt.
If 'Ctrl+D" is pressed, the system boots normally and automatically mounts the filesystem.
If the filesystem is created without a separate journal, the machine boots normally.
The filesystem was created as following:
Raw
# lvcreate -L 256M -n lv_journal01 rhel
# mkfs.xfs -l logdev=/dev/rhel/lv_journal01 /dev/sdb
# vi /etc/fstab
# mount -a

决议

This was tracked in the bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1164334.
This is fixed as an errata for systemd (systemd-219-19.el7) and can be seen at https://rhn.redhat.com/errata/RHBA-2015-2092.html
After updating the package, the /etc/fstab entry for the XFS filesystem should be changed to:
Raw
/dev/sd<X><Y>              /<mount-point>        xfs    logdev=/dev/<journal-device>,x-systemd.requires=/dev/<journal-device>     0  0
If the above update and /etc/fstab entry cannot be done, the workaround is to add '_netdev' as a mount option in /etc/fstab.
The entry should look as
Raw
/dev/<device>   /<mount-point>  xfs defaults,logdev=/dev/<journal-device>,_netdev 1 2

Affected Products

Red Hat Enterprise Linux Server 7 x86_64
Red Hat Enterprise Linux Server - Extended Update Support 7.4 x86_64
Red Hat Enterprise Linux Server - Extended Update Support 7.3 x86_64
Red Hat Enterprise Linux Server - AUS 7.3 x86_64
Red Hat Enterprise Linux Workstation 7 x86_64
Red Hat Enterprise Linux Desktop 7 x86_64
Red Hat Enterprise Linux for IBM z Systems 7 s390x
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support 7.4 s390x
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support 7.3 s390x
Red Hat Enterprise Linux for Power, big endian 7 ppc64
Red Hat Enterprise Linux for Power, big endian - Extended Update Support 7.4 ppc64
Red Hat Enterprise Linux for Power, big endian - Extended Update Support 7.3 ppc64
Red Hat Enterprise Linux for Scientific Computing 7 x86_64
Red Hat Enterprise Linux Server from RHUI 7 x86_64
Red Hat Enterprise Linux EUS Compute Node 7.4 x86_64
Red Hat Enterprise Linux EUS Compute Node 7.3 x86_64
Red Hat Enterprise Linux Server - AUS 7.4 x86_64
Red Hat Enterprise Linux for Power, little endian 7 ppc64le
Red Hat Enterprise Linux for Power, little endian - Extended Update Support 7.4 ppc64le
Red Hat Enterprise Linux for Power, little endian - Extended Update Support 7.3 ppc64le
Red Hat Enterprise Linux for Power, little endian - Extended Update Support 7.2 ppc64le
Red Hat Enterprise Linux Server - TUS 7.3 x86_64
Red Hat Enterprise Linux Server (for IBM Power LE) - 4 Year Extended Update Support 7.4 ppc64le
Red Hat Enterprise Linux Server (for IBM Power LE) - 4 Year Extended Update Support 7.3 ppc64le
Red Hat Enterprise Linux Server - 4 Year Extended Update Support 7.4 x86_64
Red Hat Enterprise Linux Server - 4 Year Extended Update Support 7.3 x86_64

By 徐云鹤
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息