xfs在rhel/centos下挂载的bug

在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

决议

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 徐云鹤
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值