From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Read LVM structure of a virtual machine disk image
Date: Mon, 30 Jun 2014 11:30:46 +0200 [thread overview]
Message-ID: <53B12E46.4000605@redhat.com> (raw)
In-Reply-To: <F5727D08-8B60-4ADC-841F-D2ADD60D5033@gmail.com>
Dne 30.6.2014 10:36, Matteo Lanati napsal(a):
> Hi all,
>
> I have a file containing a disk image of a virtual machine. One of the partitions is LVM.
> I would like to read the information in there (i.e. the volume group name or the list of logical volumes) from the file itself without exposing the device through kpartx and/or qemu-nbd.
> My problem is that on the same physical host I could have multiple copies of the same virtual machine running, using same VGs and LVs. Even the UUID would be the same, hence the impossibility to distinguish the two virtual machines anymore.
> Of course, if I could check beforehand the structure of the disk image I could take a different decision and avoid errors.
> Thanks,
That's why there is a 'filter' setting in your lvm.conf.
You may set different device filter for each lvm command.
You could either use '--config' option with each lvm command where you set
your filter to view only given device - or eventually with latest versions you
may try to use profiles.
It's a users' fault to pass multiple same devices to lvm - it's mandatory to
use different UUIDs, and it's upto user to choose how to achieve it. There is
no way for lvm2 to resolve this inconsistency in come 'always-be-smart' way...
Zdenek
next prev parent reply other threads:[~2014-06-30 9:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-30 8:36 [linux-lvm] Read LVM structure of a virtual machine disk image Matteo Lanati
2014-06-30 9:30 ` Zdenek Kabelac [this message]
2014-06-30 15:10 ` Matteo Lanati
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53B12E46.4000605@redhat.com \
--to=zkabelac@redhat.com \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).