1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to make mounted external drives visible to appliances (and to Proxmox itself?)

Discussion in 'Proxmox VE: Installation and configuration' started by jfontana, Mar 31, 2012.

  1. jfontana

    jfontana New Member

    Joined:
    Mar 18, 2012
    Messages:
    22
    Likes Received:
    0
    I'm running Proxmox VE 2.0 on an HP Proliant microserver. I mounted an external drive by accessing as root via ssh. Everything seems to be fine there and I can see all the folders in the mounted drive doing 'ls' from the terminal.

    I'm at a loss as to how to manage this external drive via the Proxmox GUI. The external drive doesn't show up in any of the nodes. That's not the most important thing, though. Basically what I want is to be able to connect to this external drive from the different appliances I have installed in the VE. When I get into the appliances I have no way to see the external drive. When I use VirtualBox I am always able to connect to the external drives from any of the VMs. With appliances in the Proxmox VE, though, I don't see how one can do this. I would really appreciate it if someone could lend me a hand. Thanks in advance for your help.

    JM
     
  2. c0mputerking

    c0mputerking Member

    Joined:
    Oct 5, 2011
    Messages:
    160
    Likes Received:
    1
    Re: How to make mounted external drives visible to appliances (and to Proxmox itself?

    I have started a simalar post here

    http://forum.proxmox.com/threads/8894-automagic-bind-mounts?p=50697#post50697

    I have managed to get manual bind mount working (very slick) however still working on automagiclly getting things to happen when containers are restarted. I am sure other have this working and know more than me.
     
  3. c0mputerking

    c0mputerking Member

    Joined:
    Oct 5, 2011
    Messages:
    160
    Likes Received:
    1
    Re: How to make mounted external drives visible to appliances (and to Proxmox itself?

    Ok i have it working now i put this in /etc/var/vz/conf/202.mount not sure if openvz/proxmox uses variables so i hard coded everything not very elegant, but im not a coder. If someone could point me to a better or more correct script that would be cool however it tested this with a reboot of pve host and a reboot of the container both work perfectly mounting and umounting. I have not found which log this shows up in yet to check for errors and the like.

    #!/bin/bash
    source /etc/vz/vz.conf
    #source ${VE_CONFFILE}
    #echo "Starting ${VEID}.mount..."
    echo "Starting 202.mount..."
    #mount --bind /usr/local/backups/backuppc ${VE_ROOT}/var/lib/backuppc
    mount --bind /usr/local/backups/backuppc /var/lib/vz/root/202/var/lib/backuppc
    echo "...202.mount complete"

    here is the recommeded 202.umount script
    root@sun:/home/c0mputerking# vi /etc/vz/conf/202.umount
    #!/bin/bash
    source /etc/vz/vz.conf
    source ${VE_CONFFILE}
    echo "Starting ${VEID}.umount..."
    umount ${VE_ROOT}/var/lib/backuppc
    echo "...${VEID}.umount done"
     
  4. jfontana

    jfontana New Member

    Joined:
    Mar 18, 2012
    Messages:
    22
    Likes Received:
    0
    Re: How to make mounted external drives visible to appliances (and to Proxmox itself?

    OK. Thanks Computerking. I'll try to implement your solution. It looks like this was something that was quite easier to accomplish with the previous version (v1.9) of Proxmox.

    JM
     

Share This Page