FreeBSD - Bacula und Sony Tape?

onegroup

Well-Known Member
Hallo,

ich habe hier ein Sony SDX-500c 8x-Autoloader AIT2.

Er wird von BSD erkannt als:

<SONY SDX-500C 0203> at scbus0 target 2 lun 0 (pass0,sa0)
<SONY LIB-81 0102> at scbus0 target 5 lun 0 (pass1)

Hat jemand eine Ahnung wie ich es schaffe das Teil zum laufen zum bringen? Infomässig finde ich nichts.

Hier noch meine Bacula Konfiguration:

bacula-sd.conf

Device {
Name = "autochanger1";
Media Type = AIT-1;
Archive Device = /dev/pass0;
Changer Device = /dev/sa0;
Changer Command = "/usr/local/sbin/chio-bacula %c %o %S %a";
Label Media = yes;
AutoChanger = yes;
AutomaticMount = yes; # when device opened, read it
AlwaysOpen = yes;
# Due to supposed limitations in FreeBSD SCSI tape driver:
Hardware End of Medium = No
Fast Forward Space File = No
BSF at EOM = yes

# Backward Space Record = no;
# Hardware End of Medium = no;
# Fast Forward Space File = no;
# BSF at EOM = yes;

}

bacula-dir.conf

Storage {
Name = "Autochanger1-int"
Address = AXIS-FILE
SDPort = 9103
Device = "autochanger1"
Password = "hoXGFrhdn7VSSCgTPPep6cD8Ce1K1fEvVDN9dop7FmFy"
Media Type = AIT-1
Autochanger = yes
}

Ansonsten noch die Fehlerausgabe beim label:

Using default Catalog name=MyCatalog DB=bacula
The defined Storage resources are:
1: File
2: Autochanger1-int
Select Storage resource (1-2): 2
Enter new Volume name: ax1
Enter slot (0 for none): 1
Automatically selected Pool: Default
Connecting to Storage daemon Autochanger1-int at AXIS-FILE:9103 ...
Sending label command for Volume "ax1" Slot 1 ...
mt: /dev/pass0: Operation not permitted
3301 Issuing autochanger "loaded" command.
3991 Bad autochanger "load slot" status=1.
3302 Issuing autochanger "unload" command.
chio: /dev/sa0: open: Device not configured
chio: /dev/sa0: open: Device not configured
chio: /dev/sa0: open: Device not configured
chio: /dev/sa0: open: Device not configured
3303 Issuing autochanger "load slot 1" command.

3992 Bad autochanger "load slot" status=1.
3912 Failed to label Volume: ERR=dev.c:374 Rewind error on /dev/pass0. ERR=Function not implemented.

Label command failed.
Do not forget to mount the drive!!!

Oder gibt es ein Backupprogramm was man empfehlen kann?

Grüße

Steffen
 
Ich finde Bacula ist ein Backupprogramm, das man empfehlen kann!!!! ;)

Die Meldung

mt: /dev/pass0: Operation not permitted

deutet auf ein Berechtigungsproblem hin. Hast Du die Berechtigungen auf das Device schon geprüft?

Oder müsste in dem genannten Fall nicht das Archive Device /dev/pass1 sein?????

Gruß,

Ice
 
Hallo,

ich habe gestern 6 Stunden probiert gesucht...


hier der Rest habe ich vergessen zu posten.

/dev/pass1 habe ich probiert ging aber auch nicht.


AXIS-FILE# ls -l /dev/sa*
crw-rw-r-- 4 root operator 14, 0 Apr 6 17:35 /dev/sa0
crw-rw-r-- 4 root operator 14, 0 Apr 6 17:35 /dev/sa0.0
crw-rw-r-- 2 root operator 14, 4 Jun 6 2003 /dev/sa0.1
crw-rw-r-- 2 root operator 14, 8 Jun 6 2003 /dev/sa0.2
crw-rw-r-- 2 root operator 14, 12 Jun 6 2003 /dev/sa0.3
crw-rw-r-- 2 root operator 14, 0x20000000 Jun 6 2003 /dev/sa0.ctl

AXIS-FILE# ls -l /dev/pass*
crw-rw-r-- 1 root operator 31, 0 Jun 6 2003 /dev/pass0
crw-rw-r-- 1 root operator 31, 1 Jun 6 2003 /dev/pass1
crw-rw-r-- 1 root operator 31, 2 Jun 6 2003 /dev/pass2
crw-rw-r-- 1 root operator 31, 3 Jun 6 2003 /dev/pass3

