addbadsec(1M) manual page
Table of Contents
addbadsec - map out defective disk blocks
addbadsec [ -p ]
[ -a blkno [ blkno ... ] ] [ -f filename ] raw_device
x86
SUNWcsu
addbadsec is used by the system administrator to
map out bad disk blocks. Normally, these blocks are identified during surface
analysis, but occasionally the disk subsystem reports unrecoverable data
errors indicating a bad block. A block number reported in this way can be
fed directly into addbadsec, and the block will be remapped. addbadsec
will first attempt hardware remapping. This is supported on SCSI drives
and takes place at the disk hardware level. If the taget is an IDE drive,
then software remapping is used. In order for software remapping to succeed,
the partition must contain an alternate slice and there must be room in
this slice to perform the mapping.
- -p
- Causes addbadsec to print the current
software map. The output shows the defective block and the assigned alternate.
This option cannot be used to print the hardware map.
- -a
- Adds the specified
blocks to the hardware or software map. If more than one block number is
specified, the entire list should be quoted and block numbers should be
separated by white space.
- -f
- Adds the specified blocks to the hardware or
software map. The bad blocks are listed, one per line, in the specified
file.
It should be understood that bad blocks lead to data loss. Remapping
a defective block does not repair a damaged file. If a bad block occurs
to a disk-resident file system structure such as a superblock, the entire
slice might have to be recovered from a backup.
The raw device should
be /dev/rdsk/c?t?d?p0.
fdisk(1M)
, fmthard(1M)
, diskscan(1M)
Table of Contents