web-dev-qa-db-ja.com

テープドライブ+オートチェンジャーのセットアップ中のBaculaでの入出力(読み取り)エラー

Baculaでlabel barcodeコマンドを実行すると、入力/出力エラーが発生します。私はこれを設定しようとし始めたばかりです:

Connecting to Storage daemon TapeDevice at ny-back01.ny.stackoverflow.com:9103 ...
Sending label command for Volume "ACJ332" Slot 1 ...
3307 Issuing autochanger "unload slot 8, drive 0" command.
3304 Issuing autochanger "load slot 1, drive 0" command.
3305 Autochanger "load slot 1, drive 0", status is OK.
block.c:1010 Read error on fd=5 at file:blk 0:0 on device "ULTRIUM-HH4" (/dev/st0). ERR=Input/output error.
3000 OK label. VolBytes=64512 DVD=0 Volume="ACJ332" Device="ULTRIUM-HH4" (/dev/st0)
Catalog record for Volume "ACJ332", Slot 1  successfully created.
Sending label command for Volume "ACJ331" Slot 2 ...
3307 Issuing autochanger "unload slot 1, drive 0" command.
3304 Issuing autochanger "load slot 2, drive 0" command.
3305 Autochanger "load slot 2, drive 0", status is OK.
block.c:1010 Read error on fd=5 at file:blk 0:0 on device "ULTRIUM-HH4" (/dev/st0). ERR=Input/output error.
3000 OK label. VolBytes=64512 DVD=0 Volume="ACJ331" Device="ULTRIUM-HH4" (/dev/st0)
Catalog record for Volume "ACJ331", Slot 2  successfully created.
Sending label command for Volume "ACJ328" Slot 3 ...
3307 Issuing autochanger "unload slot 2, drive 0" command.
3304 Issuing autochanger "load slot 3, drive 0" command.
3305 Autochanger "load slot 3, drive 0", status is OK.
block.c:1010 Read error on fd=5 at file:blk 0:0 on device "ULTRIUM-HH4" (/dev/st0). ERR=Input/output error.
3000 OK label. VolBytes=64512 DVD=0 Volume="ACJ328" Device="ULTRIUM-HH4" (/dev/st0)
Catalog record for Volume "ACJ328", Slot 3  successfully created.
Sending label command for Volume "ACJ329" Slot 4 ...
3307 Issuing autochanger "unload slot 3, drive 0" command.
3304 Issuing autochanger "load slot 4, drive 0" command.
3305 Autochanger "load slot 4, drive 0", status is OK.
block.c:1010 Read error on fd=5 at file:blk 0:0 on device "ULTRIUM-HH4" (/dev/st0). ERR=Input/output error.
3000 OK label. VolBytes=64512 DVD=0 Volume="ACJ329" Device="ULTRIUM-HH4" (/dev/st0)
Catalog record for Volume "ACJ329", Slot 4  successfully created.
Sending label command for Volume "ACJ335" Slot 5 ...
3307 Issuing autochanger "unload slot 4, drive 0" command.
3304 Issuing autochanger "load slot 5, drive 0" command.
3305 Autochanger "load slot 5, drive 0", status is OK.
block.c:1010 Read error on fd=5 at file:blk 0:0 on device "ULTRIUM-HH4" (/dev/st0). ERR=Input/output error.
3000 OK label. VolBytes=64512 DVD=0 Volume="ACJ335" Device="ULTRIUM-HH4" (/dev/st0)
Catalog record for Volume "ACJ335", Slot 5  successfully created.
Sending label command for Volume "ACJ334" Slot 6 ...
3307 Issuing autochanger "unload slot 5, drive 0" command.
3304 Issuing autochanger "load slot 6, drive 0" command.
3305 Autochanger "load slot 6, drive 0", status is OK.
block.c:1010 Read error on fd=5 at file:blk 0:0 on device "ULTRIUM-HH4" (/dev/st0). ERR=Input/output error.
3000 OK label. VolBytes=64512 DVD=0 Volume="ACJ334" Device="ULTRIUM-HH4" (/dev/st0)
Catalog record for Volume "ACJ334", Slot 6  successfully created.
Sending label command for Volume "ACJ333" Slot 7 ...
3307 Issuing autochanger "unload slot 6, drive 0" command.
3304 Issuing autochanger "load slot 7, drive 0" command.
3305 Autochanger "load slot 7, drive 0", status is OK.
block.c:1010 Read error on fd=5 at file:blk 0:0 on device "ULTRIUM-HH4" (/dev/st0). ERR=Input/output error.
3000 OK label. VolBytes=64512 DVD=0 Volume="ACJ333" Device="ULTRIUM-HH4" (/dev/st0)
Catalog record for Volume "ACJ333", Slot 7  successfully created.
Sending label command for Volume "ACJ330" Slot 8 ...
3307 Issuing autochanger "unload slot 7, drive 0" command.

Bacula-dir:

    # Definition of file storage device
    Storage {
      Name = TapeDevice
    # Do not use "localhost" here    
      Address = ny-back01....     # N.B. Use a fully qualified name here
      SDPort = 9103
      Password = "..."
      Device = ULTRIUM-HH4
      Media Type = LTO-4
      Media Type = File
      Autochanger = Yes
    }

Bacula-sd:

Autochanger {
        Name = StorageLoader1U
        Device = ULTRIUM-HH4
        Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
        Changer Device = /dev/sg5
}

Device {
        Name = ULTRIUM-HH4
        Media Type = LTO-4
        Archive Device = /dev/st0
        AutomaticMount = yes;
        AlwaysOpen = yes;
        RemovableMedia = yes;
        RandomAccess = no;
        AutoChanger = yes;
        RandomAccess = no;
}

これが何を意味するのか/なぜ私がこれを取得しているのか誰もが知っていますか?

1
Kyle Brandt

さて、次の設定エラーのためです:

  Media Type = LTO-4
  Media Type = File

バキュラを混乱させたようです。メディアは、list mediaコマンドからファイルタイプとしてリストされました。だから私がしたことは、プールをドロップしてから、label barcodeで再スキャンしようとしたことです。しかし、テープにはすでにバキュラボリュームラベルが付いていたため、拒否されました。これを修正するために、私はこの小さなループを作りました:

for i in $(seq 1 8); do 
    /etc/bacula/scripts/mtx-changer /dev/sg5 load $i /dev/st0 0
    mt -f /dev/st0 rewind
    mt -f /dev/st0 weof
    /etc/bacula/scripts/mtx-changer /dev/sg5 unload $i /dev/st0 0
done

その後、元のエラーまたは「3920ボリュームはすでにラベル付けされているためラベル付けできません」エラーなしで、今回もlabel barcodeを実行できました。

2
Kyle Brandt