Friday, March 23, 2012

Rename hdisk in AIX

Recently we had an issue with 2 hdisks going bad in AIX LPAR, both in different volume groups (hdisk15 & hdisk78)., The Volume groups had disks mirrored (hdisk0 to hdisk39 mirrored to hdisk40 to hdisk79). After replacing the drives, found that  the hdisks names got swapped as shown below before and after replacement. Since I do not want to create any confusion in future, I had to rename them back to original state before adding them to voulme groups as below..

 Before Replacing 



#lscfg -vl hdisk15
  hdisk15          U5791.001.992055M-P2-T5-L11-L0  16 Bit LVD SCSI Disk Drive (7
3400 MB)



#lscfg -vl hdisk78
  hdisk78          U5791.001.9920546-P2-T6-L10-L0  16 Bit LVD SCSI Disk Drive (7
3400 MB)

After Replacing



#lscfg -vl hdisk78
  hdisk78          U5791.001.992055M-P2-T5-L11-L0  16 Bit LVD SCSI Disk Drive (7
3400 MB)



#lscfg -vl hdisk15
  hdisk15          U5791.001.9920546-P2-T6-L10-L0  16 Bit LVD SCSI Disk Drive (7
3400 MB)

Swapping Back to Original State

Removed both the drives
#rmdev -dl hdisk78
#rmdev -dl hdisk15

Ran cfgmgr in the order I wanted

#cfgmgr -l scsi3 
#cfgmgr -l scsi23

Verified that they are swapped back

#lsdev -Cc disk |grep hdisk15
hdisk15   Available 0P-08-00-11,0 16 Bit LVD SCSI Disk Drive 
$ lsdev -Cc adapter |grep 0P-08
scsi3     Available 0P-08 Wide/Ultra-3 SCSI I/O Controller



#lscfg -vl hdisk15
  hdisk15          U5791.001.992055M-P2-T5-L11-L0  16 Bit LVD SCSI Disk Drive (7
3400 MB)




#lsdev -Cc disk |grep hdisk78
hdisk78   Available 0t-08-00-10,0 16 Bit LVD SCSI Disk Drive 
# lsdev -Cc adapter |grep  0t-08  
scsi23    Available 0t-08 Wide/Ultra-3 SCSI I/O Controller
#lscfg -vl hdisk78
  hdisk78          U5791.001.9920546-P2-T6-L10-L0  16 Bit LVD SCSI Disk Drive (7
3400 MB)

No comments:

Post a Comment