Skip to contentSkip to conversation

one question about virualization and kvm

DISCUSSION Vasiliy Tolstov 2 participants 3 messages Apr 1, 2009 – Apr 9, 2009 KVM

lore
Share & tools
lore
#0 lore raw

Hello!
I have two containers with os linux. All files in /usr and /bin are identical.
Is that possible to mount/bind /usr and /bin to containers? (not copy all files to containers).. ?

P.S. Sorry for bad english and may be stupid question.

Signature · 2 lines
Vasiliy Tolstov <[email protected]>
Selfip.Ru
#1 lore raw
Quoted 5 lines · Vasiliy Tolstov

Hello!
I have two containers with os linux. All files in /usr and /bin are identical.
Is that possible to mount/bind /usr and /bin to containers? (not copy all files to containers).. ?

the problem (and solution) is exactly the same as if they weren't virtual machines, but real machines: use the network.

simply share the directories with NFS and mount them in your initrd scripts (preferably read/only).

other way would be to set a new image file with a copy of the directories, and mount them on both virtual machines. of course, now you MUST mount them as readonly. and you can't change anything there without ummounting from both VMs.

usually it's not worth it, unless you have tens of identical VMs

Signature · 1 line
Javier
#2 lore raw

В Срд, 01/04/2009 в 09:01 -0500, Javier Guerra пишет:

Quoted 13 lines · Vasiliy Tolstov
Quoted 5 lines

Hello!
I have two containers with os linux. All files in /usr and /bin are identical.
Is that possible to mount/bind /usr and /bin to containers? (not copy all files to containers).. ?

the problem (and solution) is exactly the same as if they weren't virtual machines, but real machines: use the network.

simply share the directories with NFS and mount them in your initrd scripts (preferably read/only).

Quoted 7 lines

other way would be to set a new image file with a copy of the directories, and mount them on both virtual machines. of course, now you MUST mount them as readonly. and you can't change anything there without ummounting from both VMs.

usually it's not worth it, unless you have tens of identical VMs

Thank You for answer. But if i store 100-200 kvm guests under one host system, and mount all shared resources via nfs - can this slow down my system?
I need only read only access to shared files (only /home and /etc/ is different)

Signature · 2 lines
Vasiliy Tolstov <[email protected]>
Selfip.Ru