Why can't see lvm snapshot device node on host?

taner

New Member
Nov 24, 2020
2
0
1
43
I am trying to access snapshot device path on host console but lvm snapshot path doesn't exists even though "lvdisplay" clearly says that it exists. What is the proper way to access and use lvm snapshot device path?

Proxmox VE 6.1-5

Code:
# lvdisplay

--- Logical volume ---
  LV Path                /dev/pve/snap_vm-100-disk-0_test
  LV Name                snap_vm-100-disk-0_test
  VG Name                pve
  LV UUID                mm58Up-wqHT-A2g1-P1PR-J1td-9KZJ-5EoIf4
  LV Write Access        read only
  LV Creation host, time pve150-0-155, 2020-11-24 10:54:10 +0300
  LV Pool name           data
  LV Thin origin name    vm-100-disk-0
  LV Status              NOT available
  LV Size                40.00 GiB
  Current LE             10240
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto

# ls -l  /dev/pve/snap_vm-100-disk-0_test
ls: cannot access '/dev/pve/snap_vm-100-disk-0_test': No such file or directory

# dmsetup ls|grep snap
(empty)
 
Last edited:
Hey,

a snapshot in LVM can not be "accessed", it more or less saves changes made to the original LV. So it's not a copy of the LV, but rather a copy of data that has been changed. Therefore the in order to access it, it has to be restored.
You can find a more detailed explanation here: https://www.thomas-krenn.com/en/wiki/LVM_Snapshots_Information
 
Well, LVM snapshots can be "accessed" (for readonly backup purposes for example) as they do represent the state of the LV at the time of snapshot creation. The snapshots created by Proxmox are not made available by default (there may be important reasons for that?) as you can see in the lvdisplay output. They can be made available though with the "lvchange" tool, but I don't know what side effects this has on the Proxmox snapshot lifecycle...

EDIT: ... so be sure to deactivate the snapshot before you let Proxmox do anything with it again.
 
Last edited:
I just wanted to export a stateless snapshot to another format (e.g: vmdk) via qemu-img. I don't need to rw access. I guess LVM is capable of making snapshots available as a regular lvm device.
 

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!