有个centos8.1的系统,扩展根分区时报错xfs_growfs: /dev/mapper/cl-root is not a mounted XFS filesystem
[root@gsdb ~]# more /etc/redhat-release
CentOS Linux release 8.1.1911 (Core)
[root@gsdb ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 16G 0 16G 0% /dev
tmpfs tmpfs 16G 0 16G 0% /dev/shm
tmpfs tmpfs 16G 9.0M 16G 1% /run
tmpfs tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/mapper/cl-root xfs 36G 16G 21G 43% /
/dev/vda1 ext4 976M 170M 740M 19% /boot
tmpfs tmpfs 60M 0 60M 0% /var/log/rtlog
tmpfs tmpfs 3.2G 4.0K 3.2G 1% /run/user/0
[root@gsdb ~]# xfs_info /dev/mapper/cl-root
meta-data=/dev/mapper/cl-root isize=512 agcount=4, agsize=2333696 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=9334784, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=4558, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@gsdb ~]# xfs_growfs /dev/mapper/cl-root
xfs_growfs: /dev/mapper/cl-root is not a mounted XFS filesystem
[root@gsdb ~]# xfs_growfs /
meta-data=/dev/mapper/cl-root isize=512 agcount=4, agsize=2333696 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=9334784, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=4558, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 9334784 to 26214400
[root@gsdb ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 16G 0 16G 0% /dev
tmpfs tmpfs 16G 0 16G 0% /dev/shm
tmpfs tmpfs 16G 9.0M 16G 1% /run
tmpfs tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/mapper/cl-root xfs 100G 16G 85G 16% /
/dev/vda1 ext4 976M 170M 740M 19% /boot
tmpfs tmpfs 60M 0 60M 0% /var/log/rtlog
tmpfs tmpfs 3.2G 4.0K 3.2G 1% /run/user/0
[root@gsdb ~]# rpm -qa |grep xfs
xfsprogs-5.0.0-1.el8.x86_64
xfsdump-3.1.8-2.el8.x86_64
可能原因时xfs_growfs不同版本之前的问题。新版的xfs_growfs命令后面的参数需要为文件系统挂载点,而非文件系统本身。
xfs_growfs是xfsprogs软件包中的一个命令,用于扩展xfs文件系统。
在RHEL / CentOS系统上: # yum install xfsprogs