1addbadsec(1M) System Administration Commands addbadsec(1M)
2
3
4
6 addbadsec - map out defective disk blocks
7
9 addbadsec [-p] [-a blkno [blkno]...] [-f filename] raw_device
10
11
13 addbadsec is used by the system administrator to map out bad disk
14 blocks. Normally, these blocks are identified during surface analysis,
15 but occasionally the disk subsystem reports unrecoverable data errors
16 indicating a bad block. A block number reported in this way can be fed
17 directly into addbadsec, and the block will be remapped. addbadsec will
18 first attempt hardware remapping. This is supported on SCSI drives and
19 takes place at the disk hardware level. If the target is an IDE drive,
20 then software remapping is used. In order for software remapping to
21 succeed, the partition must contain an alternate slice and there must
22 be room in this slice to perform the mapping.
23
24
25 It should be understood that bad blocks lead to data loss. Remapping a
26 defective block does not repair a damaged file. If a bad block occurs
27 to a disk-resident file system structure such as a superblock, the
28 entire slice might have to be recovered from a backup.
29
31 The following options are supported:
32
33 -a Adds the specified blocks to the hardware or software map. If
34 more than one block number is specified, the entire list should
35 be quoted and block numbers should be separated by white space.
36
37
38 -f Adds the specified blocks to the hardware or software map. The
39 bad blocks are listed, one per line, in the specified file.
40
41
42 -p Causes addbadsec to print the current software map. The output
43 shows the defective block and the assigned alternate. This option
44 cannot be used to print the hardware map.
45
46
48 The following operand is supported:
49
50 raw_device The address of the disk drive (see FILES).
51
52
54 The raw device should be /dev/rdsk/c?[t?]d?p0. See disks(1M) for an
55 explanation of SCSI and IDE device naming conventions.
56
58 See attributes(5) for descriptions of the following attributes:
59
60
61
62
63 ┌─────────────────────────────┬─────────────────────────────┐
64 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
65 ├─────────────────────────────┼─────────────────────────────┤
66 │Architecture │x86 │
67 ├─────────────────────────────┼─────────────────────────────┤
68 │Availability │SUNWcsu │
69 └─────────────────────────────┴─────────────────────────────┘
70
72 disks(1M), diskscan(1M), fdisk(1M), fmthard(1M), format(1M),
73 attributes(5)
74
76 The format(1M) utility is available to format, label, analyze, and
77 repair SCSI disks. This utility is included with the addbadsec,
78 diskscan(1M), fdisk(1M), and fmthard(1M) commands available for x86. To
79 format an IDE disk, use the DOS "format" utility; however, to label,
80 analyze, or repair IDE disks on x86 systems, use the Solaris format(1M)
81 utility.
82
83
84
85SunOS 5.11 24 Feb 1998 addbadsec(1M)