Move /var/svc/log to /var/log/svc
[unleashed/lotheac.git] / share / man / man8 / cfgadm_scsi.8
blob78a1d5c5b939ec4bfeaca3f4bbebee57db6d39b8
1 '\" te
2 .\" Copyright (c) 2003 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 CFGADM_SCSI 8 "Jun 6, 2006"
7 .SH NAME
8 cfgadm_scsi \- SCSI hardware specific commands for cfgadm
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/cfgadm\fR [\fB-f\fR] [\fB-y\fR | \fB-n\fR] [\fB-v\fR] [\fB-o\fR \fIhardware_option\fR]
13      \fB-c\fR \fIfunction\fR \fIap_id\fR...
14 .fi
16 .LP
17 .nf
18 \fB/usr/sbin/cfgadm\fR [\fB-f\fR] [\fB-y\fR | \fB-n\fR] [\fB-v\fR] [\fB-o\fR \fIhardware_option\fR]
19      \fB-x\fR \fIhardware_function\fR \fIap_id\fR...
20 .fi
22 .LP
23 .nf
24 \fB/usr/sbin/cfgadm\fR [\fB-v\fR] [\fB-a\fR] [\fB-s\fR\fI listing_option\fR] [\fB-o\fR \fIhardware_option\fR]
25      [\fB-l\fR [\fIap_id\fR | \fIap_type ...\fR ]]
26 .fi
28 .LP
29 .nf
30 \fB/usr/sbin/cfgadm\fR [\fB-v\fR] [\fB-o\fR\fI hardware_option\fR] \fB-t\fR \fIap_id\fR...
31 .fi
33 .LP
34 .nf
35 \fB/usr/sbin/cfgadm\fR [\fB-v\fR] [\fB-o\fR\fI hardware_option\fR] \fB-h\fR [\fIap_id\fR]...
36 .fi
38 .SH DESCRIPTION
39 .sp
40 .LP
41 The \fBSCSI\fR hardware specific library \fB/usr/lib/cfgadm/scsi.so.1\fR
42 provides the functionality for \fBSCSI\fR hot-plugging through the
43 \fBcfgadm\fR(8) command. \fBcfgadm\fR operates on attachment points, which are
44 locations in the system where hardware resources can be dynamically
45 reconfigured. Refer to \fBcfgadm\fR(8) for information regarding attachment
46 points.
47 .sp
48 .LP
49 For \fBSCSI\fR hot-plugging, each \fBSCSI\fR controller is represented by an
50 attachment point in the device tree. In addition, each \fBSCSI \fRdevice is
51 represented by a dynamic attachment point. Attachment points are named through
52 \fBap_ids\fR. Two types of \fBap_ids\fR are defined: logical and physical. The
53 physical \fBap_id\fR is based on the physical pathname, whereas the logical
54 \fBap_id\fR is a shorter more user-friendly name. For \fBSCSI \fRcontrollers,
55 the logical \fBap_id\fR is usually the corresponding disk controller number.
56 For example, a typical logical \fBap_id\fR would be \fBc0\fR.
57 .sp
58 .LP
59 \fBSCSI\fR devices are named relative to the controller \fBap_id\fR. Thus if a
60 disk device is attached to controller \fBc0\fR, its \fBap_id\fR can be:
61 .sp
62 .in +2
63 .nf
64 c0::dsk/c0t0d0
65 .fi
66 .in -2
67 .sp
69 .sp
70 .LP
71 where \fBdsk/c0t0d0\fR identifies the specific device. In general, the device
72 identifier is derived from the corresponding logical link for the device in
73 \fB/dev\fR. For example, a \fBSCSI\fR tape drive logical \fBap_id\fR could be
74 \fBc0::rmt/0\fR. Here \fBc0\fR is the logical \fBap_id\fR for the \fBSCSI\fR
75 controller and \fBrmt/0\fR is derived from the logical link for the tape drive
76 in \fB/dev/rmt\fR. If an identifier can not be derived from the link in
77 \fB/dev\fR, a unique identifier will be assigned to it. For example, if the
78 tape device has no link in \fB/dev\fR, it can be assigned an \fBap_id\fR of the
79 form \fBc0::st3\fR where \fBst3\fR is a unique internally generated identifier.
80 .sp
81 .LP
82 A simple listing of attachment points in the system will include attachment
83 points at \fBSCSI \fRcontrollers but not \fBSCSI\fR devices. Use the \fB-a\fR
84 flag to the list option (\fB-l\fR) to list \fBSCSI\fR devices as well. For
85 example:
86 .sp
87 .in +2
88 .nf
89 # cfgadm -l
90   Ap_Id             Type        Receptacle     Occupant     Condition
91   c0                scsi-bus    connected      configured   unknown
92   sysctrl0:slot0    cpu/mem     connected      configured   ok
93   sysctrl0:slot1    sbus-upa    connected      configured   ok
94 .fi
95 .in -2
96 .sp
98 .sp
99 .LP
100 To list \fBSCSI\fR devices in addition to \fBSCSI\fR controllers:
102 .in +2
104 # cfgadm -al
106 Ap_Id                Type         Receptacle   Occupant     Condition
107 c0                   scsi-bus     connected    configured   unknown
108 c0::dsk/c0t14d0      disk         connected    configured   unknown
109 c0::dsk/c0t11d0      disk         connected    configured   unknown
110 c0::dsk/c0t8d0       disk         connected    configured   unknown
111 c0::dsk/c0t0d0       disk         connected    configured   unknown
112 c0::rmt/0            tape         connected    configured   unknown
113 sysctrl0:slot0       cpu/mem      connected    configured   ok
114 sysctrl0:slot1       sbus-upa     connected    configured   ok
116 .in -2
121 Refer to \fBcfgadm\fR(8) for more information regarding listing attachment
122 points. The receptacle and occupant state for attachment points at the
123 \fBSCSI\fR controller have the following meanings:
125 .ne 2
127 \fBempty\fR
129 .RS 16n
130 not applicable
134 .ne 2
136 \fBdisconnected\fR
138 .RS 16n
139 bus quiesced (\fBI/O\fR activity on bus is suspended)
143 .ne 2
145 \fBconnected\fR
147 .RS 16n
148 bus active
152 .ne 2
154 \fBconfigured\fR
156 .RS 16n
157 one or more devices on the bus is configured
161 .ne 2
163 \fBunconfigured\fR
165 .RS 16n
166 no device on the bus is configured
171 The corresponding states for individual \fBSCSI\fR devices are:
173 .ne 2
175 \fBempty\fR
177 .RS 16n
178 not applicable
182 .ne 2
184 \fBdisconnected\fR
186 .RS 16n
187 bus to which the device is attached is quiesced
191 .ne 2
193 \fBconnected\fR
195 .RS 16n
196 bus to which device is attached is active
200 .ne 2
202 \fBconfigured\fR
204 .RS 16n
205 device is configured
209 .ne 2
211 \fBunconfigured\fR
213 .RS 16n
214 device is not configured
217 .SH OPTIONS
220 \fBcfgadm\fR defines several types of operations besides listing
221 (\fB-l\fR).These operations include testing, (\fB-t\fR), invoking configuration
222 state changes, (\fB-c\fR), invoking hardware specific functions (\fB-x\fR), and
223 obtaining configuration administration help messages (\fB-h\fR).
225 .ne 2
227 \fB\fB-c\fR \fIfunction\fR\fR
229 .RS 24n
230 The following generic commands are defined for the \fBSCSI \fRhardware specific
231 library:
233 For \fBSCSI\fR controller attachment points, the following configuration state
234 change operations are supported:
236 .ne 2
238 \fBconnect\fR
240 .RS 15n
241 Unquiesce the \fBSCSI\fR bus.
245 .ne 2
247 \fBdisconnect\fR
249 .RS 15n
250 Quiesce the bus (suspend \fBI/O\fR activity on bus).
252 Incorrect use of this command can cause the system to hang. See \fBNOTES\fR.
256 .ne 2
258 \fBconfigure\fR
260 .RS 15n
261 Configure new devices on \fBSCSI\fR bus.
265 .ne 2
267 \fBunconfigure\fR
269 .RS 15n
270 Unconfigure all devices connected to bus.
273 The following generic commands are defined for \fBSCSI\fR devices:
275 .ne 2
277 \fBconfigure\fR
279 .RS 15n
280 configure a specific device
284 .ne 2
286 \fBunconfigure\fR
288 .RS 15n
289 unconfigure a specific device
295 .ne 2
297 \fB\fB-f\fR\fR
299 .RS 24n
300 When used with the \fBdisconnect\fR command, forces a quiesce of the \fBSCSI\fR
301 bus, if supported by hardware.
303 Incorrect use of this command can cause the system to hang. See \fBNOTES\fR.
307 .ne 2
309 \fB\fB-h\fR \fIap_id\fR\fR
311 .RS 24n
312 SCSI specific help can be obtained by using the help option with any SCSI
313 attachment point.
317 .ne 2
319 \fB\fB-o\fR \fIhardware_option\fR\fR
321 .RS 24n
322 No hardware specific options are currently defined.
326 .ne 2
328 \fB\fB-s\fR \fIlisting_option\fR\fR
330 .RS 24n
331 Attachment points of class \fBscsi\fR can be listed by using the \fBselect\fR
332 sub-option. Refer to the \fBcfgadm\fR(8) man page for additional information.
336 .ne 2
338 \fB\fB-t\fR \fIap_id\fR\fR
340 .RS 24n
341 No test commands are available at present.
345 .ne 2
347 \fB\fB-x\fR \fIhardware_function\fR\fR
349 .RS 24n
350 Some of the following commands can only be used with SCSI controllers and some
351 only with SCSI devices.
353 In the following, \fIcontroller_ap_id\fR refers to an \fBap_id\fR for a SCSI
354 controller, for example, \fBc0\fR. \fIdevice_ap_id\fR refers to an \fBap_id\fR
355 for a \fBSCSI\fR device, for example: \fBc0::dsk/c0dt3d0\fR.
357 The following hardware specific functions are defined:
359 .ne 2
361 \fBinsert_device \fIcontroller_ap_id\fR\fR
363 .sp .6
364 .RS 4n
365 Add a new device to the SCSI controller, \fIcontroller_ap_id\fR.
367 This command is intended for interactive use only.
371 .ne 2
373 \fBremove_device \fIdevice_ap_id\fR\fR
375 .sp .6
376 .RS 4n
377 Remove device \fIdevice_ap_id\fR.
379 This command is intended for interactive use only.
383 .ne 2
385 \fBreplace_device \fIdevice_ap_id\fR\fR
387 .sp .6
388 .RS 4n
389 Remove device \fIdevice_ap_id\fR and replace it with another device of the same
390 kind.
392 This command is intended for interactive use only.
396 .ne 2
398 \fBreset_device \fIdevice_ap_id\fR\fR
400 .sp .6
401 .RS 4n
402 Reset \fIdevice_ap_id\fR.
406 .ne 2
408 \fBreset_bus \fIcontroller_ap_id\fR\fR
410 .sp .6
411 .RS 4n
412 Reset bus \fIcontroller_ap_id\fR without resetting any devices attached to the
413 bus.
417 .ne 2
419 \fBreset_all \fIcontroller_ap_id\fR\fR
421 .sp .6
422 .RS 4n
423 Reset bus \fIcontroller_ap_id\fR and all devices on the bus.
427 .ne 2
429 \fBlocator [=on|off] \fIdevice_ap_id\fR\fR
431 .sp .6
432 .RS 4n
433 Sets or gets the hard disk locator \fBLED\fR, if it is provided by the
434 platform. If the [on|off] suboption is not set, the state of the hard disk
435 locator is printed.
439 .ne 2
441 \fBled[=LED,mode=on|off|blink] \fIdevice_ap_id\fR\fR
443 .sp .6
444 .RS 4n
445 If no sub-arguments are set, this function print a list of the current
446 \fBLED\fR settings. If sub-arguments are set, this function sets the mode of a
447 specific \fBLED\fR for a slot.
452 .SH EXAMPLES
454 \fBExample 1 \fRConfiguring a Disk
457 The following command configures a disk attached to controller \fBc0\fR:
460 .in +2
462 # \fBcfgadm -c configure c0::dsk/c0t3d0\fR
464 .in -2
468 \fBExample 2 \fRUnconfiguring a Disk
471 The following command unconfigures a disk attached to controller \fBc0\fR:
474 .in +2
476 # \fBcfgadm -c unconfigure c0::dsk/c0t3d0\fR
478 .in -2
482 \fBExample 3 \fRAdding a New Device
485 The following command adds a new device to controller \fBc0\fR:
488 .in +2
490 # \fBcfgadm -x insert_device c0\fR
492 .in -2
497 The system responds with the following:
500 .in +2
502 Adding device to SCSI HBA: /devices/sbus@1f,0/SUNW,fas@e,8800000
503 This operation will suspend activity on SCSI bus c0
504 Continue (yes/no)?
506 .in -2
511 Enter:
514 .in +2
516 \fBy\fR
518 .in -2
523 The system responds with the following:
526 .in +2
528 SCSI bus quiesced successfully.
529 It is now safe to proceed with hotplug operation.
530 Enter y if operation is complete or n to abort (yes/no)?
532 .in -2
537 Enter:
540 .in +2
542 \fBy\fR
544 .in -2
548 \fBExample 4 \fRReplacing a Device
551 The following command replaces a device attached to controller \fBc0\fR:
554 .in +2
556 # \fBcfgadm \fR\fB-x\fR\fB replace_device c0::dsk/c0t3d0\fR
558 .in -2
563 The system responds with the following:
566 .in +2
568 Replacing SCSI device: /devices/sbus@1f,0/SUNW,fas@e,8800000/sd@3,0
569 This operation will suspend activity on SCSI bus: c0
570 Continue (yes/no)?
572 .in -2
577 Enter:
580 .in +2
582 \fBy\fR
584 .in -2
589 The system responds with the following:
592 .in +2
594 SCSI bus quiesced successfully.
595 It is now safe to proceed with hotplug operation.
596 Enter y if operation is complete or n to abort (yes/no)?
598 .in -2
603 Enter:
606 .in +2
608 \fBy\fR
610 .in -2
614 \fBExample 5 \fREncountering a Mounted File System While Unconfiguring a Disk
617 The following command illustrates encountering a mounted file system while
618 unconfiguring a disk:
621 .in +2
623 # \fBcfgadm -c unconfigure c1::dsk/c1t0d0\fR
625 .in -2
630 The system responds with the following:
633 .in +2
635 cfgadm: Component system is busy, try again: failed to offline:
636 /devices/pci@1f,4000/scsi@3,1/sd@1,0
637      Resource              Information
638 ------------------  --------------------------
639 /dev/dsk/c1t0d0s0   mounted filesystem "/mnt"
641 .in -2
645 \fBExample 6 \fRDisplay the Value of the Locator for a Disk
648 The following command displays the value of the locator for a disk. This
649 example is specific to the \fBSPARC\fR Enterprise Server family:
652 .in +2
654 # \fBcfgadm -x locator c0::dsk/c0t6d0\fR
656 .in -2
661 The system responds with the following:
664 .in +2
666 Disk                    Led
667 c0t6d0                  locator=on
669 .in -2
673 \fBExample 7 \fRSet the Value of the Locator for a Disk
676 The following command sets the value of the locator for a disk. This example is
677 specific to the \fBSPARC\fR Enterprise Server family:
680 .in +2
682 # \fBcfgadm -x locator=off c0::dsk/c0t6d0\fR
684 .in -2
689 The system does not print anything in response.
691 .SH FILES
693 .ne 2
695 \fB\fB/usr/lib/cfgadm/scsi.so.1\fR\fR
697 .sp .6
698 .RS 4n
699 hardware-specific library for generic \fBSCSI\fR hot-plugging
703 .ne 2
705 \fB\fB/usr/platform/SPARC-Enterprise/lib/cfgadm/scsi.so.1\fR\fR
707 .sp .6
708 .RS 4n
709 platform-specific library for generic \fBSCSI\fR hot-plugging
712 .SH SEE ALSO
715 \fBcfgadm\fR(8), \fBluxadm\fR(8), \fBconfig_admin\fR(3CFGADM),
716 \fBlibcfgadm\fR(3LIB), \fBattributes\fR(5)
717 .SH NOTES
720 The \fBdisconnect\fR (quiesce) operation is not supported on controllers which
721 control disks containing critical partitions such as \fBroot\fR (\fB/\fR),
722 \fB/usr\fR, \fBswap\fR, or \fB/var\fR. The \fBdisconnect\fR operation should
723 not be attempted on such controllers. Incorrect usage can result in a system
724 hang and require a reboot.
727 When a controller is in the disconnected (quiesced) state, there is a potential
728 for deadlocks occurring in the system. The \fBdisconnect\fR operation should be
729 used with caution. A controller should be kept in the disconnected state for
730 the minimum period of time required to accomplish the \fBDR\fR operation. The
731 \fBdisconnect\fR command is provided only to allow the replacement of  the
732 \fBSCSI\fR cables while the system is running. It should not be used for any
733 other purpose. The only fix for a deadlock (if it occurs) is to reboot the
734 system.
737 Hotplugging operations are not supported by all \fBSCSI\fR controllers.
738 .SH WARNINGS
741 The connectors on some \fBSCSI\fR devices do not conform to \fBSCSI\fR hotplug
742 specifications. Performing hotplug operations on such devices can cause damage
743 to the hardware on the \fBSCSI\fR bus. Refer to your hardware manual for
744 additional information.