[root@localhost ~]# partx --help
Usage:
partx [-a|-d|-s|-u] [--nr <n:m> | <partition>] <disk>
Options:
-a, --add add specified partitions or all of them
-d, --delete delete specified partitions or all of them
-s, --show list partitions
-u, --update update specified partitions or all of them
-b, --bytes print SIZE in bytes rather than in human readable format
-g, --noheadings don't print headings for --show
-n, --nr <n:m> specify the range of partitions (e.g. --nr 2:4)
-o, --output <type> define which output columns to use
-P, --pairs use key="value" output format
-r, --raw use raw output format
-t, --type <type> specify the partition type (dos, bsd, solaris, etc.)
-v, --verbose verbose mode
-h, --help display this help and exit
-V, --version output version information and exit
Available columns (for --show, --raw or --pairs):
NR partition number
START start of the partition in sectors
END end of the partition in sectors
SECTORS number of sectors
SIZE human readable size
NAME partition name
UUID partition UUID
TYPE partition type hex or uuid
FLAGS partition flags
SCHEME partition table type (dos, gpt, ...)
For more details see partx(8).
1234
partx命令:
-a 设备: 登记某块盘上的所有分区信息。如果分区信息有记录,则报错。
-d 设备: 删除内核中关于某磁盘的所有分区的记录。(不是卸载)
-s 设备 :显示磁盘的分区信息
通过partx工具让内核重读磁盘分区表信息:
1234567
partx -d /dev/sdb #因为内核中存在部分未调整磁盘的信息,故先将所有信息清零
partx -a /dev/sdb #添加调整后的磁盘分区信息
partx -s /dev/sdb #显示磁盘分区信息
NR START END SECTORS SIZE NAME UUID
1 2048 2099199 2097152 1G
2 2099200 419430399 417331200 199G
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:
123
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.
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
Failed to start Remount Root and Kenal File System
可以通过xfs_repair命令进行修复。
1234567891011121314151617
[root@localhost ~]# xfs_repair
Usage: xfs_repair [options] device
Options:
-f The device is a file
-L Force log zeroing. Do this as a last resort.
-l logdev Specifies the device where the external log resides.
-m maxmem Maximum amount of memory to be used in megabytes.
-n No modify mode, just checks the filesystem for damage.
-P Disables prefetching.
-r rtdev Specifies the device where the realtime section resides.
-v Verbose output.
-c subopts Change filesystem parameters - use xfs_admin.
-o subopts Override default behaviour, refer to man page.
-t interval Reporting interval in seconds.
-d Repair dangerously.
-V Reports version and exits.