importing a drive from another disk

William C

New Member
Nov 25, 2022
19
5
3
I had three hard drives, lets call them A and B and C

I had proxmox installed on drive A with a macos guest , and i created an lvm thin on drive B with a time machine backup.

i decide proxmox wasnt working for me so reinstalled macos directly to drive a. I thought it would be straight forward to access the lvm filesystem/image on drive B. i thought i would mount an ext4 file system , then see some files which i could find some program to import/read , but this was not so .

I installed a clean install of proxmox on drive C with drive B connected also. I can at least now see that drive B contains my data but not sure how to assign the drive/lvm/ to one of my existing VMs 100 or 102

i think its going to be some kind of qm import command but not sure of the syntax

to clarify in case anyone suggests, i cant see drive b drives as 'unused drives' because i didnt create those drive from this proxmox install. they were created from the prox mox install i made initially on drive A . they were obviously then accesible from one of the vm's on that install

Capture2.PNG


Capture1.PNG


this info may be necessary and helpful for someone replying

--- Logical volume ---
LV Path /dev/TimeM/vm-100-disk-0
LV Name vm-100-disk-0
VG Name TimeM
LV UUID sCjLLX-Y3zg-yoGH-wvOJ-aR9Q-3HdG-TziwAf
LV Write Access read/write
LV Creation host, time macos, 2024-04-14 13:21:16 +0100
LV Pool name TimeM
LV Status available
# open 0
LV Size 950.00 GiB
Mapped size 67.02%
Current LE 243200
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:15
 
Last edited:
you need to add the storage entry for the LVM thin pool on the TimeM volume group (Datacenter -> Storage -> Add -> ...). then you can use the import-from feature on a disk (e.g., scsi0) when creating or updating a VM using "qm create" or "qm set". the syntax in that case is

--scsi0 TARGETSTORAGE:0,import-from:SOURCESTORAGE:VOLUMEID,OTHEROPTIONS

for example:

--scsi0 somestorage:0,import-from=otherstorage:vm-XXX-disk-1,backup=1

or, you can create a VM with the same ID as the one that "owns" the volume, and then run "qm rescan" so that the disks owned by that VM show up as unused disks that you can re-attach, if you don't want to copy them, but use them as they are.
 

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!