Re: FYI: Notes on setting up KVM guests using iSCSI

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

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.
> >
> 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 :-)

|: Red Hat, Engineering, London    -o- :|
|: -o- -o- :|
|:        -o- :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

[Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux