Re: [Bacula-users] bscan cannot open my tapes - help!

2020-05-29 Thread Pierre Bernhardt
Am 29.05.20 um 16:03 schrieb Nico De Ranter:
> But I also tried without manually mounting the tape but that didn't work
> either.  So I need to mount the tape first and then umount it to unlock it,
> correct?
> I also tried without bacula-sd running (to prevent it from locking the
> drive), but that didn't work either, hence my confusion.
bacula-sd blocks the drive so bscan cannot get the access.
umount normally release the tape and then the tape will be unloaded to
the related slot.
bacula must not run at all if bscan is working. You need only a running
database engine.
As I remember if you run a bscan with a couple of tapes (the written
tape order should be the same as for writing as I remember the jobs
which overlaps from one to another tape possible will not be correct
written to the database, but I'm unsure) the first tape must be
loaded by the changer so you can use mtx to load the first tape and
then use mt to check the status.
After loading bscan should run. It is a good idea to run bscan in
very verbose mode and write the log to a compressed file because
it will become very large uncompressed like

bscan . 2>&1 |gzip >logfile.gz

In another terminal session you can check the file with zless logfile.gz,
but i think following will not work so you can check file from time to
time by restarting zless and jump to the end with >.

I hope my 2-cents are not false informations. It's a longer time
that I used bscan (a couple of month?).

Cheers,
Pierre



___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bscan cannot open my tapes - help!

2020-05-29 Thread Gary R. Schmidt

On 30/05/2020 00:03, Nico De Ranter wrote:
But I also tried without manually mounting the tape but that didn't work 
either.  So I need to mount the tape first and then umount it to unlock 
it, correct?
I also tried without bacula-sd running (to prevent it from locking the 
drive), but that didn't work either, hence my confusion.


Oh, mayhap something has changed, I haven't run bscan since, um, last 
decade?  But I have been caught by the drive locking from time to time  :-)


Cheers,
GaryB-)


___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bscan cannot open my tapes - help!

2020-05-29 Thread Nico De Ranter
But I also tried without manually mounting the tape but that didn't work
either.  So I need to mount the tape first and then umount it to unlock it,
correct?
I also tried without bacula-sd running (to prevent it from locking the
drive), but that didn't work either, hence my confusion.

Nico

On Fri, May 29, 2020 at 3:16 PM Gary R. Schmidt 
wrote:

> On 29/05/2020 22:28, Nico De Ranter wrote:
> > Weird. It actually started reading from the tape when I did an unmount
> > in bconsole (which is now blocked because the tape is in use)
> >
> Not weird, the Bacula SD locks the drive when told to mount a tape, so
> it needs to be unlocked for anything else to use it.
>
> As bscan is stand-alone, not something that drives the SD, it needs the
> tape unlocked.
>
> Having Bacula umount the tape also means that the Bacula scheduler can't
> come along and bugger things up.
>
> Cheers,
> GaryB-)
>
>
>
>
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>


-- 

Nico De Ranter

Operations Engineer

T. +32 16 38 72 10







eSATURNUS
Philipssite 5, D, box 28
3001 Leuven – Belgium

T. +32 16 40 12 82
F. +32 16 40 84 77
www.esaturnus.com



*For Service & Support :*

Support Line Belgium: +32 2 2009897

Support Line International: +44 12 56 68 38 78

Or via email : medical.services...@sony.com
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bscan cannot open my tapes - help!

2020-05-29 Thread Gary R. Schmidt

On 29/05/2020 22:28, Nico De Ranter wrote:
Weird. It actually started reading from the tape when I did an unmount 
in bconsole (which is now blocked because the tape is in use)


Not weird, the Bacula SD locks the drive when told to mount a tape, so 
it needs to be unlocked for anything else to use it.


As bscan is stand-alone, not something that drives the SD, it needs the 
tape unlocked.


Having Bacula umount the tape also means that the Bacula scheduler can't 
come along and bugger things up.


Cheers,
GaryB-)




___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bscan cannot open my tapes - help!

