[ Previous |
AIX Version 4.3 Problem Solving Guide and Reference
Check for Media Errors
Check for media errors by:
Reading from the Media
Reading from the media involves detecting the data
and format information on a media.
- You can use the dd command to check a disk or diskette.
For example, to read a diskette on drive rfd0
dd if=/dev/rfd0 of=/dev/null bs36b
where the bs flag specifies the internal buffer size for dd.
Note: A value of 36b for this flag greatly
enhances the performance of this operation. With a buffer size of 18KB, dd can
read both tracks of a diskette in only two revolutions of the diskette.
- You can also use the
command to read a tape.
For example, to read a tape on device rmt0
- Media errors are also recorded in the error log. For example, entries labeled TAPE_ERR1 indicate tape media error. For further information, see "Error Logging Facility" and "Error Identifiers for the Error Log" .
If the media can be read successfully with the dd or the tcopy command, a syntax or usage problem possibly exists. Syntax or usage problems could include:
- Incorrect archive utility was used.
- cpio backup was not written with ASCII headers and the command specifies
ASCII headers (-c).
- tar command has calculated a checksum different from what is recorded on
the tape indicating that the incorrect volume may be in the drive. (Use the -i
flag to ignore checksums.)
- For tapes, the DEVICE block size is different than
the size of the tape file's blocks.
- For tapes, the archive utility does not have enough
buffer space to hold an entire block from the tape file.
Writing to the Media
Attention: The reformatting procedure
destroys all data on the media.
Writing to the media also helps you check for media problems.
- Use the format or dosformat
(formats a DOS diskette) commands to format diskettes.
For example, to format a diskette in the diskette drive
format -d /dev/rfd0
dosformat -D /dev/rdf0
- Use the dd command to write data to a tape.
For example, to write the file motd
dd if=/etc/motd of=/dev/rmt0
Note: Writing data to a tape ensures that
only that portion of the tape that is written to is not damaged.
back to Media Problems.
[ Previous |