我的服务器上连接了 2 个磁盘,一个是固定的,另一个可以扩展。我将这些磁盘添加到卷组中,并在其上安装了 LVM 和 Linux。当我想增加卷组的空间时,我会扩展其中一个磁盘并在其上创建一个新分区,然后扩展 vg。
fdisk /dev/sda -> create a new partition (number 2) of type LVM (8E)
pvcreate /dev/sda2
vgextend vg0 /dev/sda2
lvextend -l +100%FREE /dev/vg0/root
然后我使用以下命令扩展文件系统
resize2fs /dev/vg0/root
但它说:“请先运行‘e2fsck -f /dev/vg0/root’。”
当我运行该命令时,出现以下冲突
e2fsck 1.47.0 (5-Feb-2023)
/dev/vg0/root: recovering journal
Clearing orphaned inode 131099 (uid=113, gid=119, mode=0100660, size=0)
Clearing orphaned inode 131098 (uid=113, gid=119, mode=0100660, size=0)
Clearing orphaned inode 131097 (uid=113, gid=119, mode=0100660, size=0)
Clearing orphaned inode 131096 (uid=113, gid=119, mode=0100660, size=0)
Clearing orphaned inode 131095 (uid=0, gid=0, mode=0100666, size=0)
Clearing orphaned inode 131094 (uid=0, gid=0, mode=0100666, size=0)
Clearing orphaned inode 131093 (uid=0, gid=0, mode=0100666, size=0)
Clearing orphaned inode 131092 (uid=0, gid=0, mode=0100666, size=0)
Clearing orphaned inode 131091 (uid=0, gid=0, mode=0100666, size=0)
Clearing orphaned inode 131090 (uid=0, gid=0, mode=0100666, size=0)
Clearing orphaned inode 131088 (uid=0, gid=0, mode=0100666, size=0)
Clearing orphaned inode 131087 (uid=0, gid=0, mode=0100666, size=0)
Clearing orphaned inode 131086 (uid=0, gid=0, mode=0100666, size=0)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (74047853, counted=74043700).
Fix<y>?
如果我继续修复所有问题,它就会起作用,但我不确定这是否正常或者我做错了什么。
你知道我为什么会有这些冲突吗?任何帮助我都会很感激。