On Fri, Feb 08, 2002 at 07:31:08PM -0500, John R. Jackson wrote: > >where doing Daily backups to DDS3 tapes with a block size of 4096, which > >seem to work sometimes. more often than if I use a block size of 0. > > I'm amazed that works unless you re-amlabel the tapes whenever you > change the blocksize. Going either direction without doing so should > cause errors. > > >and where doing Monthly backups to DDS4 tapes with a block size of 4096, > >and they completely fail with the error messages below. > > Are you certain those tapes were created with 4K? > > Set the block size back to zero (for the moment) and do this: > > mt rewind > dd if=$TAPE bs=32k of=/tmp/first-record count=1 > mt rewind > dd if=$TAPE bs=32k of=/tmp/first-file > > See how big /tmp/first-record is. That's the block size the tape was > written at. > > If it's 4K, the second dd should tell you it read 0+8 records (no full > 32K blocks, 8 partials), and /tmp/first-file should be 32K.
its not happy: root@bast:~# mt -f /dev/scsi/host0/bus0/target15/lun0/mtn status SCSI 2 tape drive: File number=0, block number=0, partition=0. Tape block size 4096 bytes. Density code 0x26 (DDS-4 or QIC-4GB). Soft error count since last status=0 General status bits on (41010000): BOT ONLINE IM_REP_EN root@bast:~# mt -f /dev/scsi/host0/bus0/target15/lun0/mtn setblk 0 root@bast:~# mt -f /dev/scsi/host0/bus0/target15/lun0/mtn status SCSI 2 tape drive: File number=0, block number=0, partition=0. Tape block size 0 bytes. Density code 0x26 (DDS-4 or QIC-4GB). Soft error count since last status=0 General status bits on (41010000): BOT ONLINE IM_REP_EN root@bast:~# mt -f /dev/scsi/host0/bus0/target15/lun0/mtn rewind root@bast:~# dd if=/dev/scsi/host0/bus0/target15/lun0/mtn of=/tmp/first-record count=1 dd: reading `/dev/scsi/host0/bus0/target15/lun0/mtn': Cannot allocate memory 0+0 records in 0+0 records out root@bast:~# rm /tmp/first-record root@bast:~# dd if=/dev/scsi/host0/bus0/target15/lun0/mtn of=/tmp/first-file dd: reading `/dev/scsi/host0/bus0/target15/lun0/mtn': Cannot allocate memory 0+0 records in 0+0 records out root@bast:~# ls -la /tmp/first-record -rw-r--r-- 1 root root 0 Feb 9 12:46 /tmp/first-record root@bast:~# ls -la /tmp/first-file -rw-r--r-- 1 root root 0 Feb 9 12:46 /tmp/first-file root@bast:~# but with it back at 4096: root@bast:~# mt -f /dev/scsi/host0/bus0/target15/lun0/mtn setblk 4096 root@bast:~# mt -f /dev/scsi/host0/bus0/target15/lun0/mtn status SCSI 2 tape drive: File number=0, block number=2, partition=0. Tape block size 4096 bytes. Density code 0x26 (DDS-4 or QIC-4GB). Soft error count since last status=0 General status bits on (1010000): ONLINE IM_REP_EN root@bast:~# mt -f /dev/scsi/host0/bus0/target15/lun0/mtn rewind root@bast:~# dd if=/dev/scsi/host0/bus0/target15/lun0/mtn of=/tmp/first-record count=1 1+0 records in 1+0 records out root@bast:~# dd if=/dev/scsi/host0/bus0/target15/lun0/mtn of=/tmp/first-file 0+0 records in 0+0 records out root@bast:~# ls -la /tmp/first-record -rw-r--r-- 1 root root 512 Feb 9 12:48 /tmp/first-record root@bast:~# ls -la /tmp/first-file -rw-r--r-- 1 root root 0 Feb 9 12:48 /tmp/first-file root@bast:~#
