usb HDD on openvz VM

copymaster

Member
Nov 25, 2009
183
0
16
Hi Guys,

i found this article in the Web:
Code:
http://dohbuntu.bei-bastian.de/

And i found out the vendor and ProdID.

The OpenVZ VM is running on a cluster node and i want to stick a usb HDD into that cluster node and use it within a VM

So i used ssh to connect to that node and did a

Code:
qm set 107 -hostusb 1058:1001

But the system tells me:
setting parameters failed - unable to read config for VM 107

Vm 107 is a openvz ubuntu 8.04 and it runs Postgres DB

Any hints?
 
UPS!
Sorry.

... Dietmar is there a solution for openvz VM's?? Or can i just use /etc/udev/rules.d/ on the clusternode to mount an usb_Harddisk directly into the openvz VM's filesystem?
 
... Dietmar is there a solution for openvz VM's?? Or can i just use /etc/udev/rules.d/ on the clusternode to mount an usb_Harddisk directly into the openvz VM's filesystem?

Please read 'man vzctl' - section "Device access management"
 
thanks i already read the man vzctl.

But imagine the following situation:

i have three Backup usb-disks

on the clusternode there's a /etc/udev/rules.d/00-init-rule file, which looks for a Serialnumber of a USB Device. if a special serialnumber is detected (one of three serials possible) the node creates a /dev/elements node and hangs the USB-HDD on to /dev/elements.

This is a backup HDD, on which the openvz machine should synchronize a backup directory. After sync, the VM should "umount" the usb-hdd, so that there's no danger of data-loss. The USB-HDD is brought to the Bank and a second one is connected. The udev script recognizes the second serialnumber and puts this usb-hdd also on /dev/elements. After that the usb-hdd should be propagated to the vm again and sync the directory and so on...

if i use a backup script on the VM which unmounts the usb-hdd. is it unmounted in the physical node ,too?

I found the command for "mounting" the usb-hdd... But what about umount???

I found the vzctl set 170 --devnodes elements:none command, but this is no umount, isn't it?
 
Last edited:
I found the vzctl set 170 --devnodes elements:none command, but this is no umount, isn't it?

no, there is no such thing. But IMHO that backup stategy is a bit clumsy. Why don't you use a tape and a real backup program?
 
well, i have a "real" backup programm.but the backups are stored on a fileserver in the serverroom.

the described backup is "PLAN B" . the whole backup is copied to the usb-harddisk. and that harddisk is brought to the bank every day.

So in case of fire we still have the backup. you know?
 
there's only ONE REAL BACKUP....

And That is BACULA opensource enterprise backup. It uses Harddisks or tapes but harddisks are much faster.

I try to use as much opensource software as possible, because of bad experience with commercial ones.
And Bacula is as far as i know the only enterprisegrade backup software which handles Volume shadow copy and windows ACL'S in a Network backup....
 
Last edited: