[prev in list] [next in list] [prev in thread] [next in thread]
List: bacula-devel
Subject: Re: [Bacula-devel] Unmount Command in SD conf not working?
From: "Timo Neuvonen" <timo-news () tee-en ! net>
Date: 2009-05-30 11:18:21
Message-ID: gvr4n0$c3f$1 () ger ! gmane ! org
[Download RAW message or body]
So is the "Unmount Command" directive in SD's Device Resource a command that
is _not_ supposed to be run automatically after the job no more needs this
storage, but only when user issues u(n)mount command in bconsole?
I didn't notice in the documentation when this directive is actually used.
Maybe I was just expecting something that looked good from my point of view,
since I'd like to have automatic unmount of the disk.
I just ran a very quick test:
- disk originally unmounted
- a backup job is run, SD conf includes mount and unmount commands
-- the job did mount the disk ok before the job
-- but didn't unmount it after the job
- then I issued umount command in bconsole, resulting in:
3002 Device "USB-Disk-A" (/mnt/backup-a) unmounted.
- the disk is still mounted (as seen from the OS)
- only the "umount /mnt/backup-a" from OS console unmounted the disk
Is this expected behaviour?
Umount command (of OS in question, not Bacula's command) in run-after-job-
script would be one solution, but there would obviously be a problem how to
pass the mount point to that command, since it depends from the chosen
storage. Mount point (as %m) is available only in the SD's configuration, I
think? And this run-after-job- approach would cause problems if there were
more that one job running with that storage...
Regards,
Timo
"Kern Sibbald" <kern@sibbald.com> kirjoitti viestissä
news:200905301142.41096.kern@sibbald.com...
> If I am not mistaken, Bacula only unmounts a disk on explicit user
> command,
> much like it does with tapes where once the tape is mounted, it is
> unmounted
> only by the user.
>
> If the unmount command does not work, then we could look at the problem.
>
> Regards,
>
> Kern
>
> On Saturday 30 May 2009 10:05:47 Timo Neuvonen wrote:
>> I'm sorry to write this into developers list, but I've asked this a
>> couple
>> of times in the past months in the user list with no reply.
>>
>> Is this possibly some simple configuration bug from my side, or is there
>> some deeper problem with SD's "Unmount Command"?
>>
>> Attached is a "-d 200" debug output of the SD.
>> It shows around lines 92-93 how the disk is mounted before the job,
>> and in line 189 "released" but there isn't shown any reference to the
>> unmount command at all.
>>
>> >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 as they present alongside digital heavyweights like
> Barbarian
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
------------------------------------------------------------------------------
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 as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic