Reading USB in OpenVZ

toniam

New Member
Jan 16, 2014
4
0
1
Hi, I have a server that has installed Proxmox 3.1-21 in several virtual OpenVZ, one of them I want to mount a USB.


This container has installed Centos 6.5, since the amount USB node follows:


mount / dev/sdb1 / mnt / usb /


And then from node also the amount in the container as follows:


mount - bind / mnt / usb / / var/lib/vz/private/100/mnt/usb /


If I make from node df-h


/ dev/sdb1 4.6G 2.7G 63% 7.2g / var/lib/vz/private/100/mnt/usb


Salt mounted drive and doing a ls information see USB, but if I access the virtual SSH when I access the folder / mnt / usb / shows empty.


How I can mount USB in Centos or other container temporarily, do not want this ever assembled, only in specific cases.?


thanks
 
Hello, I have found the solution.


mount-n - bind /mnt/usb/ /var/lib/vz/root/100/mnt/usb /


So SSH displays files in the virtual, I changed the folder private by the root.

Thank.
 
Hello, I have found the solution.


mount-n - bind /mnt/usb/ /var/lib/vz/root/100/mnt/usb /


So SSH displays files in the virtual, I changed the folder private by the root.

Thank.
Hi,
you can do it automaticly also by starting the CT with an mount-file like this:
Code:
cat /etc/pve/nodes/proxmox3/openvz/300.mount
#!/bin/bash
source /etc/vz/vz.conf
source ${VE_CONFFILE}
mount -n --bind /export/spool  ${VE_ROOT}/var/bacula/spool
Udo