Hi !
I am running proxmox 2.3.
Since I installed proxmox on a new server I definitely can't use mount and unmount script on a container and I don't know why. Proxmox just doesn't read those scripts.
Here are the 2 scripts with +x rights :
I simplified the scripts to the most.
103.mount :
103.umount :
If I restart the contener 103 :
Here we see that proxmox didn't read the 103.mount.. If I enter in the conterner, the directory "share" is not mounted.
So I tried the command line directly in my shell :
... and it works. I also tried "mount -n --bind" and so other things... I'm run out of ideas.
So, if you have any suggestions as to how I can fix this. Thanks!
I am running proxmox 2.3.
Since I installed proxmox on a new server I definitely can't use mount and unmount script on a container and I don't know why. Proxmox just doesn't read those scripts.
Here are the 2 scripts with +x rights :
Code:
[root@prox /etc/vz/conf]$ l total 16K
-rwxr-xr-x 1 root root 180 May 6 03:03 100.mount
-rwxr-xr-x 1 root root 145 May 6 02:44 100.umount
-rwxr-xr-x 1 root root 97 May 11 19:00 103.mount
-rwxr-xr-x 1 root root 89 May 11 18:52 103.umount
I simplified the scripts to the most.
103.mount :
Code:
#!/bin/bash
. /etc/vz/vz.conf
. ${VE_CONFFILE}
mount --bind /mnt/share /var/lib/vz/root/103/mnt
103.umount :
Code:
#!/bin/bash
. /etc/vz/vz.conf
. ${VE_CONFFILE}
umount /var/lib/vz/root/103/mnt/
exit 0
If I restart the contener 103 :
Code:
[root@prox /etc/vz/conf]$ vzctl --verbose restart 103
Restarting container
Stopping container ...
Container was stopped
Container is unmounted
Starting container ...
Container is mounted
Running container script: /etc/vz/dists/scripts/debian-add_ip.sh
Setting CPU units: 1000
Setting CPUs: 1
Running container script: /etc/vz/dists/scripts/debian-set_hostname.sh
Running container script: /etc/vz/dists/scripts/set_dns.sh
Running container script: /etc/vz/dists/scripts/set_ugid_quota.sh
Configure veth devices: veth103.0
Adding interface veth103.0 to bridge vmbr2 on CT0 for CT103
Container start in progress...
[root@prox /etc/vz/conf]$
Here we see that proxmox didn't read the 103.mount.. If I enter in the conterner, the directory "share" is not mounted.
So I tried the command line directly in my shell :
Code:
mount --bind /mnt/share /var/lib/vz/root/103/mnt
... and it works. I also tried "mount -n --bind" and so other things... I'm run out of ideas.
So, if you have any suggestions as to how I can fix this. Thanks!