Problem
When reading data via cpio from a tape I get the following error:
UX:cpio: HALT: medium's unformattedorUX: cpio: HALT: Medium is unformattedWhat's causing this and how can I test the automated addition of tape device(s)?
Cause
You have an issue with either how the tape has been added to the server or a hardware issue with either the controller, lead, tape drive or tape media.
Check /usr/adm/syslog for any CHECK CONDIDITION errors from the SCSI controller driver.
Solution
1. Check the tape is listed correctly in "/sbin/sdiconfig -l", eg:1:0,7,0: HBA : (adst70,1) Adaptec Ultra160
0,6,0: TAPE : BNCHMARKDLT1 55382. Try the commands with variable tape blocking set:For UW7: tapecntl -vFor OSR6: tape -a 0 setblk3. Ensure that if you have used the "-B" or "-C<value>"
that that same value is also used to read or view the tape.For example, to backup:# find . -print | cpio -ocv -C32768 -O/dev/rct0To restore:# cpio -ivdumc -C32768 -I/dev/rct04. Check the /dev/rmt/ctape1 is correctly assigned to the device
listed in "sdiconfig -l" command with "devattr", eg:# devattr /dev/rmt/ctape1ctape1
SCSI
65536
/dev/rmt/c1b0t6l0
/dev/erct0,/dev/nrct0,/dev/rct0,/dev/rmt/c0s0,/dev/rmt/c0s0n,/dev
/rmt/c0s0nr,/dev/rmt/c0s0r,/dev/rmt/c1b0t6l0n,/dev/rmt/c1b0t6l0nr
,/dev/rmt/c1b0t6l0r,/dev/rmt/c1b0t6l0u,/dev/rmt/ctape1,/dev/rmt/n
rtape1,/dev/rmt/ntape1,/dev/rmt/rtape1,/dev/rmt/utape1,/dev/xct0
/bin/dd if=CDEVICE1 of=CDEVICE2 bs=10240
Tape Drive 1
true
/usr/lib/tape/tapecntl -e /dev/rmt/c1b0t6l0n
BNCHMARKDLT1 5538
/dev/rmt/c1b0t6l0n
true
true
/usr/lib/tape/tapecntl -t /dev/rmt/c1b0t6l0n
/usr/lib/tape/tapecntl -w /dev/rmt/c1b0t6l0n
/usr/lib/tape/tapecntl -w /dev/rmt/c1b0t6l0n
true
qtape
cartridge5. Check "crontab -l" to determine when your backup is run and by
what method.Troubleshooting:
---------------
When I run a "tapecntl -r" command or "tape reset" to perform a test
tape reset, I get:UX:tapecntl: ERROR: Device open failure. UX:tapecntl: ERROR: Please check tape or cables are installed properly. Operation may not be valid on this controller type.
- Before calling an hardware engineer to replace the drive:
1) Shut the server down and check the cables the boot the server. 2) Place a cleaning tape media in the drive (to clean the tape drive) 3) Place a new Tape media (not used one) and see if the night backup will work manually. 4) If not, then it's likely you have either a hardware issue with the tape itself or a cable issue or, less likely, with the controller the tape drive is attached to.
When adding a new tape drive:
----------------------------
1) OpenServer6 and UnixWare7 will automatically detect a tape drive
upon a system reboot. As long as the HBA controller the tape
drive is connected to see's the tape drive at the boot stage then
SCO unix should see it too.If the devices are detected at boot time and 'sdiconfig -l' lists
the entry for a TAPE during the boot cycle, but, no tape is shown
after boot in 'sdiconfig -l', check that a flat file hasn't been
written to the /dev/rmt directory, which will prevent the new
tape device nodes from being created. A typical reason for this
happening is a cpio or tar being written to /dev/rmt/ctape1 but
there is no tape drive connected so the backup is written to this
file on the root disk which may also endanger your root disk
space capacity too.2) If not, then this is likely to be a driver or hardware issue.
3) For OpenServer6, once booted, it will not be necessary to run "mkdev tape" as required with OpenServer5.
# mkdev tape
Mass storage devices are configured automatically
when the system is booted with a new device present.Current tape drive configuration:Alias - Address - Inquiry String
-------- -------- --------------See st01(7) for information about tape drive device nodes.
For both OpenServer6 and UnixWare7, the tape drive should be accessible as a device from /dev/rmt to be used with your backup commands, usually /dev/rmt/ctape1, eg. "cpio", "tar" or 3rd party tools such as BackupEdge, as examples.
See also
cpio(1)
tape(C)
tapecntl(C)
st01(HW)TA116163, "How do I install UnixWare7 on a Compaq ML series server"