We're looking at using Bacula to back up the contents of VMware virtual machines from snapshots of the filesystem containing the VMDK file. In particular, we have a test instance of FreeNAS in a VMware virtual machine, and a server running Bacula that makes snapshots and performs from-snapshot and from-client backups reliably (although more slowly than we would like).
I wrote a BeforeJob script like the following: ## (omitting our standard command that makes and mounts a snapshot) sudo mount /mnt/iofreenastest -o remount,rw yes | sudo /opt/vmware-server/bin/vmware-mount.pl \ /mnt/iofreenastest/FreeNAS.vmdk 6 /mnt/freenas-6 \ -o ufstype=5xbsd,ro & sleep 3 mount | grep 'on /mnt/freenas-6' || exit 1 However, when the job ran, the director never picked up after the BeforeJob. A few hours later, I checked on it. Here's what some of "ps aefx" looked like: 17247 ? Ssl 2:02 /usr/sbin/bacula-dir -c /etc/bacula/bacula-dir.conf - 19430 ? Z 0:00 \_ [freenas_before] <defunct> 19575 ? S 0:00 sh -c '/opt/vmware-server/bin/vmware-loop' -q '/mnt/i 19576 ? S 0:01 \_ /opt/vmware-server/bin/vmware-loop -q /mnt/iofree 19577 ? S 0:00 \_ /opt/vmware-server/bin/vmware-loop -q /mnt/io (there was a "yes" process in there as well, but it has scrolled off my screen) I tried unsticking it by killing the "yes" process and the "sh" process, both with no effect. Killing the "vmware-loop" process got it going again, but of course that unmounted the directory I wanted to back up, and actually caused the job to fail: 18-Dec 19:46 backup-test2-dir: BeforeJob: run command "/etc/bacula/scripts/freenas_before" 18-Dec 19:46 backup-test2-dir: BeforeJob: Snapshot already exists. 18-Dec 19:46 backup-test2-dir: BeforeJob: Cleaning up stale snapshot bacula-immediate-6135a of 10.x.y.z... 18-Dec 19:46 backup-test2-dir: BeforeJob: deleting snapshot... 18-Dec 19:46 backup-test2-dir: BeforeJob: LUN unmapped OK. 18-Dec 19:46 backup-test2-dir: BeforeJob: creating snapshot... 18-Dec 19:46 backup-test2-dir: BeforeJob: lun map: auto-assigned Backup=0 18-Dec 19:46 backup-test2-dir: BeforeJob: iscsiadm: No active sessions. 18-Dec 19:46 backup-test2-dir: BeforeJob: 10.x.y.z:3260,2000 iqn.1992-08.com.netapp:sn.sn 18-Dec 19:46 backup-test2-dir: BeforeJob: Login session [iface: default, target: iqn.1992-08.com.netapp:sn.sn, portal: 10.x.y.z,3260] 18-Dec 19:46 backup-test2-dir: BeforeJob: Rescanning session [sid: 58, iface: , target: iqn.1992-08.com.netapp:sn.sn, portal: 10.x.y.z,3260] 18-Dec 19:46 backup-test2-dir: BeforeJob: 18-Dec 19:46 backup-test2-dir: BeforeJob: -------------------------------------------- 18-Dec 19:46 backup-test2-dir: BeforeJob: VMware for Linux - Virtual Hard Disk Mounter 18-Dec 19:46 backup-test2-dir: BeforeJob: Version: 1.0 build-***** 18-Dec 19:46 backup-test2-dir: BeforeJob: Copyright 1998 VMware, Inc. All rights reserved. -- VMware Confidential 18-Dec 19:46 backup-test2-dir: BeforeJob: -------------------------------------------- 18-Dec 19:46 backup-test2-dir: BeforeJob: 18-Dec 19:46 backup-test2-dir: BeforeJob: It has been reported that this program does not work correctly with 2.4+ Linux 18-Dec 19:46 backup-test2-dir: BeforeJob: kernels in some cases, and you are currently running such a kernel. Do you 18-Dec 19:46 backup-test2-dir: BeforeJob: really want to continue? [N] 18-Dec 19:46 backup-test2-dir: BeforeJob: Network Block Device driver detected. 18-Dec 19:46 backup-test2-dir: BeforeJob: 18-Dec 19:46 backup-test2-dir: BeforeJob: Client: The partition is now mapped on the /dev/nb0 Network Block Device. 18-Dec 19:46 backup-test2-dir: BeforeJob: 18-Dec 19:46 backup-test2-dir: BeforeJob: Using another terminal, you can now browse your Virtual Hard Disk partition in 18-Dec 19:46 backup-test2-dir: BeforeJob: /mnt/freenas-6. Hit Control-C in this terminal when done. 19-Dec 09:46 backup-test2-dir: BeforeJob: Warning: The NBD_DO_IT ioctl returned an error: Broken pipe 19-Dec 09:46 backup-test2-dir: TestBackupFreeNASVmwareLoop.2008-12-18_16.55.02 Error: Runscript: BeforeJob returned non-zero status=1. ERR=Child exited with code 1 I guess the vmware-loop process is still somehow related to the director, which is why Bacula hung. Has anyone gotten Bacula to mount and back up an idle VMDK file, either with vmware-mount.pl or invoking vmware-loop directly, or by some other program? -- David Lee Lambert Yahoo! IM: davidleelambert * MSN IM: lambe...@cse.msu.edu Slashdot/Sourceforge UID: lamber45
------------------------------------------------------------------------------
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users