• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to remove a failed disk using luxadm and cfgadm

by admin

The failed disk in any solaris servers can be removed basically using these 2 commands :

1. luxadm ( most SAS and SCSI disks )
2. cfgadm ( most fiber channel disk )

Make sure you have removed the disk from volume manager control before removing the disk from OS control.

Using luxadm

1. Remove the disk using the luxadm command :

# /usr/sbin/luxadm remove_device /dev/rdsk/c1t1d0s2

2. If the disk fails to get removed, physically remove the disk and use below command :

# luxadm -e offline /dev/rdsk/c1t1d0s2

If the disk is multipathed, run the above command on the 2nd path as well. The picld daemon notifies the system about the disk removal.

3. Cleanup the device files for the removed device from /dev directory :

# devfsadm -Cv

Using cfgadm

1. Use the cfgadm command to display all the disks in the server.

# 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
c1::dsk/c1t2d0    disk            connected    configured   unknown
c1::dsk/c1t3d0    disk            connected    configured   unknown
c2                scsi-bus        connected    configured   unknown
c2::dsk/c2t2d0    disk            connected    configured   unknown
.....

2. On identifying the disk to be removed, unconfigure the disk. You may have to use -f along with -c to forcibly remove the disk in some cases.

# cfgadm -c unconfigure c1::dsk/c1t3d0

3. Verify the status of the disk in cfgadm -al command. It should show unconfigured and unavailable.

c1::dsk/c1t3d0    unavailable     connected    unconfigured unknown

You can safely remove the disk from the server now.

Installing the new disk

Insert the new disk into the disk slot of the server and run the below command. The command is common for both the above methods.

# devfsadm

You should see the new disk detected in the OS:

# ls /dev/rdsk/c#t#d#*

Filed Under: Solaris

Some more articles you might also be interested in …

  1. Beginners Guide to Configuring network virtualization features in Solaris 11
  2. How to find the space consumed by ZFS snapshots
  3. How to set boot-device with luxadm command in Solaris
  4. Unix file basics : Inode, Soft Vs Hard link, Device files, Named pipes
  5. Oracle Solaris 11 Zones : New Features
  6. Solaris 11 : How to monitor network traffic using “ipstat”, “tcpstat” and “netstat” commands
  7. How to delegate SMF management to a non-root user in Solaris
  8. Solaris : How to scan new storage LUNs (scsi/iscsi/fc/sas)
  9. Understanding the sysconfig utility in Solaris 11
  10. Beginners Guide to Solaris 11 Image Packaging System (IPS)

You May Also Like

Primary Sidebar

Recent Posts

  • fprintd-delete Command Examples in Linux
  • fprintd-delete: command not found
  • foreman: command not found
  • foreman Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright