View previous topic :: View next topic |
Author |
Message |
1clue Advocate

Joined: 05 Feb 2006 Posts: 2569
|
Posted: Tue Apr 05, 2016 4:31 am Post subject: LVM partition as kvm guest disk: How to format? |
|
|
Hi,
I have an lvm volume /dev/hddvg1/guest1_vda which will be used as a kvm guest disk. Meaning it has partitions made by gdisk.
I can't figure out how to format /dev/hddvg1/guest1_vda1 and _vda2 from the host. The host does not see individual partitions created on the LVM "disk."
Can anyone give a hint? All I get from google is how to format an lvm as a partition, not as a disk.
Thanks. |
|
Back to top |
|
 |
irafiral n00b

Joined: 31 Jan 2005 Posts: 29 Location: Germany
|
Posted: Tue Apr 05, 2016 8:01 am Post subject: |
|
|
I have never done this, but I guess you can use a loop device.
losetup -f --show /dev/hddvg1/guest1_vda
mkfs /dev/loop??? |
|
Back to top |
|
 |
frostschutz Advocate


Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Tue Apr 05, 2016 11:13 am Post subject: |
|
|
You could use `losetup --find --show --partscan` or `kpartx` (multipath-tools) to make partitions available to the host. |
|
Back to top |
|
 |
1clue Advocate

Joined: 05 Feb 2006 Posts: 2569
|
Posted: Tue Apr 05, 2016 3:45 pm Post subject: |
|
|
Did all that from both of you, and it worked.
Thanks. |
|
Back to top |
|
 |
|