Windows-Share to OpenVZ Container - auto-(re)mount?

r4pt0x

Member
Jan 5, 2012
53
0
6
I want to add MSSQL-Backups from a Windows machine to our external backup routines.
As planned Windows-tasks and automated tools proved to be utterly unreliable even for just simple copy-jobs to an network-drive, it should be managed completely from the debian-machine which is also rotating several other backups, leaving the Windows-Machine writing only to its local drives.

1. CIFS/SMBFS mounts are not possible from within an OpenVZ container - is this information still up to date? The original source on the OpenVZ project page reads "not yet implemented" and is dated back to 2006 - so has there been any changes since then?

2. Given that SMBFS-mounts are still not possible from within the container i have to use mount/bind to give the container access to the mount. How can i ensure, the mount is up and running when the container starts its backup-rotation? Is any smb-mount automatically checked and reconnected on access e.g. if the Windows machine had to be rebooted for updates (planned once a week for normal updates) or went down for other reasons? I'm still encountering the annoying Windows2008-bug on loosing the network interface from time to time or on reboot... I have a script running which kills the interface and re-enables it when connection is lost, but this short downtime usually disconnects the SMB-shares.
Adding a mount-script to the Windows-VM config wouldn't take any effect as reboots from within the guest aren't recognized by the host.

3. are there any other options to get read-access to the windows-share? The MSSQL-Server automatically removes it's backups after 5 days, so i only have to get the backups from this machine to add it to the rotation on our external storage. even read-only access would be perfectly fine.


Thanks
 
My (temporary) solution is now as follows:

the host checks if the mounted directory is empty or not, tries to remount it when empty and tells the VM its status by writing into a status file within the root-space of the container. This file is analyzed by the backup-script running on the container + it also checks if there is data within the mounted directory.