Re: convert LV to physical device _in_place_?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 2017-07-13 17:25, schrieb Zdenek Kabelac:
Dne 13.7.2017 v 15:25 Matthias Leopold napsal(a):
hi,

i'm fiddling around with LVM backed KVM raw disks, that i want to use _directly_ in oVirt virtualization (as "Direct LUN"). i would like to avoid "importing", dd, etc. if possible. in the KVM origin system exists a mapping of one iSCSI whole device (no partitions) to one PV to one VG to one LV per KVM disk. i can now present these iSCSI devices to the oVirt hosts, where i can only use them as "Direct LUN" without the LVM layer (i guess). so all i would need is to remove the LVM metadata from the iSCSI device preserving the "content" of the LV. pvremove seems to be too "intrusive" for this... i know this sounds rather naive and i didn't find any recipes for it. everybody talks about dd to a new device, which of course works (i tried it), but is exactly what i want to avoid when migrating very large disks (TB). i hope someone understands my concern and maybe has a solution



Hi

Yep, it really sounds a bit naive :)

PV has 'header' so the real 'data' are shifted by PV header+lvm2 metadata.
and also LV does not need to be sequential.

However if you have been having a single 'segment' LV and and you calculate
proper skipping offset (typically 1MB) you can try to use such device
directly without lvm2 with a loop device mapping -  see losetup
--offset option - but you would need to use this everytime you want to
access such storage - so there is not a single magic 'flip' which
would make an LV to appear like
regular device.

Regards

Zdenek

Hi Zdenek,

thanks for explaining. I practically knew it was impossible when i wrote it, but sometimes i get carried away by fixed ideas and need someone "authoritative" to tell me the obvious (with maybe a little technical background)... you did the job ;-)

Regards

matthias

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/



[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux