[Libguestfs] [PATCH 4/5] daemon: lvm: list PVs/VGs/LVs with --foreign

Pino Toscano ptoscano at redhat.com
Tue Jul 26 16:47:06 UTC 2016


On Tuesday, 26 July 2016 16:59:34 CEST Richard W.M. Jones wrote:
> On Tue, Jul 26, 2016 at 05:41:28PM +0200, Pino Toscano wrote:
> > The appliance has no LVM system ID set, which means that lvm commands
> > will ignore VGs with a system ID set to anything.  Since we want to work
> > with them, pass --foreign at least when listing them to see them.
> > 
> > See also lvmsystemid(7).
> 
> This is sort of a hack, if I'm understanding correctly.

Yes and no -- it's the only way we can deal with VGs with any system ID
set (which currently are not seen at all).

> Can we not instead give the appliance a "system ID"?

This would be problematic, since new VGs would take the system ID of
the appliance, making them tied to that specific ID; on the other hand,
creating a VG from a LVM with no system ID set means it will be seen on
any LVM, regardless of their system ID.

> Also, lvm(8) says:
> 
>        --foreign
>               Cause the command to access foreign VGs, that would otherwise be
>               skipped.  It can be used to report or display a VG that is owned
>               by  another  host.   This  option can cause a command to perform
>               poorly because lvmetad caching is not used and metadata is  read
>               from disks.
> 
> which sounds bad.

No solution about this yet.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20160726/e9bce471/attachment.sig>


More information about the Libguestfs mailing list