root@Tower:/mnt/user/domains/centos7gnome# lvdisplay
WARNING: Device /dev/nbd0p2 has size of 60815360 sectors which is smaller than corresponding PV size of 209713152 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG centos have changed sizes.
— Logical volume —
LV Path /dev/centos/swap
LV Name swap
VG Name centos
LV UUID PzmI1T-EsXO-EODD-B2gf-1ks2-4D3W-JUURGB
LV Write Access read/write
LV Creation host, time localhost, 2022-02-19 15:39:45 +0800
LV Status available
open 0
LV Size 3.00 GiB
Current LE 768
Segments 1
Allocation inherit
Read ahead sectors auto
— Logical volume —
LV Path /dev/centos/root
LV Name root
VG Name centos
LV UUID CUedtr–rcMs-kH1t-WnMS-oIy1-j07P-2i3vyI
LV Write Access read/write
LV Creation host, time localhost, 2022-02-19 15:39:45 +0800
LV Status NOT available
LV Size <97.00 GiB
Current LE 24831
Segments 1
Allocation inherit
Read ahead sectors auto
root@Tower:/mnt/user/domains/centos7gnome# lvchange -a y /dev/centos/root
WARNING: Device /dev/nbd0p2 has size of 60815360 sectors which is smaller than corresponding PV size of 209713152 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG centos have changed sizes.
device–mapper: reload ioctl on (254:1) failed: Invalid argument
lsblk
nbd0 43:0 0 110G 0 disk
├─nbd0p1 43:1 0 1G 0 part
└─nbd0p2 43:2 0 45.6G 0 part
#下面的警告是因为创建的PV在 分区2上,但是PV却比分区大,所以报警
root@ubuntu20:~# lvdisplay
WARNING: Device /dev/nbd0p2 has size of 189307051 sectors which is smaller than corresponding PV size of 220198912 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG centos have changed sizes.
— Logical volume —
LV Path /dev/centos/root
LV Name root
VG Name centos
LV UUID CUedtr-rcMs-kH1t-WnMS-oIy1-j07P-2i3vyI
LV Write Access read/write
LV Creation host, time localhost, 2022-02-19 15:39:45 +0800
LV Status NOT available
LV Size <97.00 GiB