LinuxQuestions.org
Help answer threads with 0 replies.
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, 08: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, 09:10 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,178

Rep: Reputation: 2629Reputation: 2629Reputation: 2629Reputation: 2629Reputation: 2629Reputation: 2629Reputation: 2629Reputation: 2629Reputation: 2629Reputation: 2629Reputation: 2629
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, 11:13 AM   #3
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

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

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

Rep: Reputation: 2781Reputation: 2781Reputation: 2781Reputation: 2781Reputation: 2781Reputation: 2781Reputation: 2781Reputation: 2781Reputation: 2781Reputation: 2781Reputation: 2781
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 03:47 PM.
 
Old 05-12-2017, 06: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, 09:11 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 18,576

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

Rep: Reputation: 155Reputation: 155
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09: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 05:50 PM
How do use VNC to remote access VM guests running under a KVM? Usalabs Linux - Virtualization and Cloud 6 12-03-2011 03: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 12:23 PM
How to resize the qcow2 image in the KVM? rajivdp Linux - Virtualization and Cloud 2 03-23-2011 01:26 PM

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

All times are GMT -5. The time now is 05:46 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration