0

I am trying to learn how to use kpartx, and am having some trouble. My end goal is to use nested LVMs for virtual machines, where the VM's "/home" is in one nested LVM and the rest of the VM is on a second nested LVM, so I can use snapshots for /home and /"everythingelse".

When I issue "kpartx -av /dev/vg2/LVM1", I get no output including no output telling me the name of the new nested LVM. Likewise, no output from "kpartx -l /dev/vg2/LVM1". So without the new nested volume names, I can't mount or create a file system. My best guess is the nested LVMs are not actually being created....

Q: Is there something missing in my Kpartx install (apt-get install kpartx seemed to install as expected)? Does Kpart not work on RAID1 or have problems with Wheezy?

Some description off my environment:

-Encrypted RAID1, LVM, Two volume groups (I'm trying to use Kpartx on vg2), Wheezy; Linux Vserver (VM environment)

Thanks!

Senrabdet
  • 111
  • 1
  • 3
  • 9

1 Answers1

0

first, just to be clear kpartx will detect and present any block device nested in your lv. be it a pv or anotger partition type. Next if your underlying device is encrypted there is no chance kpartx can see anything. Further more, I an not sure I understood your setup, but if do, I doubt this would work. lvm metadata stores the hostname of the machine that created the PV/VG/LV. at some point this might be a problem. I would not try to manage the lv that were created by a guest on the host

alxgomz
  • 1,660