shared LVM storage between KVM virtuals
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I'm messing around with KVM and different storage options for sharing between virtual machines. I have an LVM volume group defined as a storage pool for libvirt
. I've defined a volume and attached it to two test VMs as a virtio disk. Here's virsh dumpxml
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/kvm_storage/vm_shared'/>
<target dev='vda' bus='virtio'/>
<shareable/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
I can read/write files, but they do not stay in sync between the two virtuals unless I unmount then remount. Is this even supported?
kvm qemu
add a comment |Â
up vote
2
down vote
favorite
I'm messing around with KVM and different storage options for sharing between virtual machines. I have an LVM volume group defined as a storage pool for libvirt
. I've defined a volume and attached it to two test VMs as a virtio disk. Here's virsh dumpxml
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/kvm_storage/vm_shared'/>
<target dev='vda' bus='virtio'/>
<shareable/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
I can read/write files, but they do not stay in sync between the two virtuals unless I unmount then remount. Is this even supported?
kvm qemu
I built I high availability system, albeit several years ago, using two machines sharing a volume group. Our caveat was that only one machine could import and make active the volume group at a time. Don't recall if the second could be made read only or not. I would suggest one serve via nfs or samba and the other use,mount as client.
â bsd
Aug 7 '13 at 11:38
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm messing around with KVM and different storage options for sharing between virtual machines. I have an LVM volume group defined as a storage pool for libvirt
. I've defined a volume and attached it to two test VMs as a virtio disk. Here's virsh dumpxml
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/kvm_storage/vm_shared'/>
<target dev='vda' bus='virtio'/>
<shareable/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
I can read/write files, but they do not stay in sync between the two virtuals unless I unmount then remount. Is this even supported?
kvm qemu
I'm messing around with KVM and different storage options for sharing between virtual machines. I have an LVM volume group defined as a storage pool for libvirt
. I've defined a volume and attached it to two test VMs as a virtio disk. Here's virsh dumpxml
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/kvm_storage/vm_shared'/>
<target dev='vda' bus='virtio'/>
<shareable/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
I can read/write files, but they do not stay in sync between the two virtuals unless I unmount then remount. Is this even supported?
kvm qemu
kvm qemu
edited Aug 7 '13 at 3:56
Freedom_Ben
74421319
74421319
asked Aug 6 '13 at 23:42
Pete
219210
219210
I built I high availability system, albeit several years ago, using two machines sharing a volume group. Our caveat was that only one machine could import and make active the volume group at a time. Don't recall if the second could be made read only or not. I would suggest one serve via nfs or samba and the other use,mount as client.
â bsd
Aug 7 '13 at 11:38
add a comment |Â
I built I high availability system, albeit several years ago, using two machines sharing a volume group. Our caveat was that only one machine could import and make active the volume group at a time. Don't recall if the second could be made read only or not. I would suggest one serve via nfs or samba and the other use,mount as client.
â bsd
Aug 7 '13 at 11:38
I built I high availability system, albeit several years ago, using two machines sharing a volume group. Our caveat was that only one machine could import and make active the volume group at a time. Don't recall if the second could be made read only or not. I would suggest one serve via nfs or samba and the other use,mount as client.
â bsd
Aug 7 '13 at 11:38
I built I high availability system, albeit several years ago, using two machines sharing a volume group. Our caveat was that only one machine could import and make active the volume group at a time. Don't recall if the second could be made read only or not. I would suggest one serve via nfs or samba and the other use,mount as client.
â bsd
Aug 7 '13 at 11:38
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
3
down vote
accepted
You need an clustered file system.
I do not know what filesystem you are using. But with a standard file system this is not possible and has nothing to do KVM or LVM.
An other solution would be to use a network filesystem like nfs
or cifs
.
add a comment |Â
up vote
1
down vote
You have to use those levels :
On physical Host :
- KVM level : second disk for VM marked as "Shared storage" in Virt-manager properties (only disk type "raw" is supported. qcow2 is not supported as "shareable" in vm disk edit screen and virt-manager will not allow you to click "apply" when you tick the "shareable" box)
On VMs :
- level 0 : DLM (like disk logical management I think) # service dlm start ; Linux packages to install
- level 1 : LVM management
- level 2 : GFS2 filesystem formatted on your LVM logical volume
add a comment |Â
up vote
0
down vote
A disk used by a vm at the same time.Otherwise,the filesystem on the disk will be damaged!
You can use NAS/NFS/SMB etc network filesystem to share files.
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
You need an clustered file system.
I do not know what filesystem you are using. But with a standard file system this is not possible and has nothing to do KVM or LVM.
An other solution would be to use a network filesystem like nfs
or cifs
.
add a comment |Â
up vote
3
down vote
accepted
You need an clustered file system.
I do not know what filesystem you are using. But with a standard file system this is not possible and has nothing to do KVM or LVM.
An other solution would be to use a network filesystem like nfs
or cifs
.
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
You need an clustered file system.
I do not know what filesystem you are using. But with a standard file system this is not possible and has nothing to do KVM or LVM.
An other solution would be to use a network filesystem like nfs
or cifs
.
You need an clustered file system.
I do not know what filesystem you are using. But with a standard file system this is not possible and has nothing to do KVM or LVM.
An other solution would be to use a network filesystem like nfs
or cifs
.
answered Aug 7 '13 at 7:48
dor
1013
1013
add a comment |Â
add a comment |Â
up vote
1
down vote
You have to use those levels :
On physical Host :
- KVM level : second disk for VM marked as "Shared storage" in Virt-manager properties (only disk type "raw" is supported. qcow2 is not supported as "shareable" in vm disk edit screen and virt-manager will not allow you to click "apply" when you tick the "shareable" box)
On VMs :
- level 0 : DLM (like disk logical management I think) # service dlm start ; Linux packages to install
- level 1 : LVM management
- level 2 : GFS2 filesystem formatted on your LVM logical volume
add a comment |Â
up vote
1
down vote
You have to use those levels :
On physical Host :
- KVM level : second disk for VM marked as "Shared storage" in Virt-manager properties (only disk type "raw" is supported. qcow2 is not supported as "shareable" in vm disk edit screen and virt-manager will not allow you to click "apply" when you tick the "shareable" box)
On VMs :
- level 0 : DLM (like disk logical management I think) # service dlm start ; Linux packages to install
- level 1 : LVM management
- level 2 : GFS2 filesystem formatted on your LVM logical volume
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You have to use those levels :
On physical Host :
- KVM level : second disk for VM marked as "Shared storage" in Virt-manager properties (only disk type "raw" is supported. qcow2 is not supported as "shareable" in vm disk edit screen and virt-manager will not allow you to click "apply" when you tick the "shareable" box)
On VMs :
- level 0 : DLM (like disk logical management I think) # service dlm start ; Linux packages to install
- level 1 : LVM management
- level 2 : GFS2 filesystem formatted on your LVM logical volume
You have to use those levels :
On physical Host :
- KVM level : second disk for VM marked as "Shared storage" in Virt-manager properties (only disk type "raw" is supported. qcow2 is not supported as "shareable" in vm disk edit screen and virt-manager will not allow you to click "apply" when you tick the "shareable" box)
On VMs :
- level 0 : DLM (like disk logical management I think) # service dlm start ; Linux packages to install
- level 1 : LVM management
- level 2 : GFS2 filesystem formatted on your LVM logical volume
edited Sep 3 at 13:09
Costin GuÃÂÃÂ
2051310
2051310
answered Apr 27 '17 at 10:27
Gouny
111
111
add a comment |Â
add a comment |Â
up vote
0
down vote
A disk used by a vm at the same time.Otherwise,the filesystem on the disk will be damaged!
You can use NAS/NFS/SMB etc network filesystem to share files.
add a comment |Â
up vote
0
down vote
A disk used by a vm at the same time.Otherwise,the filesystem on the disk will be damaged!
You can use NAS/NFS/SMB etc network filesystem to share files.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
A disk used by a vm at the same time.Otherwise,the filesystem on the disk will be damaged!
You can use NAS/NFS/SMB etc network filesystem to share files.
A disk used by a vm at the same time.Otherwise,the filesystem on the disk will be damaged!
You can use NAS/NFS/SMB etc network filesystem to share files.
answered Aug 13 '13 at 7:28
Edward Shen
64237
64237
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f85768%2fshared-lvm-storage-between-kvm-virtuals%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I built I high availability system, albeit several years ago, using two machines sharing a volume group. Our caveat was that only one machine could import and make active the volume group at a time. Don't recall if the second could be made read only or not. I would suggest one serve via nfs or samba and the other use,mount as client.
â bsd
Aug 7 '13 at 11:38