LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 05-12-2017, 07:55 AM   #1
arcadiosincero
LQ Newbie
 
Registered: Apr 2017
Posts: 5

Rep: Reputation: Disabled
KVM: two Guests running on two different Hosts mounting same qcow2 concurrently = corruption?


I have two KVM Guests running on two different Hosts that are mounting the same qcow2 via NFS at the same time. Will this lead to corruption of the qcow2? If so, is there a way to prevent this via some sort of locking mechanism?
 
Old 05-12-2017, 08:10 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
If both mount it read only you should be ok.

Cluster aware filesystems took a long time to develop for a reason. It's called data consistency. Perhaps you shouldn't deliberately circumvent it.
 
Old 05-12-2017, 10:13 AM   #3
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
Why would you want 2 guests to mount the same image at the same time?
 
Old 05-12-2017, 11:37 AM   #4
xamaco
Member
 
Registered: Sep 2009
Location: Bastelicaccia, Corsica
Distribution: Crux
Posts: 48

Rep: Reputation: 7
Have a look at copy on write in the Qemu documentation.
 
Old 05-12-2017, 02:42 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
I don't think this is a qcow issue exactly but a nfs issue. No matter the basic filesystem or mount mechanism the issue is how nfs handles concurrent access. Samba and nfs are both good at that under some limits. The NFSv4.1 has some locks in place but if aggressive database access or other type of programs on it may be a problem.

Last edited by jefro; 05-12-2017 at 02:47 PM.
 
Old 05-12-2017, 05:54 PM   #6
asincero
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by gradinaruvasile View Post
Why would you want 2 guests to mount the same image at the same time?
I don't. I was kind of hoping there was something built in to prevent something stupid like that because mistakes do happen.
 
Old 05-12-2017, 08:11 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Samba and NFS handle SOHO uses of many users just fine.
 
Old 05-13-2017, 12:30 AM   #8
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
Quote:
Originally Posted by asincero View Post
I don't. I was kind of hoping there was something built in to prevent something stupid like that because mistakes do happen.
It depends how you use KVM. I you use 2 standalone servers one has no idea what the other does. If you use some clustering solution where both servers are part of the same cluster then you may manage everything centrally.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Nested KVM set up on Fedora 22 && Running devstack on Ubuntu 14.04 guests LXer Syndicated Linux News 0 04-20-2015 08:11 AM
[SOLVED] Is it safe to cp a qcow2 vdisk for non-running Qemu-KVM instance to back it up? rylan76 Linux - Virtualization and Cloud 2 11-07-2012 04:50 PM
How do use VNC to remote access VM guests running under a KVM? Usalabs Linux - Virtualization and Cloud 6 12-03-2011 02:02 AM
kvm-qemu-img: qcow2 disk image format changes to raw format in RHEL-KVM 5.6 rajivdp Linux - Virtualization and Cloud 2 09-19-2011 11:23 AM
How to resize the qcow2 image in the KVM? rajivdp Linux - Virtualization and Cloud 2 03-23-2011 12:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration