kk Blog —— 通用基础

date [-d @int|str] [+%s|"+%F %T"]

resuce 模式中mount fail

https://www.dell.com/support/kbdoc/zh-cn/000181978/appsync-service-plan-failed-in-mount-copy-phase

症状

Error in Host OS message log file:

1
2
3
4
kernel: XFS (dm-32): Superblock has unknown read-only compatible features (0x4) enabled.
kernel: XFS (dm-32): Attempted to mount read-only compatible filesystem read-write.
kernel: XFS (dm-32): Filesystem can only be safely mounted read only.
kernel: XFS (dm-32): SB validate failed with error -22.

From Host OS dmesg log file:

1
2
3
4
[ 8.529818] XFS (dm-7): Mounting V5 Filesystem
[ 8.530257] XFS (dm-8): Mounting V5 Filesystem
[ 8.557572] XFS (dm-7): Ending clean mount
[ 9.253626] XFS (dm-8): Ending clean mount

Events logs:

1
2
3
Mount copy MILE_000002,<AppSync Host>,Error occurred during the execution of service plan <Service Plan name>
Mount copy HST_000065,<AppSync Host>,Failed to discover fc and iscsi adapter information on host <Mount Host>
Mount copy UNIX_000009,<Mount Host>,Rescan command failed on the host.

Mount Host logs:

1
2
3
acputil.py[647]:execute() Info:Running command: mount -t xfs -o nouuid,rw,relatime,attr2,inode64,noquota <FS>

host.py[4121]:mount() Error caught during mount: : ['mount: wrong fs type, bad option, bad superblock on <FS>,', ' missing codepage or helper program, or other error', '', ' In some cases useful info is found in syslog - try', ' dmesg | tail or so.'] 

原因

RHEL bug triggered by unsupported configuration of not matching the source and mount hosts OS version.

解决方案

In this case, user was on Higher Source Host version (RHEL 8) and in lower Mount host version (RHEL 7.9). User made a new mount host matching to Source host and Service Plan ran fine.

其他信息

After doing some google search, it seem to be an issue with XFS v5 filesystem. Some of the important points are:

a) XFS filesystem is using XFS v5 (as per the dmesg logs) and contains features not supported by the RHEL7 kernel.

b) As per RHEL https://access.redhat.com/solutions/4582401, we need to create the filesystem without the reflink feature to use a XFS filesystem in both RHEL 7 and RHEL 8. Customer is on RHEL 7.9. mkfs.xfs -m reflink=0 /dev/sdN

To avoid the error, “-m reflink=0” is needed which disables the incompatible copy-on-right reflink support.

Source:- https://www.humblec.com/ceph-csi-xfs-superblock-has-unknown-read-only-or-wrong-fs-type-bad-on-dev-rbd4-missing-codepage-or/

c) mkfs.xfs (starting with version 3.2.4 of xfsprogs) recently defaulted to version 5 superblock, with lots of new enhancements like metadata CRC checksums. Version 5 superblock requires a 3.16 kernel or better. This error is typical, you’re trying to mount the volume on a kernel which doesn’t support v5 superblocks, i. e. with a version prior to 3.16.

Be careful, when using recent versions of xfsprogs with older kernels. You’ll have to use these options to create a v4 filesystem: mkfs.xfs -m crc=0,finobt=0 /your/device