How to make cifs share read-only until mounted?

Oct 22, 2009
92
1
26
We recently had a (planned) electrical cut. We are using a cifs share for backing up the VMs but the proxmox server was online before our Windows server. Therefore the cifs share was not mounted during boot.

The result was that the backup was written to the proxmox system disc. Is there a way to prevent it from doing the backup if the cifs share is not mounted?
I guess I should make a hook-script which tries to mount the share, but still - I'd like to avoid the system disc being filled by accident if the share is unavailable.
 
I tried mounting a NFS share using the webinterface - only problem now is that it fails silently. If I run vzdump manually I get an error message regarding the NFS share, but it does not send and email. Minor detail ;-).

Now I'll just have to add NFS share to the Windows server. Didn't know that was possible, but found a walk through guide here if anybody else can use it: http://blogs.msdn.com/sfu/pages/introduction-and-installation-of-services-for-nfs-on-r2.aspx

Thanks for pointing me in the right direction ;)

Bo
 
I tried mounting a NFS share using the webinterface - only problem now is that it fails silently. If I run vzdump manually I get an error message regarding the NFS share, but it does not send and email. Minor detail ;-).

the email server (postfix) is configured automatically during installation. if you change your setup afterwards, you also need to reconfigure postfix.

Code:
dpkg-reconfigure postfix

also take a look on the syslog (/var/log/syslog).
 
I only see a start entry for the backup in the syslog when running a planned backup from the webinterface. Running it manually it exists like this:
Code:
 vzdump --node 1 --snapshot --storage backup_test --mailto <email> 101
mount.nfs: 192.168.0.120:/home/bo/proxmoxtest failed, reason given by server: Permission denied
command '/bin/mount -t nfs 192.168.0.120:/home/bo/proxmoxtest /mnt/pve/backup_test' failed with exit code 32
I get an email when it is successful.