AXIS-FILE# ls -l /dev/nrsa*
crw-rw---- 4 root operator 14, 1 Jun 6 2003 /dev/nrsa0
crw-rw---- 4 root operator 14, 1 Jun 6 2003 /dev/nrsa0.0
crw-rw---- 2 root operator 14, 5 Jun 6 2003 /dev/nrsa0.1
crw-rw---- 2 root operator 14, 9 Jun 6 2003 /dev/nrsa0.2
crw-rw---- 2 root operator 14, 13 Jun 6 2003 /dev/nrsa0.3


AXIS-FILE# chio -f /dev/sa0 status
chio: /dev/sa0: open: Device not configured
AXIS-FILE# chio -f /dev/pass0 status
chio: /dev/pass0: CHIOGPARAMS: Inappropriate ioctl for device
AXIS-FILE# chio -f /dev/pass1 status
chio: /dev/pass1: CHIOGPARAMS: Inappropriate ioctl for device
 
Das Problem ist, das ich nicht weiss wie.

Ein Tape anbinden ist für mich neu. Angeblich soll es ja gehen.

Gibt es irgendwo eine Beschreibung für BSD?

und was ist ch0?
 
man chio ;-)

EDIT:
"man mt" ist noch was für Dich, und versuche mittels "dump" was auf das tape zu schreiben.
 
Hallo,

bin jetzt vor Ort am Laufwerk.

der Log sagt folgendes:

Apr 6 20:51:41 AXIS-FILE /kernel: sa0 at ahc0 bus 0 target 2 lun 0
Apr 6 20:51:41 AXIS-FILE /kernel: sa0: <SONY SDX-500C 0203> Removable Sequential Access SCSI-2 device
Apr 6 20:51:41 AXIS-FILE /kernel: sa0: 40.000MB/s transfers (20.000MHz, offset 15, 16bit)
Apr 6 20:51:41 AXIS-FILE /kernel: pass1 at ahc0 bus 0 target 5 lun 0
Apr 6 20:51:41 AXIS-FILE /kernel: pass1: <SONY LIB-81 0102> Removable Changer SCSI-2 device
Apr 6 20:51:41 AXIS-FILE /kernel: pass1: 80.000MB/s transfers (40.000MHz, offset 32, 16bit)


AXIS-FILE# chio -f /dev/sa0
usage: chio [-f changer] command [-<flags>] arg1 arg2 [arg3 [...]]

AXIS-FILE# chio -f /dev/sa0 status
chio: /dev/sa0: open: Device not configured

AXIS-FILE# dmesg | grep sa0
isa0: <ISA bus> on isab0
orm0: <Option ROMs> at iomem 0xc0000-0xca7ff,0xd4000-0xd47ff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio1 at port 0x2f8-0x2ff irq 3 on isa0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
sa0 at ahc0 bus 0 target 2 lun 0
sa0: <SONY SDX-500C 0203> Removable Sequential Access SCSI-2 device
sa0: 40.000MB/s transfers (20.000MHz, offset 15, 16bit)

AXIS-FILE# dmesg | grep ch0

AXIS-FILE# dmesg | grep pass1
pass1 at ahc0 bus 0 target 5 lun 0
pass1: <SONY LIB-81 0102> Removable Changer SCSI-2 device
pass1: 80.000MB/s transfers (40.000MHz, offset 32, 16bit)

AXIS-FILE# mt -f /dev/pass1 status
mt: /dev/pass1: Operation not permitted

AXIS-FILE# mt -f /dev/pass0 status
mt: /dev/pass0: Operation not permitted

AXIS-FILE# mt -f /dev/sa0 status
mt: /dev/sa0: Device not configured

dump sagt folgendes

AXIS-FILE# dump -0uf /dev/pass1 /
DUMP: Date of this level 0 dump: Wed Apr 14 17:27:55 2004
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/da0s1a (/) to /dev/pass1
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 134855 tape blocks on 3.47 tape(s).
DUMP: Cannot open output "/dev/pass1".
DUMP: Do you want to retry the open?: ("yes" or "no") no
DUMP: The ENTIRE dump is aborted.


AXIS-FILE# dump -0uf /dev/sa0 /
DUMP: Date of this level 0 dump: Wed Apr 14 17:28:41 2004
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/da0s1a (/) to /dev/sa0
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 134855 tape blocks on 3.47 tape(s).
DUMP: Cannot open output "/dev/sa0".
DUMP: Do you want to retry the open?: ("yes" or "no")

ein tar auf das laufwerk funktioniert auch nicht.


