Sometimes a disk fails and need to be replaced with a new one, to do that we need to know which device is…
# cfgadm -al
Ap_Id Type Receptacle Occupant Condition
c0 scsi-bus connected configured unknown
c0::dsk/c0t0d0 CD-ROM connected configured unknown
c1 scsi-bus connected configured unknown
c1::dsk/c1t0d0 disk connected configured unknown
c1::dsk/c1t1d0 disk connected configured unknown
c2 fc connected unconfigured unknown
c3 scsi-bus connected unconfigured unknown
usb0/1 unknown empty unconfigured ok
usb0/2 unknown empty unconfigured ok
List the disks just to identify the ID of the faulty disk
# echo | format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@0,0 1. c1t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@1,0 Specify disk (enter its number):
Now unconfigure the device from the system, to allow a safe replacement.
# cfgadm -c unconfigure c1::dsk/c1t1d0
List the status again, see the “unconfigured” on c1::dsk/c1t1d0
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 CD-ROM connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t0d0 disk connected configured unknown c1::dsk/c1t1d0 disk connected unconfigured unknown c2 fc connected unconfigured unknown c3 scsi-bus connected unconfigured unknown usb0/1 unknown empty unconfigured ok usb0/2 unknown empty unconfigured ok
Replace physically the disk with a new one, and return to the console to configure it again.
# cfgadm -c configure c0::sd1
test it to verify if the disk looks like “configure”..
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c0t0d0 CD-ROM connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t0d0 disk connected configured unknown c1::dsk/c1t1d0 disk connected configured unknown c2 fc connected unconfigured unknown c3 scsi-bus connected unconfigured unknown usb0/1 unknown empty unconfigured ok usb0/2 unknown empty unconfigured ok
Now you must write the solaris label on the disk, you should run the next commands, press enter after:
# format 1 --> id of the disk label y q
If you receive this message.
cfgadm: Component system is busy, try again: failed to offline:
Verify which app or daemon is using the device and release it, or force unconfigure the disk, before that check twice what is using this disk, verify the selected disk is the one to be replace, be careful, forcing can cause unexpected results:
# cfgadm -f -c unconfigure c1::dsk/c1t1d0