umount script running on mount

wrt54gl

Member
Feb 11, 2011
17
1
23
I am running proxmox 2. When I use the 101.mount script it seems to work well but If I put a 101.mount and a 101.umount script in /etc/vz/conf it tries to run the umount script when the container starts and it fails because the shares are not mounted:

101.mount:

mount -t smbfs -o username=someuser,password=somepass //host.dom.local/share /mnt/share
mount --bind /mnt/share /var/lib/vz/root/101/mnt/share

101.umount:

umount /mnt/share
umount /var/lib/vz/root/101/mnt/share


I do not think that the 101.umount script should run when the container starts.
 
Last edited:
I actually found this answer on Google finally:

The container is not necessarilly unmounted when it is shutdown. When the container is started it is first unmounted and then remounted hence the running 101.umount. All I did was put exit 0 at the end of the 101.umount script.

101.umount:

#!/bin/bash
umount /mnt/share
umount /var/lib/vz/root/101/mnt/share
exit 0
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!