Re: [Bacula-users] Got EOF on tape after reboot

2008-11-09 Thread Bruno Friedmann
Hi Carlo

Don't remember if it is necessary but I've alway assumed that btape need newly 
blank media.
So I always before run, issue a mt -f /dev/nst0 weof



Carlo Maesen wrote:
 Hello,
 
 I have installed bacula 2.4.3 from source.
 Now I am testing the tape-unit with mt and btape.
 The first time  I do btape -c /usr/local/bacula/bin/bacula-sd.conf 
 /dev/nst0, the test runs properly. 
 Then I unload the tape mt -f /dev/nst0 rewoff . I reboot the server. I load 
 the same tape. At that moment I have the following error when I run the btape 
 test command:
 #  btape -c /usr/local/bacula/bin/bacula-sd.conf /dev/nst0
 Tape block granularity is 1024 bytes.
 btape: butil.c:285 Using device: /dev/nst0 for writing.
 btape: btape.c:372 open device lto4drive (/dev/nst0): 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 lto4drive (/dev/nst0)
 btape: btape.c:847 Wrote 1000 blocks of 64412 bytes.
 btape: btape.c:505 Wrote 1 EOF to lto4drive (/dev/nst0)
 btape: btape.c:856 Rewind OK.
 1000 blocks re-read correctly.
 Got EOF on tape.
 06-Nov 15:30 btape JobId 0: Error: block.c:999 Read error on fd=3 at file:blk 
 1:0 on device lto4drive (/dev/nst0). ERR=Input/output error.
 Got EOF on tape.
 Got EOF on tape.
 
 
 When I load a new tape, the test runs properly, until I reboot the server.
 Ik tried the following without success:
 mt -f /dev/nst0 defblksize 0
 
 I am running Bacula 2.4.3 on CentOS 5.2.
 Harware Server: SunFire X2100
 TapeUnit: HP StorageWorks 1760.
 
 This is my bacula-sd.conf:
 #
 # Default Bacula Storage Daemon Configuration file
 #
 #  For Bacula release 2.4.3 (10 October 2008) -- redhat 
 #
 # You may need to change the name of your tape drive
 #   on the Archive Device directive in the Device
 #   resource.  If you change the Name and/or the 
 #   Media Type in the Device resource, please ensure
 #   that dird.conf has corresponding changes.
 #
 
 Storage { # definition of myself
   Name = itshas-sv11-sd
   SDPort = 9103  # Director's port  
   WorkingDirectory = /usr/local/bacula/
   Pid Directory = /usr/local/bacula/bin/working
   Maximum Concurrent Jobs = 20
 }
 
 #
 # List Directors who are permitted to contact Storage daemon
 #
 Director {
   Name = itshas-sv11-dir
   Password = xxx
 }
 
 #
 # Restricted Director, used by tray-monitor to get the
 #   status of the storage daemon
 #
 Director {
   Name = itshas-sv11-mon
   Password = xxx
   Monitor = yes
 }
 
 #
 # Devices supported by this Storage daemon
 # To connect, the Director's bacula-dir.conf must have the
 #  same Name and MediaType. 
 #
 
 #
 # A Linux or Solaris tape drive
 #
 Device {
  Name = lto4drive
  Media Type = LTO-4
  Archive Device = /dev/nst0
  AutomaticMount = yes;   # when device opened, read it
  AlwaysOpen = no;
  RemovableMedia = yes;
  RandomAccess = no;
  Alert Command = sh -c 'smartctl -H -l error %c'  
 }
 
 # 
 # Send all messages to the Director, 
 # mount messages also are sent to the email address
 #
 Messages {
   Name = Standard
   director = itshas-sv11-dir = all
 }
 
 There is no logging in the messages-file.
 
 
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users


-- 

 Bruno Friedmann

Ioda-Net Sàrl
  2830 Vellerat - Switzerland

  Tél : ++41 32 435 7171
  Fax : ++41 32 435 7172
  gsm : ++41 78 802 6760
  www.ioda-net.ch

 Centre de Formation et de Coaching En Ligne
 www.cfcel.com


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Got EOF on tape after reboot

2008-11-06 Thread Carlo Maesen
Hello,

I have installed bacula 2.4.3 from source.
Now I am testing the tape-unit with mt and btape.
The first time  I do btape -c /usr/local/bacula/bin/bacula-sd.conf /dev/nst0, 
the test runs properly. 
Then I unload the tape mt -f /dev/nst0 rewoff . I reboot the server. I load 
the same tape. At that moment I have the following error when I run the btape 
test command:
#  btape -c /usr/local/bacula/bin/bacula-sd.conf /dev/nst0
Tape block granularity is 1024 bytes.
btape: butil.c:285 Using device: /dev/nst0 for writing.
btape: btape.c:372 open device lto4drive (/dev/nst0): 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 lto4drive (/dev/nst0)
btape: btape.c:847 Wrote 1000 blocks of 64412 bytes.
btape: btape.c:505 Wrote 1 EOF to lto4drive (/dev/nst0)
btape: btape.c:856 Rewind OK.
1000 blocks re-read correctly.
Got EOF on tape.
06-Nov 15:30 btape JobId 0: Error: block.c:999 Read error on fd=3 at file:blk 
1:0 on device lto4drive (/dev/nst0). ERR=Input/output error.
Got EOF on tape.
Got EOF on tape.


When I load a new tape, the test runs properly, until I reboot the server.
Ik tried the following without success:
mt -f /dev/nst0 defblksize 0

I am running Bacula 2.4.3 on CentOS 5.2.
Harware Server: SunFire X2100
TapeUnit: HP StorageWorks 1760.

This is my bacula-sd.conf:
#
# Default Bacula Storage Daemon Configuration file
#
#  For Bacula release 2.4.3 (10 October 2008) -- redhat 
#
# You may need to change the name of your tape drive
#   on the Archive Device directive in the Device
#   resource.  If you change the Name and/or the 
#   Media Type in the Device resource, please ensure
#   that dird.conf has corresponding changes.
#

Storage { # definition of myself
  Name = itshas-sv11-sd
  SDPort = 9103  # Director's port  
  WorkingDirectory = /usr/local/bacula/
  Pid Directory = /usr/local/bacula/bin/working
  Maximum Concurrent Jobs = 20
}

#
# List Directors who are permitted to contact Storage daemon
#
Director {
  Name = itshas-sv11-dir
  Password = xxx
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the storage daemon
#
Director {
  Name = itshas-sv11-mon
  Password = xxx
  Monitor = yes
}

#
# Devices supported by this Storage daemon
# To connect, the Director's bacula-dir.conf must have the
#  same Name and MediaType. 
#

#
# A Linux or Solaris tape drive
#
Device {
 Name = lto4drive
 Media Type = LTO-4
 Archive Device = /dev/nst0
 AutomaticMount = yes;   # when device opened, read it
 AlwaysOpen = no;
 RemovableMedia = yes;
 RandomAccess = no;
 Alert Command = sh -c 'smartctl -H -l error %c'  
}

# 
# Send all messages to the Director, 
# mount messages also are sent to the email address
#
Messages {
  Name = Standard
  director = itshas-sv11-dir = all
}

There is no logging in the messages-file.



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users