[libvirt-users] FYI: Notes on setting up KVM guests using iSCSI
Daniel P. Berrange
berrange at redhat.com
Wed May 5 12:34:44 UTC 2010
On Wed, May 05, 2010 at 08:09:50AM -0400, Tom Georgoulias wrote:
> On 05/05/2010 07:23 AM, Daniel P. Berrange wrote:
> >DV suggested that we document some libvirt setups using shared storage. I'm
> >not a fan of NFS, so I wrote some blog posts on how to use iSCSI in the
> >context of libvirt + KVM.
>
> Thank you for creating and sharing these.
>
> > http://berrange.com/posts/2010/05/05/provisioning-kvm-virtual-machines-on-iscsi-the-hard-way-part-2-of-2/
>
> I have a question about this example, specifically the shareable
> permission option and tag: (perm=sh, <shareable/>)
>
> What does that do, exactly? Is it simply the required r/w option to
> prevent corruption of VMs when using shared storage, or is it needed
> only if the disk will be actively by more than one VM? (That 2nd idea
> doesn't seem quite right to me, I would expect to have to use some kind
> of locking technology to prevent it two or more VMs trying to write to
> the same disk at the same time).
The <shareable/> flag tells libvirt that the disk will be *concurrently*
accessed by multiple VMs. This means that the hypervisor will not try to
take an exclusive lock on the disk, that all I/O caching is disabled,
and any SELinux labelling allows use by all VMs.
NB: if you are marking a disk as <sharable/> you need to know what you
are doing in the guest OS. You would typically use a cluster filesystem
on the disk like GFS or OCFS. Attempts to use a normal FS like ext3
from multiple VMs at once is not healthy for your data :-)
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvirt-users
mailing list