proxmox snapshot not showing in dmsetup

oah433

Member
Apr 8, 2021
31
1
8
40
Hi
I am wondering about the mechanism of snap-shots in proxmox. At the moment, the resulting snap is of type "V" (virtual device as shown in the attribute bits of lvs command below) and not the usual "s" (snapshot) also the resulting "snap shot device" only shows in the "lvs" command but doesn't appear in the "lsblk" or "dmsetup status" as shown below:
Note: as you can see below "snap_vm-102-disk-0_ubunto0" which is the snapshot taken via the proxmox GUI appears only one time in the lvs command output.
Also the first bit of the attribute bit for "vm-102-disk-0" is showing as "V" and not "o" which happens after you do the usual snapshot in LVM.
1676467126866.png

Any idea on what is happening? and what is the thought process behind having the snapshot output in "V" and not in "s"?
Also is there any way to view the resulting "V" device in lsblk, how to make it appear? and how to make it appear also in "dmsetup status".
Thx.
 
Hi,
i guess for LVM-thin the snapshot mechanism is a bit different than for LVM. You get an independent LV that does not depend on the original anymore. Extents in a thin pool are only freed when no volume references them anymore, so you can remove the original without removing the snapshot. That explains the first bits.

For how the snapshot is created, see here: https://git.proxmox.com/?p=pve-stor...71389a5faa34933a8bd41723f1c76a16;hb=HEAD#l326

I think the snapshot does not show up with dmsetup and lsblk, because it's not active. Snaphsots should be kept immutable and there's no real need to have it activated.
 
can I just say THANK YOOOU. Now it makes much more sense. I will deep-dive into the repo and get back to you.
 

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!