[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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

On 08/02/2012 07:09 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange 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.


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

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]