Bacula-users

Re: [Bacula-users] Auto changer permissions problem

2008-07-08 10:42:32
Subject: Re: [Bacula-users] Auto changer permissions problem
From: Nils Blanck-Wehde <nils.blanck-wehde AT backofficeservice DOT biz>
Date: Tue, 08 Jul 2008 16:42:08 +0200
Hi Russel!
It might be worth checking, whether the mtx-changer script has the right permissions set. I believe it should be owned by bacula:disk.
I believe that the output after ERR: is what is returned by the call of mtx-changer.

If I am wrong, someone please correct me!

Nils

Russell Sutherland schrieb:
I am having problems labeling tapes.  I have a FreeBSD 7.0 system:

FreeBSD backup.utoronto.ca 7.0-RELEASE-p2 FreeBSD 7.0-RELEASE-p2

with a DELL-PV-122T 8 slot tape drive.

The btape tests work just fine. ( See the output below.)
When I run bacula and try to label at tape, I get the following
permissions error:

Connecting to Storage daemon Storage-tape at backup.cns.utoronto.ca:9103 ...
Sending label command for Volume "Vol-1" Slot 1 ...
3301 Issuing autochanger "loaded? drive 0" command.
3991 Bad autochanger "loaded? drive 0" command: ERR=Permission denied.
Results=
3301 Issuing autochanger "loaded? drive 0" command.
3991 Bad autochanger "loaded? drive 0" command: ERR=Permission denied.
Results=
3304 Issuing autochanger "load slot 1, drive 0" command.
3992 Bad autochanger "load slot 1, drive 0": ERR=Permission denied.
Results=
Label command failed for Volume Vol-1.
Do not forget to mount the drive!!!


# btape -c ./bacula-sd.conf /dev/nsa0
Tape block granularity is 1024 bytes.
btape: butil.c:285 Using device: "/dev/nsa0" for writing.
08-Jul 10:16 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0" command.
08-Jul 10:16 btape JobId 0: 3302 Autochanger "loaded? drive 0", result
is Slot 1.
btape: btape.c:372 open device "Dell-PV-122T" (/dev/nsa0): OK

*test

=== Write, rewind, and re-read test ===

I'm going to write 1000 records and an EOF
then write 1000 records and an EOF, then rewind,
and re-read the data to verify that it is correct.

This is an *essential* feature ...

btape: btape.c:831 Wrote 1000 blocks of 64412 bytes.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:847 Wrote 1000 blocks of 64412 bytes.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:856 Rewind OK.
1000 blocks re-read correctly.
Got EOF on tape.
1000 blocks re-read correctly.
=== Test Succeeded. End Write, rewind, and re-read test ===


=== Write, rewind, and position test ===

I'm going to write 1000 records and an EOF
then write 1000 records and an EOF, then rewind,
and position to a few blocks and verify that it is correct.

This is an *essential* feature ...

btape: btape.c:943 Wrote 1000 blocks of 64412 bytes.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:959 Wrote 1000 blocks of 64412 bytes.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:968 Rewind OK.
Reposition to file:block 0:4
Block 5 re-read correctly.
Reposition to file:block 0:200
Block 201 re-read correctly.
Reposition to file:block 0:999
Block 1000 re-read correctly.
Reposition to file:block 1:0
Block 1001 re-read correctly.
Reposition to file:block 1:600
Block 1601 re-read correctly.
Reposition to file:block 1:999
Block 2000 re-read correctly.
=== Test Succeeded. End Write, rewind, and re-read test ===



=== Append files test ===

This test is essential to Bacula.

I'm going to write one record  in file 0,
                   two records in file 1,
             and three records in file 2

btape: btape.c:475 Rewound "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:372 open device "Dell-PV-122T" (/dev/nsa0): OK
btape: btape.c:475 Rewound "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1097 Now moving to end of medium.
btape: btape.c:526 Moved to end of medium.
We should be in file 3. I am at file 3. This is correct!

Now the important part, I am going to attempt to append to the tape.

btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:475 Rewound "Dell-PV-122T" (/dev/nsa0)
Done appending, there should be no I/O errors

Doing Bacula scan of blocks:
1 block of 64448 bytes in file 1
End of File mark.
2 blocks of 64448 bytes in file 2
End of File mark.
3 blocks of 64448 bytes in file 3
End of File mark.
1 block of 64448 bytes in file 4
End of File mark.
Total files=4, blocks=7, bytes = 451,136
End scanning the tape.
We should be in file 4. I am at file 4. This is correct!

The above Bacula scan should have output identical to what follows.
Please double check it ...
=== Sample correct output ===
1 block of 64448 bytes in file 1
End of File mark.
2 blocks of 64448 bytes in file 2
End of File mark.
3 blocks of 64448 bytes in file 3
End of File mark.
1 block of 64448 bytes in file 4
End of File mark.
Total files=4, blocks=7, bytes = 451,136
=== End sample correct output ===

If the above scan output is not identical to the
sample output, you MUST correct the problem
or Bacula will not be able to write multiple Jobs to
the tape.

Skipping read backwards test because BSR turned off.


=== Forward space files test ===

This test is essential to Bacula.

I'm going to write five files then test forward spacing

btape: btape.c:475 Rewound "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:505 Wrote 1 EOF to "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:475 Rewound "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1311 Now forward spacing 1 file.
We should be in file 1. I am at file 1. This is correct!
btape: btape.c:1323 Now forward spacing 2 files.
We should be in file 3. I am at file 3. This is correct!
btape: btape.c:475 Rewound "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1336 Now forward spacing 4 files.
We should be in file 4. I am at file 4. This is correct!

btape: btape.c:1354 Now forward spacing 1 more file.
We should be in file 5. I am at file 5. This is correct!

=== End Forward space files test ===


Ah, I see you have an autochanger configured.
To test the autochanger you must have a blank tape
 that I can write on in Slot 1.

Do you wish to continue with the Autochanger test? (y/n): y


=== Autochanger test ===

3301 Issuing autochanger "loaded" command.
Slot 1 loaded. I am going to unload it.
3302 Issuing autochanger "unload 1 0" command.
unload status=OK 0
3303 Issuing autochanger "load 1 0" command.
3303 Autochanger "load 1 0" status is OK.
btape: btape.c:372 open device "Dell-PV-122T" (/dev/nsa0): OK
btape: btape.c:1241 Rewound "Dell-PV-122T" (/dev/nsa0)
btape: btape.c:1248 Wrote EOF to "Dell-PV-122T" (/dev/nsa0)

The test autochanger worked!!

*

  

--

 

BackOfficeService - Beratung und Service für Ihre IT -

 

Anschrift:

Niederkastenholzer Str. 40

53881 Euskirchen

Telefon:   +49 2255 953204

Fax:          +49 2255 953208

Mobil:      +49 177 3397547

Bankverbindung:

Raiffeisenbank Rheinbach Voreifel eG

Kto. Nr. 340286014 (BLZ 370 696 27)

Online:

info@backofficeservice.biz

www.backofficeservice.biz

 

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
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>