Hi Jean-Louis, Thanks for clarifying that. Interesting to see that the '-f' option for amlabel overrides the readblocksize.
I got an error reading 512MiB but found a threshold at 1MiB where I could read
the tape:
dd if=/dev/rmt/0bn bs=1024K count=1 of=/dev/null
0+1 records in
0+1 records out
32768 bytes (33 kB) copied, 0.0103029 s, 3.2 MB/s
This doesn't make sense as I had written to the tape 2MiB blocks using
amtapetype previously:
$ amtapetype -f -b 2048k -t ULT3580-TD5 weekly /dev/rmt/0bn
Checking for FSF_AFTER_FILEMARK requirement
device-property "FSF_AFTER_FILEMARK" "false"
Applying heuristic check for compression.
Wrote random (uncompressible) data at 87839727.2131148 bytes/sec
Wrote fixed (compressible) data at 282011755.789474 bytes/sec
Compression: enabled
Writing one file to fill the volume.
Wrote 1519520841728 bytes at 86133 kb/sec
Writing smaller files (15193866240 bytes) to determine filemark.
define tapetype ULT3580-TD5 {
comment "Created by amtapetype; compression enabled"
length 1483907072 kbytes
filemark 1820 kbytes
speed 86133 kps
blocksize 2048 kbytes
}
# LEOM is not supported for this drive and kernel
I powered off, then on the tape unit and got this:
dd if=/dev/rmt/0bn bs=1024K count=1 of=/dev/null
0+1 records in
0+1 records out
1047552 bytes (1.0 MB) copied, 0.0172134 s, 60.9 MB/s
On further inspection I think I have a driver issue. I see this in my logs when
I try to write with
blocksizes over 1MiB:
dd if=/dev/rmt/0b bs=1048577 count=1 of=/dev/null
dd: reading ‘/dev/rmt/0b’: Invalid argument
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.00532612 s, 0.0 kB/s
Dec 18 15:09:50 monza.motec.com.au scsi: [ID 107833 kern.notice]
/pci@0,0/pci8086,3c0a@3,2/pci1000,3020@0/iport@f/tape@w5000e11156304003,0 (st5):
Dec 18 15:09:50 monza.motec.com.au Read Write scsi_init_pkt() failure
Dec 18 15:09:50 monza.motec.com.au scsi: [ID 107833 kern.warning] WARNING:
/pci@0,0/pci8086,3c0a@3,2/pci1000,3020@0/iport@f/tape@w5000e11156304003,0 (st5):
Dec 18 15:09:50 monza.motec.com.au errors after pkt alloc (b_flags=0x2200065,
b_error=0x16)
Any thoughts?
Kind regards,
Tom
On 18/12/13 01:14, Jean-Louis Martineau wrote:
> Tom,
>
> You can define the block size as the BLOCK-SIZE device property in the
> changer section or in the
> tapetype, the device-property is used if it is set.
>
> You can define the read_block_size as the READ-BLOCK-SIZE device property in
> the changer section
> or in the tapetype, the device-property is used if it is set.
>
> The problem is the tape is already written with a block larger than 2048k.
>
> dd if=/dev/rmt/0bn bs=512m count=1 of=/dev/null
> should print the size of the block (if <= 512m)
>
> You can increase the value of the READ-BLOCK-SIZE device property, the
> readblocksize tapetype
> setting or simply use the '-f' flag of amlabel: amlabel -f weekly weekly00
> slot 1
>
> Jean-Louis
>
>
> On 12/16/2013 08:01 PM, Tom Robinson wrote:
>> Amanda 3.3.3
>> OmniOS (OpenSolaris derivative)
>>
>> Hi,
>>
>> I've got an IBM TS3200 robot working with mtx. The raw mtx command sees the
>> robot and tapes OK but
>> when I use amtape I get a 'block size too small' error.
>>
>> The amlabel command also fails with:
>>
>> $ amlabel weekly weekly00 slot 1
>> Reading label...
>> Error reading volume label: Error reading Amanda header: block size too small
>> Not writing label.
>>
>> In amanda.conf I adjusted the blocksize and readblocksize but amanda is
>> still not satisfied.
>>
>> Which blocksize is amanda unhappy about and where can I successfully adjust
>> the settings?
>>
>> Kind regards,
>> Tom
>>
>> in amanda.conf:
>>
>> define changer robot {
>> tpchanger "chg-robot:/dev/scsi/changer/c1t5000E11156304003d1"
>> property "tape-device" "0=tape:/dev/rmt/0bn"
>> #property "eject-before-unload" "yes"
>> property "use-slots" "1-23"
>> device-property "BLOCK_SIZE" "2048k"
>> }
>> tapedev "robot"
>>
>> tapetype ULT3580-TD5
>>
>> define tapetype global {
>> part_size 3G
>> part_cache_type none
>> }
>>
>> define tapetype ULT3580-TD5 {
>> global
>> comment "Created by amtapetype; compression enabled"
>> length 1483907072 kbytes
>> filemark 1820 kbytes
>> speed 86133 kps
>> blocksize 2048 kbytes
>> readblocksize 2048 kbytes
>> }
>>
>> $ mtx status
>> Storage Changer /dev/scsi/changer/c1t5000E11156304003d1:1 Drives, 24 Slots (
>> 1 Import/Export )
>> Data Transfer Element 0:Full (Storage Element 3 Loaded):VolumeTag = 050CHOL5
>> Storage Element 1:Full :VolumeTag=WEEK00L5
>> Storage Element 2:Full :VolumeTag=WEEK01L5
>> Storage Element 3:Empty
>> Storage Element 4:Full :VolumeTag=051CHOL5
>> Storage Element 5:Full :VolumeTag=052CHOL5
>> Storage Element 6:Full :VolumeTag=053CHOL5
>> Storage Element 7:Full :VolumeTag=054CHOL5
>> Storage Element 8:Empty
>> Storage Element 9:Empty
>> Storage Element 10:Empty
>> Storage Element 11:Empty
>> Storage Element 12:Empty
>> Storage Element 13:Empty
>> Storage Element 14:Empty
>> Storage Element 15:Empty
>> Storage Element 16:Empty
>> Storage Element 17:Empty
>> Storage Element 18:Empty
>> Storage Element 19:Empty
>> Storage Element 20:Empty
>> Storage Element 21:Empty
>> Storage Element 22:Empty
>> Storage Element 23:Empty
>> Storage Element 24 IMPORT/EXPORT:Empty
>>
>> $ amtape weekly inventory
>> slot 1: Error reading Amanda header: block size too small barcode WEEK00L5
>> slot 2: Error reading Amanda header: block size too small barcode WEEK01L5
>> slot 3: label amtapetype-1255848847 barcode 050CHOL5 (in drive 0)
>> slot 4: Error reading Amanda header: block size too small barcode 051CHOL5
>> slot 5: Error reading Amanda header: block size too small barcode 052CHOL5
>> slot 6: Error reading Amanda header: block size too small barcode 053CHOL5
>> slot 7: Error reading Amanda header: block size too small barcode 054CHOL5
>> (current)
>> slot 8: unknown state
>> slot 9: unknown state
>> slot 10: unknown state
>> slot 11: unknown state
>> slot 12: unknown state
>> slot 13: unknown state
>> slot 14: unknown state
>> slot 15: unknown state
>> slot 16: unknown state
>> slot 17: unknown state
>> slot 18: unknown state
>> slot 19: unknown state
>> slot 20: unknown state
>> slot 21: unknown state
>> slot 22: unknown state
>> slot 23: unknown state
>>
>> amtape.20131217113945.debug:
>> Tue Dec 17 11:49:45 2013: thd-85d2400: amtape: pid 3379 ruid 33 euid 33
>> version 3.3.3: start at Tue
>> Dec 17 11:49:45 2013
>> Tue Dec 17 11:49:45 2013: thd-85d2400: amtape: Arguments: weekly inventory
>> Tue Dec 17 11:49:45 2013: thd-85d2400: amtape: pid 3379 ruid 33 euid 33
>> version 3.3.3: rename at Tue
>> Dec 17 11:49:45 2013
>> Tue Dec 17 11:49:45 2013: thd-85d2400: amtape: chg-robot: using statefile
>> '/var/opt/csw/amanda/chg-robot-dev-scsi-changer-c1t5000E11156304003d1'
>> Tue Dec 17 11:49:45 2013: thd-85d2400: amtape: invoking /opt/csw/sbin/mtx -f
>> /dev/scsi/changer/c1t5000E11156304003d1 status
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Changer
>> /dev/scsi/changer/c1t5000E11156304003d1:1 Drives, 24 Slots ( 1 Import/Export
>> )
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Data Transfer Element
>> 0:Full (Storage Element 3
>> Loaded):VolumeTag = 050CHOL5
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 1:Full
>> :VolumeTag=WEEK00L5
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 2:Full
>> :VolumeTag=WEEK01L5
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 3:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 4:Full
>> :VolumeTag=051CHOL5
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 5:Full
>> :VolumeTag=052CHOL5
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 6:Full
>> :VolumeTag=053CHOL5
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 7:Full
>> :VolumeTag=054CHOL5
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 8:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 9:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 10:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 11:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 12:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 13:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 14:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 15:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 16:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 17:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 18:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 19:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 20:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 21:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 22:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 23:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: mtx: Storage Element 24
>> IMPORT/EXPORT:Empty
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: robot: updating state
>> Tue Dec 17 11:49:46 2013: thd-85d2400: amtape: pid 3379 finish time Tue Dec
>> 17 11:49:46 2013
>>
>>
>> amlabel.20131217115540.debug:
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: pid 3398 ruid 33 euid 33
>> version 3.3.3: start at Tue
>> Dec 17 11:55:40 2013
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: Arguments: weekly weekly00
>> slot 1
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: pid 3398 ruid 33 euid 33
>> version 3.3.3: rename at
>> Tue Dec 17 11:55:40 2013
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: chg-robot: using statefile
>> '/var/opt/csw/amanda/chg-robot-dev-scsi-changer-c1t5000E11156304003d1'
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: invoking /opt/csw/sbin/mtx -f
>> /dev/scsi/changer/c1t5000E11156304003d1 status
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Changer
>> /dev/scsi/changer/c1t5000E11156304003d1:1 Drives, 24 Slots ( 1 Import/Export
>> )
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Data Transfer Element
>> 0:Full (Storage Element 3
>> Loaded):VolumeTag = 050CHOL5
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 1:Full
>> :VolumeTag=WEEK00L5
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 2:Full
>> :VolumeTag=WEEK01L5
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 3:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 4:Full
>> :VolumeTag=051CHOL5
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 5:Full
>> :VolumeTag=052CHOL5
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 6:Full
>> :VolumeTag=053CHOL5
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 7:Full
>> :VolumeTag=054CHOL5
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 8:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 9:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 10:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 11:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 12:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 13:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 14:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 15:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 16:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 17:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 18:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 19:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 20:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 21:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 22:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 23:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: mtx: Storage Element 24
>> IMPORT/EXPORT:Empty
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: robot: updating state
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: robot: loading slot '1'
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: robot: using drive 0
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: robot: unloading drive 0
>> Tue Dec 17 11:55:40 2013: thd-8108200: amlabel: invoking /opt/csw/sbin/mtx -f
>> /dev/scsi/changer/c1t5000E11156304003d1 unload 3 0
>> Tue Dec 17 11:56:06 2013: thd-8108200: amlabel: robot: unload complete
>> Tue Dec 17 11:56:06 2013: thd-8108200: amlabel: invoking /opt/csw/sbin/mtx -f
>> /dev/scsi/changer/c1t5000E11156304003d1 load 1 0
>> Tue Dec 17 11:56:45 2013: thd-8108200: amlabel: robot: polling
>> 'tape:/dev/rmt/0bn' to see if it's
>> ready
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: warning: Buffer is too small
>> (2097152 bytes) from
>> /dev/rmt/0bn: Invalid argument
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: Device tape:/dev/rmt/0bn
>> error = 'Error reading
>> Amanda header: block size too small'
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: Device tape:/dev/rmt/0bn
>> setting status flag(s):
>> DEVICE_STATUS_DEVICE_ERROR, and DEVICE_STATUS_VOLUME_ERROR
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: invoking /opt/csw/sbin/mtx -f
>> /dev/scsi/changer/c1t5000E11156304003d1 status
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Changer
>> /dev/scsi/changer/c1t5000E11156304003d1:1 Drives, 24 Slots ( 1 Import/Export
>> )
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Data Transfer Element
>> 0:Full (Storage Element 1
>> Loaded):VolumeTag = WEEK00L5
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 1:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 2:Full
>> :VolumeTag=WEEK01L5
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 3:Full
>> :VolumeTag=050CHOL5
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 4:Full
>> :VolumeTag=051CHOL5
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 5:Full
>> :VolumeTag=052CHOL5
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 6:Full
>> :VolumeTag=053CHOL5
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 7:Full
>> :VolumeTag=054CHOL5
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 8:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 9:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 10:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 11:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 12:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 13:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 14:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 15:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 16:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 17:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 18:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 19:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 20:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 21:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 22:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 23:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: mtx: Storage Element 24
>> IMPORT/EXPORT:Empty
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: robot: updating state
>> Tue Dec 17 11:56:49 2013: thd-8108200: amlabel: pid 3398 finish time Tue Dec
>> 17 11:56:49 2013
>>
>>
>>
>
signature.asc
Description: OpenPGP digital signature
