OpenVZ Forum


Home » General » Support » Sharing between VPS
Sharing between VPS [message #35296] Mon, 16 March 2009 12:24 Go to previous message
starfry is currently offline  starfry
Messages: 24
Registered: March 2009
Location: Coulsdon, Surrey, UK
Junior Member
Hello, I've just joined up. I have been evaluating OpenVZ for a week now and it seems really good. I'm on Ubuntu Hardy and I have some "newby" questions.

I have found the easiest way to move files between VPS is to copy them on the HE between subdirectories at /vs/private. Is this a safe and acceptable thing to do ?

Taking this one step further, is it safe to create "shared" folders by symlinking folders within VPS, for example

on HE /srv/database
on HE /vz/private/101/srv/database -> /srv/database
on HE /vz/private/102/srv/database -> /srv/database
VPS 101 and 102 would then both see /srv/database

I presume if I do this then the shared kernel will handle any contention issues in the same way as it would if everything was running directly in the HE. However, some confirmation would be nice Smile

Second question relates to mounting devices. I was trying out devnodes to access a USB stick from a VPS.

# vzctl set 247 --devices b:8:33:rw
# vzctl exec 247 mknod /dev/sdc1 b 8 33

However, I can't mount it in the VPS:

root@vz247:~# mount /dev/sdc1 /mnt
mount: you must specify the filesystem type
root@vz247:~# mount -t vfat /dev/sdc1 /mnt
mount: unknown filesystem type 'vfat'
root@vz247:~# mount -t msdos /dev/sdc1 /mnt
mount: unknown filesystem type 'msdos'
root@vz247:~#

But I can mount it in the HE:

root@he240:~# mount /dev/sdc1 /mnt
root@he240:~#

I am running on Ubuntu Hardy with the 2.6.24-24-openvz kernel. My VPS is built using the ubuntu-minimal-8.04 from http://download.openvz.org/template/precreated/old/ubuntu-8. 04-i386-minimal.tar.gz

I guess the install does not know about or can not access the kernel modules for fat and vfat (the format of the flash drive).

I've heard bind mounting may be a better way to do this but I have not tried it yet. For example:

HE# mount -n -o bind /media/usb0 /vz/private/247/media/usb0


That's it for now, if anyone can help I'd really appreciate it! Very Happy
 
Read Message
Read Message
Read Message
Previous Topic: VE Start Fails
Next Topic: Error installing net-snmp centos-5 template
Goto Forum:
  


Current Time: Tue Aug 20 20:17:59 GMT 2024

Total time taken to generate the page: 0.03218 seconds