kvm虚拟机出现启动不了,NOT available,PV大于分区

kvm虚拟机出现启动不了,NOT available,PV大于分区

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

  • currently set to 256
    Block device 254:0

— 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

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

命令参考
kvm盘更改大小
qemu-img resize vdisk1.img -10G

 modprobe nbd max_part=8
 modinfo nbd
 网络挂载
 qemu-nbd --connect=/dev/nbd0 vdisk1.img
ls /dev/nbd0*

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

Original: https://blog.csdn.net/qq_41847721/article/details/126175752
Author: 金shell
Title: kvm虚拟机出现启动不了,NOT available,PV大于分区

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/813912/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球