Re: [PATCH 3/3] Support automatic creation of leases for disks in sanlock

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

 



On Fri, Jun 17, 2011 at 01:38:21PM +0100, Daniel P. Berrange wrote:
> To make use of this capability the admin will need todo
> several tasks:
> 
>  - Mount an NFS volume (or other shared filesystem)
>    on /var/lib/libvirt/sanlock
>  - Configure 'host_id' in /etc/libvirt/qemu-sanlock.conf
>    with a unique value for each host with the same NFS
>    mount
>  - Toggle the 'auto_disk_leases' parameter in qemu-sanlock.conf

I guess the all hosts are expected to have a consistent libvirt
configuration also.  Is there any suggested approach for doing that in an
ad hoc environment?  Could you use the shared file system for that
somehow?

> +            if ((rv = sanlock_direct_init(&ls, NULL, 0, driver->maxHosts, 0)) < 0) {
> +            if ((rv = sanlock_direct_init(NULL, res, driver->maxHosts, driver->maxHosts, 0)) < 0) {

You should use 0 as the third arg for sanlock_direct_init().  sanlock
names the third arg max_hosts and the fourth arg num_hosts.  sanlock's
max_hosts is mostly useless and should always be 0 which will cause
sanlock to use the default of 2000.

> +# Each additional host requires 1 sector of disk space, usually
> +# 512 bytes. The default is 64, and can be reduced if you don't
> +# have many hosts, or increased if you have more.
> +#
> +#max_hosts = 64

This becomes libvirt's maxHosts and sanlock's num_hosts.  The default of
64 seems fine.  I'm struggling a bit with what to say in the comment.  It
doesn't affect the amount of disk space allocated, and there's little
reason to ever make it smaller.  I think the comment could just say to
increase it if there are more than 64 hosts.

> +# The unique ID for this host.
> +#
> +# IMPORTANT: *EVERY* host which can access the filesystem mounted
> +# at 'disk_lease_dir' *MUST* be given a different host ID.
> +#
> +# This parameter has no default and must be manually set if
> +# 'auto_disk_leases' is enabled
> +#host_id = 1

You could say the valid range of numbers here is 1 to the max_hosts value
above (64).

Dave

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]