2020-05-29 Thread Nico De Ranter
Weird. It actually started reading from the tape when I did an unmount in
bconsole (which is now blocked because the tape is in use)

Nico

On Fri, May 29, 2020 at 1:46 PM Nico De Ranter 
wrote:

>
> Hi all,
>
> 2 months ago my postgres database got corrupted. As a result I am not able
> to dump the database anymore.  All other functionality still worked, only
> the backup of the Bacula catalog failed every time.  As I could not fix the
> Postgresql issue I decided to reinstall the database from 2 months ago and
> then use bscan to scan all tapes since.  Unfortunately when I try to run
> bscan it asks me to load a certain tape, however that tape is already
> loaded and 'status slots' shows the right tape is available in the jukebox
> and loaded in the drive.  bscan just sits there and doesn't seem to be
> doing anything.   How can I convince bscan to start reading the tapes?
>
> Bacula version:  9.0.6
> OS version: Ubuntu 18.04.4 LTS
> Tape device: Quantum Superload 3 with LTO-6 drive
>
> What I tried:
> - dropped the old bacula database, recovered the latest usable database
> from tape and installed it
> - verified using bat that bacula is still running and I can see all data
> (up to 2 months ago ofcourse)
> - created a .bsr file containing a list of the volumes I want to scan
> - bacula-dir, bacula-sd and bacula-fd are running on the server
>
> when I start bscan as follows:
>
> bscan -s -m -c /etc/bacula/bacula-sd.conf -v -b bscan-recover.bsr /dev/nst0
>
> It says:
>
> bscan: butil.c:292-0 Using device: "/dev/nst0" for reading.
> 29-May 13:43 bscan JobId 0: No slot defined in catalog (slot=0) for Volume
> "MG3119L6" on "Superloader-Drive" (/dev/nst0).
> 29-May 13:43 bscan JobId 0: Cartridge change or "update slots" may be
> required.
>
> According to the console the tape is available and mounted
>
> *status slots
> Automatically selected Storage: Jukebox
> Connecting to Storage daemon Jukebox at backup.office:9103 ...
> 3306 Issuing autochanger "slots" command.
> Device "Superloader" has 8 slots.
> Connecting to Storage daemon Jukebox at backup.office:9103 ...
> 3306 Issuing autochanger "list" command.
>
> +--+--+---+-++
> | Slot | Volume Name  | Status| Media Type  | Pool
>   |
>
> +--+--+---+-++
>
> +--+--+---+-++
> |1 | MG3119L6 | Append| LTO-6   | lto
>|
>
> +--+--+---+-++
> |2 | OR7132L6 | Purged| LTO-6   | lto
>|
>
> +--+--+---+-++
> |3 | NEH420L6 | Purged| LTO-6   | lto
>|
>
> +--+--+---+-++
> |4 | NEH426L6 | Purged| LTO-6   | lto
>|
>
> +--+--+---+-++
> |5 | NEH427L6 | Purged| LTO-6   | lto
>|
>
> +--+--+---+-++
> |6 | NEH425L6 | Full  | LTO-6   | lto
>|
>
> +--+--+---+-++
> |7 | JI2317L6 | Full  | LTO-6   | lto
>|
>
> +--+--+---+-++
> |8 | CLN251L1 | Cleaning  | | lto
>|
> *mount storage=Jukebox slot=1 drive=0
> 3001 Device ""Superloader-Drive" (/dev/nst0)" is mounted with Volume
> "MG3119L6"
>
> What am I missing?
>
> Nico
>
> --
>
> Nico De Ranter
>
> Operations Engineer
>
> T. +32 16 38 72 10
>
>
> 
> [image: image.jpeg]
>
>
>
>
> 
>
>
> eSATURNUS
> Philipssite 5, D, box 28
> 3001 Leuven – Belgium
>
> T. +32 16 40 12 82
> F. +32 16 40 84 77
> www.esaturnus.com
>
> 
>
> *For Service & Support :*
>
> Support Line Belgium: +32 2 2009897
>
> Support Line International: +44 12 56 68 38 78
>
> Or via email : medical.services...@sony.com
>
>
>

