[root@linuxcool ~]# pvresize /dev/sda2
Physical volume "/dev/sda2" changed
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
调整物理卷的容量大小为20GB(需二次确认):
[root@linuxcool ~]# pvresize --setphysicalvolumesize 20G /dev/sda2
WARNING: /dev/sda2: Overriding real size <19.00 GiB. You could lose data.
/dev/sda2: Requested size 20.00 GiB exceeds real size <19.00 GiB. Proceed? [y/n]: y
WARNING: /dev/sda2: Pretending size is 41943040 not 39843840 sectors.
Physical volume "/dev/sda2" changed
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
以测试模式运行,同步物理卷容量为最新大小:
[root@linuxcool ~]# pvresize -t /dev/sda2
TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
WARNING: Device /dev/sda2 has size of 39843840 sectors which is smaller than corresponding PV size of 41940992 sectors. Was device resized?
One or more devices used as PVs in VG rhel_linuxprobe have changed sizes.
Physical volume "/dev/sda2" changed
1 physical volume(s) resized or updated / 0 physical volume(s) not resized