LVM logical volume and rescan/redetect feature

pfoo

Active Member
Jan 21, 2012
29
3
43
Is there any way to force proxmox 2.1 to rescan all logical volume stored in his database ?

My issue is that I created manually a lv using lvcreate and added it manually to the vm (qemu) config file. While the vm boot juste fine (and the disk is accessible), this particular LV is not displayed in proxmox LV list (gui or pvesm list)

For instance :
I created /dev/main/vm-106-disk1 manually.
Code:
# lvdisplay /dev/main/vm-106-disk-1 
  --- Logical volume ---
  LV Path                /dev/main/vm-106-disk-1
  LV Name                vm-106-disk-1
  VG Name                main
  LV UUID                3b4wrk-sEh5-hTcX-iC5q-FqBY-lsnp-sWYoJT
  LV Write Access        read/write
  LV Creation host, time proxmox, 2012-07-15 17:38:55 +0200
  LV Status              available
  # open                 0
  LV Size                30.00 GiB
  Current LE             7680
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4

Here is my vm config file
Code:
# cat /etc/pve/qemu-server/106.conf 
args: -serial unix:/var/run/qemu-server/106.serial,server,nowait
bootdisk: virtio0
cores: 2
ide2: local:iso/rescue_amd64.iso,media=cdrom,size=137M
memory: 1024
name: orion
net0: rtl8139=42:01:22:B8:E6:DF,bridge=vmbr2
ostype: l26
sockets: 1
virtio0: data:vm-106-disk-1,size=30G

And finally, pvesm list
Code:
# pvesm list data
data:vm-100-disk-1   raw 2147483648 100
data:vm-102-disk-1   raw 21474836480 102
data:vm-103-disk-1   raw 53687091200 103
data:vm-104-disk-1   raw 53687091200 104
data:vm-105-disk-1   raw 214748364800 105
As you can see, vm-106-disk-1 is not displayed here.

Is there any way to tell proxmox to redetect all lv, or to add it manually ?

I already tried to disabled/enable the storage, but no luck
 
Last edited:
# cat /etc/pve/storage.cfg
dir: local
path /var/lib/vz
content iso,vztmpl,backup,rootdir

lvm: data
vgname main
content images
nodes proxmox
 
We implemented a new 'qm rescan' command (you need to update to latest available packages, the run

# qm rescan

or (if you want to fix a specific VM)

# qm rescan --vmid <VMID>
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!