[SOLVED] Path to LMV thin

f.yakhyaev

Member
Sep 4, 2019
45
3
8
34
Hi all.
I created a VM and placed the disks on the LVM. Look screen.
Which path can I find these disks?
Thanks for answer.

2019-11-05_09-50-17.png
 
The fastes to get the real path is to go to the command line (SSH or web console) and execute:
Code:
pvesm path local-lvm:vm-100-disk-0

It probably will point you to /dev/local-lvm/vm-100-disk-0, I'd guess.
 
The fastes to get the real path is to go to the command line (SSH or web console) and execute:
Code:
pvesm path local-lvm:vm-100-disk-0

It probably will point you to /dev/local-lvm/vm-100-disk-0, I'd guess.
I executed the command: pvesm path local-lvm:vm-100-disk-0
Output: /dev/pve/vm-100-disk-0
But in this path the file size 7 bytes. screen

2019-11-05_11-09-18.png
 
To the same storage?

Code:
dd if=/dev/pve/vm-100-disk-0 of=/path/to/target bs=4096 conv=fsync

For the target path you need to create a LV first. simplest could be using the Webinterface to create a disk, with the same size as the one you want to copy, then use the new disk volume ID to get it's path and use that as "of=..." in above command.

Else, you can also use things like lvcreate if you're more familiar with that.

A full VM clone could also be easier. You can then delete other this, if not needed anymore, etc...
 
To the same storage?
No, another storage. expamle: /vm-data1/VM/ (mounting /dev/sdb)


Code:
dd if=/dev/pve/vm-100-disk-0 of=/path/to/target bs=4096 conv=fsync

For the target path you need to create a LV first. simplest could be using the Webinterface to create a disk, with the same size as the one you want to copy, then use the new disk volume ID to get it's path and use that as "of=..." in above command.

I agree with you.

Else, you can also use things like lvcreate if you're more familiar with that.

I'll read it later.


A full VM clone could also be easier. You can then delete other this, if not needed anymore, etc...

I understood.
Thank you for answer.
Have a nice day.
 
  • Like
Reactions: t.lamprecht
Note, you could mount the respective path "pvesm" outputs also on the host if the filesystem on it is something Linux can understand, but only if the VM it belongs to is not running.
E.g.:
Code:
mkdir /mnt/vm-disk-tmp
mount /dev/pve/vm-100-disk-0  /mnt/vm-disk-tmp
ls /mnt/vm-disk-tmp/

You can then access the contents of the VM disk and copy some files only, if you want. After youre done ensure that you do:
Code:
umount /mnt/vm-disk-tmp
before you start the VM again.
 
  • Like
Reactions: f.yakhyaev
Note, you could mount the respective path "pvesm" outputs also on the host if the filesystem on it is something Linux can understand, but only if the VM it belongs to is not running.
E.g.:
Code:
mkdir /mnt/vm-disk-tmp
mount /dev/pve/vm-100-disk-0  /mnt/vm-disk-tmp
ls /mnt/vm-disk-tmp/

Ok. I try
You can then access the contents of the VM disk and copy some files only, if you want. After youre done ensure that you do:
Code:
umount /mnt/vm-disk-tmp
before you start the VM again.
Of course.
 

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!