]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix automount feature after a label command
authorEric Bollengier <eric@baculasystems.com>
Thu, 10 Sep 2015 09:44:29 +0000 (11:44 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 19 Dec 2015 08:02:30 +0000 (09:02 +0100)
After a successful label command, if the automount flag is "on"
the director tries to mount the newly created volume.

The protocol was broken for a couple of time. The "slot" parameter
was missing in the Storage command.

* label
...
Requesting to mount FileStorage ...
3909 Error scanning mount command: mount FileStorage drive=-1
Do not forget to mount the drive!!!

bacula/src/dird/ua_label.c

index 4ed16cc321cad46cd4ea4a9926dccf68ab7c667e..e5cc16cb75d84a8d3c00c4532481a5ada561a10c 100644 (file)
@@ -475,7 +475,7 @@ checkName:
          bstrncpy(dev_name, store.store->dev_name(), sizeof(dev_name));
          ua->info_msg(_("Requesting to mount %s ...\n"), dev_name);
          bash_spaces(dev_name);
-         sd->fsend("mount %s drive=%d", dev_name, drive);
+         sd->fsend("mount %s drive=%d slot=%d", dev_name, drive, mr.Slot);
          unbash_spaces(dev_name);
          while (sd->recv() >= 0) {
             ua->send_msg("%s", sd->msg);