6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man1m / addbadsec.1m
blobf47282dbf6b78669244d70ba14a474437261c1b9
1 '\" te
2 .\"  Copyright (c) 1998, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ADDBADSEC 1M "Feb 24, 1998"
7 .SH NAME
8 addbadsec \- map out defective disk blocks
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBaddbadsec\fR [\fB-p\fR] [\fB-a\fR \fIblkno\fR [\fIblkno\fR]...] [\fB-f\fR \fIfilename\fR] \fIraw_device\fR
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 \fBaddbadsec\fR is used by the system administrator to map out bad disk blocks.
19 Normally, these blocks are identified during surface analysis, but occasionally
20 the disk subsystem reports unrecoverable data errors indicating a bad block. A
21 block number reported in this way can be fed directly into \fBaddbadsec\fR, and
22 the block will be remapped. \fBaddbadsec\fR will first attempt hardware
23 remapping. This is supported on \fBSCSI\fR drives and takes place at the disk
24 hardware level. If the target is an \fBIDE\fR drive, then software remapping is
25 used. In order for software remapping to succeed, the partition must contain an
26 alternate slice and there must be room in this slice to perform the mapping.
27 .sp
28 .LP
29 It should be understood that bad blocks lead to data loss. Remapping a
30 defective block does not repair a damaged file. If a bad block occurs to a
31 disk-resident file system structure such as a superblock, the entire slice
32 might have to be recovered from a backup.
33 .SH OPTIONS
34 .sp
35 .LP
36 The following options are supported:
37 .sp
38 .ne 2
39 .na
40 \fB\fB-a\fR\fR
41 .ad
42 .RS 6n
43 Adds the specified blocks to the hardware or software map. If more than one
44 block number is specified, the entire list should be quoted and block numbers
45 should be separated by white space.
46 .RE
48 .sp
49 .ne 2
50 .na
51 \fB\fB-f\fR\fR
52 .ad
53 .RS 6n
54 Adds the specified blocks to the hardware or software map. The bad blocks are
55 listed, one per line, in the specified file.
56 .RE
58 .sp
59 .ne 2
60 .na
61 \fB\fB-p\fR\fR
62 .ad
63 .RS 6n
64 Causes \fBaddbadsec\fR to print the current software map. The output shows the
65 defective block and the assigned alternate. This option cannot be used to print
66 the hardware map.
67 .RE
69 .SH OPERANDS
70 .sp
71 .LP
72 The following operand is supported:
73 .sp
74 .ne 2
75 .na
76 \fB\fIraw_device\fR\fR
77 .ad
78 .RS 14n
79 The address of the disk drive (see \fBFILES\fR).
80 .RE
82 .SH FILES
83 .sp
84 .LP
85 The raw device should be \fB/dev/rdsk/c?[t?]d?p0\fR. See \fBdisks\fR(1M) for an
86 explanation of \fBSCSI\fR and \fBIDE\fR device naming conventions.
87 .SH SEE ALSO
88 .sp
89 .LP
90 \fBdisks\fR(1M), \fBdiskscan\fR(1M), \fBfdisk\fR(1M), \fBfmthard\fR(1M),
91 \fBformat\fR(1M), \fBattributes\fR(5)
92 .SH NOTES
93 .sp
94 .LP
95 The \fBformat\fR(1M) utility is available to format, label, analyze, and repair
96 \fBSCSI\fR disks. This utility is included with the \fBaddbadsec\fR,
97 \fBdiskscan\fR(1M), \fBfdisk\fR(1M), and \fBfmthard\fR(1M) commands available
98 for x86. To format an \fBIDE\fR disk, use the \fB DOS\fR "format" utility;
99 however, to label, analyze, or repair \fBIDE\fR disks on x86 systems, use the
100 Solaris \fBformat\fR(1M) utility.