-- 

Nico De Ranter

Operations Engineer

T. +32 16 38 72 10







eSATURNUS
Philipssite 5, D, box 28
3001 Leuven – Belgium

T. +32 16 40 12 82
F. +32 16 40 84 77
www.esaturnus.com



*For Service & Support :*

Support Line Belgium: +32 2 2009897

Support Line International: +44 12 56 68 38 78

Or via email : medical.services...@sony.com
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] bscan cannot open my tapes - help!

2020-05-29 Thread Nico De Ranter
Hi all,

2 months ago my postgres database got corrupted. As a result I am not able
to dump the database anymore.  All other functionality still worked, only
the backup of the Bacula catalog failed every time.  As I could not fix the
Postgresql issue I decided to reinstall the database from 2 months ago and
then use bscan to scan all tapes since.  Unfortunately when I try to run
bscan it asks me to load a certain tape, however that tape is already
loaded and 'status slots' shows the right tape is available in the jukebox
and loaded in the drive.  bscan just sits there and doesn't seem to be
doing anything.   How can I convince bscan to start reading the tapes?

Bacula version:  9.0.6
OS version: Ubuntu 18.04.4 LTS
Tape device: Quantum Superload 3 with LTO-6 drive

What I tried:
- dropped the old bacula database, recovered the latest usable database
from tape and installed it
- verified using bat that bacula is still running and I can see all data
(up to 2 months ago ofcourse)
- created a .bsr file containing a list of the volumes I want to scan
- bacula-dir, bacula-sd and bacula-fd are running on the server

when I start bscan as follows:

bscan -s -m -c /etc/bacula/bacula-sd.conf -v -b bscan-recover.bsr /dev/nst0

It says:

bscan: butil.c:292-0 Using device: "/dev/nst0" for reading.
29-May 13:43 bscan JobId 0: No slot defined in catalog (slot=0) for Volume
"MG3119L6" on "Superloader-Drive" (/dev/nst0).
29-May 13:43 bscan JobId 0: Cartridge change or "update slots" may be
required.

According to the console the tape is available and mounted

*status slots
Automatically selected Storage: Jukebox
Connecting to Storage daemon Jukebox at backup.office:9103 ...
3306 Issuing autochanger "slots" command.
Device "Superloader" has 8 slots.
Connecting to Storage daemon Jukebox at backup.office:9103 ...
3306 Issuing autochanger "list" command.
+--+--+---+-++
| Slot | Volume Name  | Status| Media Type  | Pool
  |
+--+--+---+-++
+--+--+---+-++
|1 | MG3119L6 | Append| LTO-6   | lto
 |
+--+--+---+-++
|2 | OR7132L6 | Purged| LTO-6   | lto
 |
+--+--+---+-++
|3 | NEH420L6 | Purged| LTO-6   | lto
 |
+--+--+---+-++
|4 | NEH426L6 | Purged| LTO-6   | lto
 |
+--+--+---+-++
|5 | NEH427L6 | Purged| LTO-6   | lto
 |
+--+--+---+-++
|6 | NEH425L6 | Full  | LTO-6   | lto
 |
+--+--+---+-++
|7 | JI2317L6 | Full  | LTO-6   | lto
 |
+--+--+---+-++
|8 | CLN251L1 | Cleaning  | | lto
 |
*mount storage=Jukebox slot=1 drive=0
3001 Device ""Superloader-Drive" (/dev/nst0)" is mounted with Volume
"MG3119L6"

What am I missing?

Nico

-- 

Nico De Ranter

Operations Engineer

T. +32 16 38 72 10



[image: image.jpeg]







eSATURNUS
Philipssite 5, D, box 28
3001 Leuven – Belgium

T. +32 16 40 12 82
F. +32 16 40 84 77
www.esaturnus.com



*For Service & Support :*

Support Line Belgium: +32 2 2009897

Support Line International: +44 12 56 68 38 78

Or via email : medical.services...@sony.com
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users