Hab keine Ahnung was ich noch schauen muss?

Gruß

Steffen
 
asg hat schon recht. Dein Sony sollte eigentlich als device ch0 erscheinen.
Verwendest Du 4.x oder 5.x?

Ist die folgende Option in Deinem Kernel drin?

device ch # SCSI media changers

Gruß,

Ice
 
hab die 4.8 laufen

device ch gibt es nicht, hole ich aber grad nach.

jetzt gibt es

ch0 at ahc0 bus 0 target 5 lun 0
Apr 14 18:01:54 AXIS-FILE /kernel: ch0: <SONY LIB-81 0102> Removable Changer SCSI-2 device
Apr 14 18:01:54 AXIS-FILE /kernel: ch0: 80.000MB/s transfers (40.000MHz, offset 32, 16bit)
Apr 14 18:01:54 AXIS-FILE /kernel: ch0: 8 slots, 1 drive, 1 picker, 0 portals


ein

AXIS-FILE# dump -f /dev/rsa0 /
DUMP: Date of this level 0 dump: Wed Apr 14 17:49:44 2004
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/da0s1a (/) to /dev/rsa0
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 134856 tape blocks on 3.47 tape(s).
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]


Schreibt auf das laufwerk. denke ich zumindest. die DIGI Anzeige dort sagt write.


Bacula sagt:

Connecting to Director AXIS-FILE:9101
1000 OK: AXIS-FILE-dir Version: 1.32f-5 (09 Mar 2004)
Enter a period to cancel a command.
*label
Using default Catalog name=MyCatalog DB=bacula
The defined Storage resources are:
1: File
2: Autochanger1-int
Select Storage resource (1-2): 2
Enter new Volume name: ax1
Enter slot (0 for none): 1
Automatically selected Pool: Default
Connecting to Storage daemon Autochanger1-int at AXIS-FILE:9103 ...
Sending label command for Volume "ax1" Slot 1 ...
3301 Issuing autochanger "loaded" command.
mt: /dev/pass0: Operation not permitted
3991 Bad autochanger "load slot" status=1.
3302 Issuing autochanger "unload" command.
chio: /dev/ch0: CHIOGSTATUS: Invalid argument
chio: /dev/ch0: CHIOMOVE: Operation not supported by device
chio: /dev/ch0: CHIOMOVE: Operation not supported by device
3303 Issuing autochanger "load slot 1" command.
3992 Bad autochanger "load slot" status=1.
3912 Failed to label Volume: ERR=dev.c:374 Rewind error on /dev/pass0. ERR=Function not implemented.

Label command failed.

Hab das aus dem Netz in die bacula_sd.conf

Device {
Name = "autochanger1";
Media Type = AIT-1;
Archive Device = /dev/pass0;
Changer Device = /dev/ch0;
Changer Command = "/usr/local/sbin/chio-bacula %c %o %S %a";
Label Media = yes;
AutoChanger = yes;
AutomaticMount = yes; # when device opened, read it
AlwaysOpen = yes;
Hardware End of Medium = No
Fast Forward Space File = No
BSF at EOM = yes
}

ein

mtx-changer /dev/pass1 list

ergibt
2:
3:
4:
5:
6:
7:
8:

Funtz aber nicht so richtig

Gruß

Steffen
 
Zuletzt bearbeitet:
Soweit so gut:

ich richte mich nach der beschreibung:

http://www.bacula.org/html-manual/autochangers.html

#!/bin/sh
/usr/local/etc/mtx-changer /dev/pass1 unload
/usr/local/etc/mtx-changer /dev/pass1 load 3
mt -f /dev/rsa0 rewind
mt -f /dev/rsa0 weof

das script funktioniert. Erwechselt die Bänder und macht rewind und schreibt was rauf.

edit
-----------------------------------------------------------
Bacula und der Streamer läuft. Allerdings auch ohne ch0.

Ich habe testhalber mal

Schedule {
Name = "WeeklyCycle"
Run = Level=Incremental mon-sat at 5:05
}

eingebaut wird das automatisch ausgeführt solange bacula gestartet ist? oder muss ich das noch irgendwie mit einem Cronjob anstossen?

Ich habe ein Backup von 20 GB in knapp 3/4 Stunde gemacht ist das in Ordnung?

Gruß

Steffen
 
Zuletzt bearbeitet:
Hallo,

der Streamer läuft und macht ein backup.

Hat jemand diesen winbacula zum laufen gebracht oder gibt es eine andere Software darauf zuzugreifen?


Gruß

Steffen
 
Zurück
Oben