[libvirt] [PATCH] Add APIs for obtaining the unique ID of LVM & SCSI volumes

Eric Blake eblake at redhat.com
Mon Aug 6 20:16:39 UTC 2012


On 08/02/2012 07:09 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> Both LVM volumes and SCSI LUNs have a globally unique
> identifier associated with them. It is useful to be able
> to query this identifier to then perform disk locking,
> rather than try to figure out a stable pathname.
> ---
>  src/util/storage_file.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++
>  src/util/storage_file.h |  3 ++
>  2 files changed, 96 insertions(+)
> 
> +#ifdef HAVE_UDEV
> +const char *virStorageFileGetSCSIKey(const char *path)
> +{
> +    char *key = NULL;
> +    virCommandPtr cmd = virCommandNewArgList(
> +        "/lib/udev/scsi_id",

Are we okay hard-coding the name of this utility, or should it be
learned during configure?  At any rate, changing that can be an
incremental improvement later.

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120806/1397732d/attachment-0001.sig>


More information about the libvir-list mailing list