Bacula-users

[Bacula-users] Unmount Command in SD conf not working?

2009-05-24 09:02:37
Subject: [Bacula-users] Unmount Command in SD conf not working?
From: "Timo Neuvonen" <timo-news AT tee-en DOT net>
To: bacula-users AT lists.sourceforge DOT net
Date: Sun, 24 May 2009 15:58:39 +0300
I can not make SD's "Unmount Command" work.
"Mount Command" works fine instead.

I have an external USB disk, that is used thru this storage:

Device {
  Name = USB-Disk-A
  Device Type = File
  Media Type = USB-Disk-A
  Archive Device = /mnt/backup-a
  LabelMedia = yes;
  Random Access = yes;
  AutomaticMount = yes;
  RemovableMedia = yes;
  AlwaysOpen = no;
  Requires Mount = yes
  Mount Point = /mnt/backup-a
  Mount Command = "/bin/mount %m"
  Unmount Command = "sleep 5;/bin/umount -l %m"
}

The "Unmount Command" I currently have (sleep 5;/bin/umount -l %m) is quite
a monster, but I've started with simple "/bin/umount %m" that didn't work
either. The 5-second sleep was added to allow caches flush first (just a
try), and -l (lazy) option (another try) should also help if there still is
some disk traffic alive.


Before running a job, the disk is not mounted:

[root@garfield bacula]# mount
....
(/dev/sdb1 not mentioned here)
[root@garfield bacula]#


Now I run a backup job using storage "USB-Disk-A", and then:


[root@garfield bacula]# mount
....
/dev/sdb1 on /mnt/backup-a type ext3 (rw,nosuid,nodev,user=bacula)
[root@garfield bacula]#


So, the disk was not unmounted. Could someone advice what am I doing wrong?



I already asked this a few weeks ago, with no reply then. At that time I was
running Bacula 2.4.4, and I decided to upgrade before renewing the question,
the upgrade didn't affect to this problem.
Now I have this setup:
Bacula 3.0.1, on CentOS 5.3 x86_64, with MySQL database.

Some snapshots from the system:

/etc/fstab has this line:
/dev/backup-a1          /mnt/backup-a           ext3    rw,noauto,owner 0 0

this is the actual drive:
[root@garfield bacula]# ll /dev/sdb*
brw-r----- 1 bacula disk 8, 16 May 24 15:24 /dev/sdb
brw-r----- 1 bacula disk 8, 17 May 24 15:24 /dev/sdb1

these links are made by udev to have the names stable:
[root@garfield bacula]# ll /dev/b*
lrwxrwxrwx 1 root root  3 May 24 15:24 /dev/backup-a -> sdb
lrwxrwxrwx 1 root root  4 May 24 15:24 /dev/backup-a1 -> sdb1


--
TiN



------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Bacula-users] Unmount Command in SD conf not working?, Timo Neuvonen <=