kvm shared folders

bread-baker

Member
Mar 6, 2010
432
0
16
Hello
We currently use open-vz containers with bind mounts for sharing data . This works great.

For 4-5 kvm's what are some efficent ways to share data ?

thanks
Rob
 
nothing special here. go for traditional file sharing methods over the network, like nfs or samba.
 
thanks... so I'll use nfs or sshfs . we use all sshfs and very little nfs due to nfs problems when lenny was almost the stable Debian release. nfs just has had too many issues for us to depend on it.

for performance and stability is it better to have the file server in the kvm or on the proxmox host?

in either case I'll be using drbd to mirror the data.
 
IO intense applications like file serving is not always best suited for virtualization. performance is better if its on the host itself, but then you loose all virtualization features - so, it just depends.
 
Would it make sense to have Samba running on the Proxmox host, and work as a fileserver. Virtual machines then use this data via nfs mount ?
So VM's dont have data and are very small.
 
we try to stay away from nfs and samba on linux systems. we have got bitten by bugs , especially when there have been distro upgrades. like from etch to lenny , nfs went to hell. or at least the way we were using it.

instead we use ssh-fs / fuse . here is an example from client :
Code:
sshfs#root@rsync:/home/ /home-ssh  fuse comment=sshfs,auto,users,exec,allow_other,reconnect,transform_symlinks,BatchMode=yes 0 0
We do not do a lot of file sharing , just occasional document sharing. I suspect that there is extra overhead using ssh which might make sshfs not great for heavy work loads. We just have less trouble using ssh-fs

For open-vz we use bind mounts.
 
Last edited:
ssh-fs is quite a bit slower, but it is also stable. i have run into nfs issues too :( hangs, panics, etc...
 
I need a fileserver for a Windows environment (Clients!) and I need as much performance as possible !
...and I want avoid bying a SBS 2008 R2 !!!
 
You can put something like openfiler on a relatively low-end (cheap!) box and it will provide samba, nfs, etc...
 
the discussion went a little bit wrong....

I want to use virtualization to separate things like fileservice,mail,groupware,ldap, etc., and to save energy.
I want to do that with proxmox (!), because VM-administration is great.

... but I dont want the fileserver, with 8 TB, to be in a virtual machine, because of performance and because I think, its not as save as on a physical machine !

The idea is, to install samba in the proxmox host. The virtual machines on the other hand, should get the data they need also from the host.
The question is how ? As I learned from the discussion, no nfs (!).

bread-baker mentioned...
<For open-vz we use bind mounts.>

how does that work ?
 
Haven't used them, but I can warn you about virtualizing your file server. Be prepared to have the network transfer rate suck. I mean the best I have been able to manage is 1/4th native. Much of that is probably because I've tried with non-linux servers which don't have virtio.
 
we did a lot of testing before choosing proxmox as our virt. platform.

disk i/o in openvz was very close to the same as running on the host computer.

I think there is good info on how to setup bind mounts on the wiki.

We have 15 open-vz's sharing /home . so an imap container uses the same /home as our postfix container.
this is an example of what we do:

Code:
ls -l -l /etc/vz/conf/102.mount
-rwxr-xr-x 1 root root 301 May 25  2010 /etc/vz/conf/102.mount

cat /etc/vz/conf/102.mount
#!/bin/bash
# 102.mount  mediawiki

source /etc/vz/vz.conf
source ${VE_CONFFILE}

# for some reason /fbc does not umount causing heartbeat switchover delays

mount -n --bind /new-data/home  ${VE_ROOT}/home

mount -n --bind /new-data/bkup ${VE_ROOT}/bkup

We mainly use open-vz , and I do not know the best way to share data to a KVM.
 
I need more coffee, yes, sure if you are using openvz containers, ignore everything I said. I was narrowly seeing just the kvm picture.