Filesystem Type SizeUsed Avail Use% Mounted on
devtmpfs devtmpfs2.0G 02.0G 0% /dev
tmpfs tmpfs 2.0G 02.0G 0% /dev/shm
tmpfs tmpfs 2.0G9.0M2.0G 1% /run
tmpfs tmpfs 2.0G 02.0G 0% /sys/fs/cgroup
/dev/mapper/centos-root xfs 85G1.6G 83G 2% /
/dev/vda1 xfs 1.1G201M863M19% /boot
tmpfs tmpfs 398M 0398M 0% /run/user/0 # growpart /dev/sda 2
CHANGED: partition=2 start=1026048 old: size=61884492 end=62910540 new: size=82849317,end=83875365
6、resize设备 pv空间大小:
6、Resize device pv space size:
# pvresize /dev/sda2 42G (注:空间大小不能大于fidisk -l 查看到的大小)
Physical volume "/dev/sda2" changed
Failed to read physical volume "42G"
1 physical volume(s) resized / 0 physical volume(s) not resized
# pvresize /dev/sda2
Physical volume "/dev/sda2" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
lvextend -l+100%FREE /dev/mapper/centos-root
Size of logical volume centos/root changed from 2.59 GiB (664 extents) to 78.59 GiB (20120 extents).
Logical volume centos/root successfully resized.
xfs文件系统使用刷新磁盘:
xfs_growfs /dev/mapper/centos-root
meta-data=/dev/mapper/centos-root isize=512 agcount=4, agsize=169984 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=679936, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 679936 to 20602880
页:
[1]