The following procedure describes how to remove a disk being used by one or more UFS file systems.
Type su and your superuser password.
Identify activities or applications attached to the device you plan to remove.
Commands to use are mount, showmount -a, and ps -ef. See the mount(1M), showmount(1M), and ps(1) man pages for more details.
For example, where the controller number is 0 and the target ID is 11:
# mount | grep c0t11 /export/home1 on /dev/dsk/c0t11d0s2 setuid/read/write on # showmount -a | grep /export/home1 cinnamon:/export/home1/archive austin:/export/home1 swlab1:/export/home1/doc # ps -f | grep c0t11 root 1225 450 4 13:09:58 pts/2 0:00 grep c0t11
In this example, the file system /export/home1 on the faulty disk is being remotely mounted by three different systems--cinnamon, austin, and swlab1. The only process running is grep, which has finished.
Stop any activity or application processes on the file systems to be deconfigured.
Back up your system.
Determine what file system(s) are on the disk:
# mount | grep cwtx
Unmount any file systems on the disk.
If the file system(s) are on a disk that is failing or has failed, the umount operation may not complete. A large number of error messages may be displayed in the system console and in the /var directory during the umount operation. If the umount operation does not complete, you may have to restart the system.
For each file system returned, type:
# umount file_system
# umount /export/home # umount /export/home1
Use the ssaadm remove_device command to take the device offline:
# ssaadm remove_device logical_device_name ssaadm: warning: can't quiesce "/dev/rdsk/c0t11d0s2": I/O error Bus is ready for the removal of device Remove device and reconfigure bus as needed Press RETURN when ready to continue
Here, logical_device_name is the full logical device name for the drive to be removed (/dev/rdsk/c0t11d0s2, for example). You must specify slice 2, which represents the entire disk. Note that this command also accepts a physical device name as an alternative.
You can safely ignore the warning message since the Enterprise 250 SCSI bus does not require quiescing.
Remove the disk drive from its slot.
Refer to the Sun Enterprise 250 Server Owner's Guide for drive removal instructions.
Press Return to complete the hot-plug operation.
The ssaadm command deletes the symbolic links for the device in the /dev/dsk, and /dev/rdsk hierarchies.