Procedure for disk replacement under veritas volume manager using vxdiskadm utility.

Procedure for disk replacement under veritas volume manager using vxdiskadm utility.

Herein I am trying to present disk replacement under VXVM using vxdiskadm utility. Though the same can be done from command line (which is preferable as well). I will present the same in my coming post with practical example. But here I am concentrating on disk replacment using vxdiskadm.

Note: Before proceeding with the activity take the necessary outputs (echo | format, vxdisk, vxdg list, vxprint, iostat etc etc..) and its also better to sun explorer as well.

1.) Check the failure disk by vxdisk, iostat, format and by /var/adm/messages logs and identify the failed disk.

ROOT@yogesh-test:/root # vxdisk list
DEVICE       TYPE      DISK         GROUP        STATUS
c0t1d0s2     sliced    rootmirror   rootdg       online
c0t2d0s2     sliced    rootdisk     rootdg       online
c1t0d0s2     sliced    yogeshdg02      yogeshdg        online
c1t2d0s2     sliced    yogeshdg01      yogeshdg        online
c1t3d0s2     sliced    –            –            error        ————-> Failed Disk
c1t8d0s2     sliced    yogeshdg06      yogeshdg        online
c1t9d0s2     sliced    yogeshdg07      yogeshdg        online
c1t10d0s2    sliced    yogeshdg09      yogeshdg        online
c1t11d0s2    sliced    yogeshdg10      yogeshdg        online
c4t0d0s2     sliced    yogeshdg05      yogeshdg        online
c4t1d0s2     sliced    yogeshdg04      yogeshdg        online
c4t2d0s2     sliced    yogeshdg08      yogeshdg        online
c4t3d0s2     sliced    yogeshdg11      yogeshdg        online
c4t4d0s2     sliced    yogeshdg13      yogeshdg        online
c4t8d0s2     sliced    yogeshdg16      yogeshdg        online
c4t9d0s2     sliced    yogeshdg12      yogeshdg        online
c4t10d0s2    sliced    yogeshdg14      yogeshdg        online
c4t11d0s2    sliced    yogeshdg15      yogeshdg        online
–            –         yogeshdg03      yogeshdg        failed was:c1t3d0s2  ————-> Failed Disk

2.) Use vxdiskadm utility to remove the disk from veritas control. In background this utility is vxplex, vxedit (to dissociate and remove plexes for failed disk), vxdg -g <dg-name> rmdisk (to remove the disk from diskgroup) and finally vxdiskunsetup (to remove the disk from veritas control).

ROOT@yogesh-test:/root # vxdiskadm
Volume Manager Support Operations
Menu: VolumeManager/Disk
 1      Add or initialize one or more disks
 2      Encapsulate one or more disks
 3      Remove a disk
 4      Remove a disk for replacement    ———-> Used for disk replacement (disk out of vxvm)
 5      Replace a failed or removed disk
 6      Mirror volumes on a disk
 7      Move volumes from a disk
 8      Enable access to (import) a disk group
 9      Remove access to (deport) a disk group
 10     Enable (online) a disk device
 11     Disable (offline) a disk device
 12     Mark a disk as a spare for a disk group
 13     Turn off the spare flag on a disk
 14     Unrelocate subdisks back to a disk
 15     Exclude a disk from hot-relocation use
 16     Make a disk available for hot-relocation use
 17     Prevent multipathing/Suppress devices from VxVM’s view
 18     Allow multipathing/Unsuppress devices from VxVM’s view
 19     List currently suppressed/non-multipathed devices
 list   List disk information

 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus

Select an operation to perform: 4   

Remove a disk for replacement
Menu: VolumeManager/Disk/RemoveForReplace
  Use this menu operation to remove a physical disk from a disk
  group, while retaining the disk name.  This changes the state
  for the disk name to a “removed” disk.  If there are any
  initialized disks that are not part of a disk group, you will be
  given the option of using one of these disks as a replacement.
Enter disk name [<disk>,list,q,?] list
Disk group: rootdg
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
dm rootdisk     c0t2d0s2     sliced   2888     71124291 –
dm rootmirror   c0t1d0s2     sliced   2888     71124291 –

Disk group: yogeshdg
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
dm yogeshdg01      c1t2d0s2     sliced   2888     71124291 –
dm yogeshdg02      c1t0d0s2     sliced   2888     71124291 –
dm yogeshdg03      –            –        –        –        NODEVICE
dm yogeshdg04      c4t1d0s2     sliced   2888     71124291 –
dm yogeshdg05      c4t0d0s2     sliced   2888     71124291 –
dm yogeshdg06      c1t8d0s2     sliced   2888     71124291 –
dm yogeshdg07      c1t9d0s2     sliced   2888     71124291 –
dm yogeshdg08      c4t2d0s2     sliced   2888     71124291 –
dm yogeshdg09      c1t10d0s2    sliced   2888     71124291 –
dm yogeshdg10      c1t11d0s2    sliced   2888     71124291 –
dm yogeshdg11      c4t3d0s2     sliced   2888     71124291 –
dm yogeshdg12      c4t9d0s2     sliced   2888     71124291 –
dm yogeshdg13      c4t4d0s2     sliced   2888     71124291 –
dm yogeshdg14      c4t10d0s2    sliced   2888     71124291 –
dm yogeshdg15      c4t11d0s2    sliced   2888     71124291 –
dm yogeshdg16      c4t8d0s2     sliced   2888     71124291 –

Enter disk name [<disk>,list,q,?] yogeshdg03
  The following volumes will lose mirrors as a result of this
  operation:
        logs
  No data on these volumes will be lost.
  The requested operation is to remove disk yogeshdg03 from disk group
  yogeshdg.  The disk name will be kept, along with any volumes using
  the disk, allowing replacement of the disk.
  Select “Replace a failed or removed disk” from the main menu
  when you wish to replace the disk.
Continue with operation? [y,n,q,?] (default: y) y

  Removal of disk yogeshdg03 completed successfully.

Remove another disk? [y,n,q,?] (default: n) n
Volume Manager Support Operations
Menu: VolumeManager/Disk
 1      Add or initialize one or more disks
 2      Encapsulate one or more disks
 3      Remove a disk
 4      Remove a disk for replacement
 5      Replace a failed or removed disk
 6      Mirror volumes on a disk
 7      Move volumes from a disk
 8      Enable access to (import) a disk group
 9      Remove access to (deport) a disk group
 10     Enable (online) a disk device
 11     Disable (offline) a disk device
 12     Mark a disk as a spare for a disk group
 13     Turn off the spare flag on a disk
 14     Unrelocate subdisks back to a disk
 15     Exclude a disk from hot-relocation use
 16     Make a disk available for hot-relocation use
 17     Prevent multipathing/Suppress devices from VxVM’s view
 18     Allow multipathing/Unsuppress devices from VxVM’s view
 19     List currently suppressed/non-multipathed devices
 list   List disk information

 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus
Select an operation to perform: q
Goodbye.

ROOT@yogesh-test:/root # vxdiskunsetup -C c1t3d0
ROOT@yogesh-test:/root # vxdisk list
DEVICE       TYPE      DISK         GROUP        STATUS
c0t1d0s2     sliced    rootmirror   rootdg       online
c0t2d0s2     sliced    rootdisk     rootdg       online
c1t0d0s2     sliced    yogeshdg02      yogeshdg        online
c1t2d0s2     sliced    yogeshdg01      yogeshdg        online
c1t3d0s2     sliced    –            –            error
c1t8d0s2     sliced    yogeshdg06      yogeshdg        online
c1t9d0s2     sliced    yogeshdg07      yogeshdg        online
c1t10d0s2    sliced    yogeshdg09      yogeshdg        online
c1t11d0s2    sliced    yogeshdg10      yogeshdg        online
c4t0d0s2     sliced    yogeshdg05      yogeshdg        online
c4t1d0s2     sliced    yogeshdg04      yogeshdg        online
c4t2d0s2     sliced    yogeshdg08      yogeshdg        online
c4t3d0s2     sliced    yogeshdg11      yogeshdg        online
c4t4d0s2     sliced    yogeshdg13      yogeshdg        online
c4t8d0s2     sliced    yogeshdg16      yogeshdg        online
c4t9d0s2     sliced    yogeshdg12      yogeshdg        online
c4t10d0s2    sliced    yogeshdg14      yogeshdg        online
c4t11d0s2    sliced    yogeshdg15      yogeshdg        online
–            –         yogeshdg03      yogeshdg        removed was:c1t3d0s2   ——–> Disk is out of controll of Veritas at this point of time.
Note: At this point of time the disk is out of VXVM, now you have to run cfgadm -al and cfgadm -c unconfigure <cntrl:failed-disk> to bring disk out of OS control.

# cfgadm -c unconfigure <cntrl:failed-disk>

3.) Now handover the server to Hardware engineer so that he will replace the faulty disk.

Note: You can monitor the disk removal and insertion in the /var/adm/messages logs. 

4.) Scan the device tree, label the new disk and bring the disk under OS control.

ROOT@yogesh-test:/root # devfsadm
ROOT@yogesh-test:/root # format -d c1t3d0
Searching for disks…done
selecting c1t3d0
[disk formatted]

FORMAT MENU:
        disk       – select a disk
        type       – select (define) a disk type
        partition  – select (define) a partition table
        current    – describe the current disk
        format     – format and analyze the disk
        repair     – repair a defective sector
        label      – write label to the disk
        analyze    – surface analysis
        defect     – defect list management
        backup     – search for backup labels
        verify     – read and display labels
        save       – save new disk/partition definitions
        inquiry    – show vendor, product and revision
        volname    – set 8-character volume name
        !<cmd>     – execute <cmd>, then return
        quit
format> l
Ready to label disk, continue? y

format> q

# cfgadm -c configure <cntrl:replaced-disk>

ROOT@yogesh-test:/root # vxdctl enable

ROOT@yogesh-test:/root # vxdisk list
DEVICE       TYPE      DISK         GROUP        STATUS
c0t1d0s2     sliced    rootmirror   rootdg       online
c0t2d0s2     sliced    rootdisk     rootdg       online
c1t0d0s2     sliced    yogeshdg02      yogeshdg        online
c1t2d0s2     sliced    yogeshdg01      yogeshdg        online
c1t3d0s2     sliced    –            –            error
c1t8d0s2     sliced    yogeshdg06      yogeshdg        online
c1t9d0s2     sliced    yogeshdg07      yogeshdg        online
c1t10d0s2    sliced    yogeshdg09      yogeshdg        online
c1t11d0s2    sliced    yogeshdg10      yogeshdg        online
c4t0d0s2     sliced    yogeshdg05      yogeshdg        online
c4t1d0s2     sliced    yogeshdg04      yogeshdg        online
c4t2d0s2     sliced    yogeshdg08      yogeshdg        online
c4t3d0s2     sliced    yogeshdg11      yogeshdg        online
c4t4d0s2     sliced    yogeshdg13      yogeshdg        online
c4t8d0s2     sliced    yogeshdg16      yogeshdg        online
c4t9d0s2     sliced    yogeshdg12      yogeshdg        online
c4t10d0s2    sliced    yogeshdg14      yogeshdg        online
c4t11d0s2    sliced    yogeshdg15      yogeshdg        online
–            –         yogeshdg03      yogeshdg        removed was:c1t3d0s2

ROOT@yogesh-test:/root # echo|format
Searching for disks…done

AVAILABLE DISK SELECTIONS:
       0. c0t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/SUNW,fas@3,8800000/sd@1,0
       1. c0t2d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/SUNW,fas@3,8800000/sd@2,0
       2. c1t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/QLGC,isp@0,10000/sd@0,0
       3. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/QLGC,isp@0,10000/sd@1,0
       4. c1t2d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/QLGC,isp@0,10000/sd@2,0
       5. c1t3d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/QLGC,isp@0,10000/sd@3,0
       6. c1t8d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/QLGC,isp@0,10000/sd@8,0
       7. c1t9d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/QLGC,isp@0,10000/sd@9,0
       8. c1t10d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/QLGC,isp@0,10000/sd@a,0
       9. c1t11d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@3,0/QLGC,isp@0,10000/sd@b,0
      10. c4t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@6,0/QLGC,isp@1,10000/sd@0,0
      11. c4t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@6,0/QLGC,isp@1,10000/sd@1,0
      12. c4t2d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@6,0/QLGC,isp@1,10000/sd@2,0
      13. c4t3d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@6,0/QLGC,isp@1,10000/sd@3,0
      14. c4t4d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@6,0/QLGC,isp@1,10000/sd@4,0
      15. c4t8d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@6,0/QLGC,isp@1,10000/sd@8,0
      16. c4t9d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@6,0/QLGC,isp@1,10000/sd@9,0
      17. c4t10d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@6,0/QLGC,isp@1,10000/sd@a,0
      18. c4t11d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
          /sbus@6,0/QLGC,isp@1,10000/sd@b,0
Specify disk (enter its number): Specify disk (enter its number):
ROOT@yogesh-test:/root #
ROOT@yogesh-test:/root # vxdisk list c1t3d0s2
Device:    c1t3d0s2
devicetag: c1t3d0
type:      sliced
flags:     online error private autoconfig
errno:     Device path not valid
Multipathing information:
numpaths:   1
c1t3d0s2        state=enabled

5.) Now the disk came successfully under OS control, we have to proceed to bring the disk back under vxvm control (vxdisksetup, vxdg -g <dg> adddisk <disk-name>, and then mirror the volume, check the status using vxtask list). Same can be done by vxdiskadm utility as shown below:

ROOT@yogesh-test:/root # vxdisksetup -i c1t3d0

ROOT@yogesh-test:/etc/vx # vxdiskadm
Volume Manager Support Operations
Menu: VolumeManager/Disk
 1      Add or initialize one or more disks
 2      Encapsulate one or more disks
 3      Remove a disk
 4      Remove a disk for replacement
 5      Replace a failed or removed disk  ——> To bring removed disk back under vxvm
 6      Mirror volumes on a disk
 7      Move volumes from a disk
 8      Enable access to (import) a disk group
 9      Remove access to (deport) a disk group
 10     Enable (online) a disk device
 11     Disable (offline) a disk device
 12     Mark a disk as a spare for a disk group
 13     Turn off the spare flag on a disk
 14     Unrelocate subdisks back to a disk
 15     Exclude a disk from hot-relocation use
 16     Make a disk available for hot-relocation use
 17     Prevent multipathing/Suppress devices from VxVM’s view
 18     Allow multipathing/Unsuppress devices from VxVM’s view
 19     List currently suppressed/non-multipathed devices
 list   List disk information

 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus
Select an operation to perform: 5
Replace a failed or removed disk
Menu: VolumeManager/Disk/ReplaceDisk
  Use this menu operation to specify a replacement disk for a disk
  that you removed with the “Remove a disk for replacement” menu
  operation, or that failed during use.  You will be prompted for
  a disk name to replace and a disk device to use as a replacement.
  You can choose an uninitialized disk, in which case the disk will
  be initialized, or you can choose a disk that you have already
  initialized using the Add or initialize a disk menu operation.
Select a removed or failed disk [<disk>,list,q,?] list
Disk group: rootdg
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE

Disk group: yogeshdg
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
dm yogeshdg03      –            –        –        –        REMOVED

Select a removed or failed disk [<disk>,list,q,?] yogeshdg03
Select disk device to initialize [<address>,list,q,?] list
DEVICE       DISK         GROUP        STATUS
c0t1d0       rootmirror   rootdg       online
c0t2d0       rootdisk     rootdg       online
c1t0d0       yogeshdg02      yogeshdg        online
c1t2d0       yogeshdg01      yogeshdg        online
c1t3d0       –            –            error
c1t8d0       yogeshdg06      yogeshdg        online
c1t9d0       yogeshdg07      yogeshdg        online
c1t10d0      yogeshdg09      yogeshdg        online
c1t11d0      yogeshdg10      yogeshdg        online
c4t0d0       yogeshdg05      yogeshdg        online
c4t1d0       yogeshdg04      yogeshdg        online
c4t2d0       yogeshdg08      yogeshdg        online
c4t3d0       yogeshdg11      yogeshdg        online
c4t4d0       yogeshdg13      yogeshdg        online
c4t8d0       yogeshdg16      yogeshdg        online
c4t9d0       yogeshdg12      yogeshdg        online
c4t10d0      yogeshdg14      yogeshdg        online
c4t11d0      yogeshdg15      yogeshdg        online
Select disk device to initialize [<address>,list,q,?] c1t3d0
  The following disk device has a valid VTOC, but does not appear to have
  been initialized for the Volume Manager.  If there is data on the disk
  that should NOT be destroyed you should encapsulate the existing disk
  partitions as volumes instead of adding the disk as a new disk.
  Output format: [Device_Name]
  c1t3d0
Encapsulate this device? [y,n,q,?] (default: y) n
  c1t3d0
Instead of encapsulating, initialize? [y,n,q,?] (default: n) y
  The requested operation is to initialize disk device c1t3d0 and
  to then use that device to replace the removed or failed disk
  yogeshdg03 in disk group yogeshdg.
Continue with operation? [y,n,q,?] (default: y)
  Replacement of disk yogeshdg03 in group yogeshdg with disk device
  c1t3d0 completed successfully.
Replace another disk? [y,n,q,?] (default: n)
Volume Manager Support Operations
Menu: VolumeManager/Disk
 1      Add or initialize one or more disks
 2      Encapsulate one or more disks
 3      Remove a disk
 4      Remove a disk for replacement
 5      Replace a failed or removed disk
 6      Mirror volumes on a disk
 7      Move volumes from a disk
 8      Enable access to (import) a disk group
 9      Remove access to (deport) a disk group
 10     Enable (online) a disk device
 11     Disable (offline) a disk device
 12     Mark a disk as a spare for a disk group
 13     Turn off the spare flag on a disk
 14     Unrelocate subdisks back to a disk
 15     Exclude a disk from hot-relocation use
 16     Make a disk available for hot-relocation use
 17     Prevent multipathing/Suppress devices from VxVM’s view
 18     Allow multipathing/Unsuppress devices from VxVM’s view
 19     List currently suppressed/non-multipathed devices
 list   List disk information

 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus
Select an operation to perform: q
Goodbye.

ROOT@yogesh-test:/etc/vx # vxdisk list
DEVICE       TYPE      DISK         GROUP        STATUS
c0t1d0s2     sliced    rootmirror   rootdg       online
c0t2d0s2     sliced    rootdisk     rootdg       online
c1t0d0s2     sliced    yogeshdg02      yogeshdg        online
c1t2d0s2     sliced    yogeshdg01      yogeshdg        online
c1t3d0s2     sliced    yogeshdg03      yogeshdg        online
c1t8d0s2     sliced    yogeshdg06      yogeshdg        online
c1t9d0s2     sliced    yogeshdg07      yogeshdg        online
c1t10d0s2    sliced    yogeshdg09      yogeshdg        online
c1t11d0s2    sliced    yogeshdg10      yogeshdg        online
c4t0d0s2     sliced    yogeshdg05      yogeshdg        online
c4t1d0s2     sliced    yogeshdg04      yogeshdg        online
c4t2d0s2     sliced    yogeshdg08      yogeshdg        online
c4t3d0s2     sliced    yogeshdg11      yogeshdg        online
c4t4d0s2     sliced    yogeshdg13      yogeshdg        online
c4t8d0s2     sliced    yogeshdg16      yogeshdg        online
c4t9d0s2     sliced    yogeshdg12      yogeshdg        online
c4t10d0s2    sliced    yogeshdg14      yogeshdg        online
c4t11d0s2    sliced    yogeshdg15      yogeshdg        online

ROOT@yogesh-test:/etc/vx # vxprint -htg yogeshdg
DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
RV NAME         RLINK_CNT    KSTATE   STATE    PRIMARY  DATAVOLS  SRL
RL NAME         RVG          KSTATE   STATE    REM_HOST REM_DG    REM_RLNK
V  NAME         RVG          KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE
dg yogeshdg        default      default  117000   1123796868.3554.yogesh-test
dm yogeshdg01      c1t2d0s2     sliced   2888     71124291 –
dm yogeshdg02      c1t0d0s2     sliced   2888     71124291 –
dm yogeshdg03      c1t3d0s2     sliced   2888     71124291 –
dm yogeshdg04      c4t1d0s2     sliced   2888     71124291 –
dm yogeshdg05      c4t0d0s2     sliced   2888     71124291 –
dm yogeshdg06      c1t8d0s2     sliced   2888     71124291 –
dm yogeshdg07      c1t9d0s2     sliced   2888     71124291 –
dm yogeshdg08      c4t2d0s2     sliced   2888     71124291 –
dm yogeshdg09      c1t10d0s2    sliced   2888     71124291 –
dm yogeshdg10      c1t11d0s2    sliced   2888     71124291 –
dm yogeshdg11      c4t3d0s2     sliced   2888     71124291 –
dm yogeshdg12      c4t9d0s2     sliced   2888     71124291 –
dm yogeshdg13      c4t4d0s2     sliced   2888     71124291 –
dm yogeshdg14      c4t10d0s2    sliced   2888     71124291 –
dm yogeshdg15      c4t11d0s2    sliced   2888     71124291 –
dm yogeshdg16      c4t8d0s2     sliced   2888     71124291 –
 
v  yoge    –            ENABLED  ACTIVE   409600   SELECT    –        fsgen
pl yoge-01 yoge    ENABLED  ACTIVE   410238   CONCAT    –        RW
sd yogeshdg04-03   yoge-01 yogeshdg04  21179259 205119   0         c4t1d0   ENA
sd yogeshdg04-06   yoge-01 yogeshdg04  32076567 205119   205119    c4t1d0   ENA
v  logs         –            DISABLED ACTIVE   41943040 SELECT    –        fsgen
pl logs-01      logs         DISABLED RECOVER  41945391 CONCAT    –        RW
sd yogeshdg03-08   logs-01      yogeshdg03  24302268 41945391 0         c1t3d0   ENA

ROOT@yogesh-test:/etc/vx # vxtask list
TASKID  PTID TYPE/STATE    PCT   PROGRESS

ROOT@yogesh-test:/etc/vx # vxprint -htg yogeshdg
DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
RV NAME         RLINK_CNT    KSTATE   STATE    PRIMARY  DATAVOLS  SRL
RL NAME         RVG          KSTATE   STATE    REM_HOST REM_DG    REM_RLNK
V  NAME         RVG          KSTATE   STATE    LENGTH   READPOL   PREFPLEX UTYPE
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE
dg yogeshdg        default      default  117000   1123796868.3554.yogesh-test
dm yogeshdg01      c1t2d0s2     sliced   2888     71124291 –
dm yogeshdg02      c1t0d0s2     sliced   2888     71124291 –
dm yogeshdg03      c1t3d0s2     sliced   2888     71124291 –
dm yogeshdg04      c4t1d0s2     sliced   2888     71124291 –
dm yogeshdg05      c4t0d0s2     sliced   2888     71124291 –
dm yogeshdg06      c1t8d0s2     sliced   2888     71124291 –
dm yogeshdg07      c1t9d0s2     sliced   2888     71124291 –
dm yogeshdg08      c4t2d0s2     sliced   2888     71124291 –
dm yogeshdg09      c1t10d0s2    sliced   2888     71124291 –
dm yogeshdg10      c1t11d0s2    sliced   2888     71124291 –
dm yogeshdg11      c4t3d0s2     sliced   2888     71124291 –
dm yogeshdg12      c4t9d0s2     sliced   2888     71124291 –
dm yogeshdg13      c4t4d0s2     sliced   2888     71124291 –
dm yogeshdg14      c4t10d0s2    sliced   2888     71124291 –
dm yogeshdg15      c4t11d0s2    sliced   2888     71124291 –
dm yogeshdg16      c4t8d0s2     sliced   2888     71124291 –
 
v  yoge    –            ENABLED  ACTIVE   409600   SELECT    –        fsgen
pl yoge-01 yoge    ENABLED  ACTIVE   410238   CONCAT    –        RW
sd yogeshdg04-03   yoge-01 yogeshdg04  21179259 205119   0         c4t1d0   ENA
sd yogeshdg04-06   yoge-01 yogeshdg04  32076567 205119   205119    c4t1d0   ENA
v  logs         –            ENABLED ACTIVE   41943040 SELECT    –        fsgen
pl logs-01      logs         ENABLED ACTIVE  41945391 CONCAT    –        RW
sd yogeshdg03-08   logs-01      yogeshdg03  24302268 41945391 0         c1t3d0   ENA

Note: 1.) In solaris 8 there is a bug, whenever you will be proceeding with the disk replacement under vxvm always take the downtime as the disk wont come under vxvm without reboot. As per my conversation with solution centre couple of times they clearly state that this is a well known bug for solaris 8 as it already entered EOL/EOSL long time back and since then no patches have been released for the rectification. But this process is well tested on sol.9 and sol10.

2.) This same can be done by using CLI and is preferable method. But for begineers I would suggest to go with vxdiskadm for sometime and then come to CLI and quit using vxdiskadm utility.

3.) If the volume will show disabled in the vxprint output then you have to manually start the disabled volume using vxvol -g <dg-name> start <volume-name> and check the status by vxprint and vxinfo command.

4.) Short-steps to remember:

echo |format
 vxdisk list
 vxdiskadm  ( 4 For replacement the errror disk , 5 for adding the new disk)
 devfsadm
 vxdisk list
 echo |format
 vxdctl enable
 vxdiskadm
 vxdisk list
 cd /etc/vx/bin
 ./vxdisksetup -i c5t0d0
 vxdisk list
 vxdiskadm     (5th option)
 vxtask list
 vxdisk list

Yogesh Raheja

Yogesh working as a Consultant in Unix Engineering by profession. And he has multiple years experience in Solaris, Linux , AIX and Veritas Administration. He has been certified for SCSA9, SCSA10, SCNA10, VXVM, VCS, ITILv3. He is very much passionate about sharing his knowledge with others. Specialties: Expertize in Unix/Solaris Server, Linux (RHEL), AIX, Veritas Volume Manager, ZFS, Liveupgrades, Storage Migrations, Cluster deployment (VCS and HACMP) and administration and upgrade on Banking, Telecom, IT Infrastructure, and Hosting Services.

12 Responses

  1. Sandeep says:

    @Yogesh Thanks for information.But in some cases we have to run #vxdisk scandisks because in some scanerio vxdctl enable did not detect disks so sequences should be..#
    echo |format

    #vxdisk list
    #vxdiskadm ( 4 For replacement the errror disk , 5 for adding the new disk)
    #devfsadm
    # vxdisk scandisks #vxdisk list
    #echo |format
    #vxdctl enable
    #vxdiskadm
    #vxdisk list
    # /etc/vx/bin/vxdisksetup -i c5t0d0
    #vxdisk list
    #vxdiskadm (5th option)
    #vxtask list
    vxdisk list

  2. Yogesh Raheja says:

    @Sandeep, you are quite right. :-), I would also like to let you know that vxdisk scandisks is a combined combination of “devfsadm + vxdctl enable” so the choice is yours :-). Also in solaris10 the arch. is so intelligent that it scan the vxdevices merely by doing rereading of the vxconfigd deamon. But yes in solaris 8 as I already stated there is a well known bug which prevents disks to scan under VxVm. Whatever you do at last you need a reconfig reboot. (though I managed to get it done without reboot in solaris 8, but later on it start showing degraded performance and Orcale provided the solu. to do a reconfig reboot so flush up the old devices unused reference links.). Hope this helps.

  3. Saurabh says:

    Thanks for the steps yogesh :)

    Also, i am looking for these pdf’s
    1. Veritas Storage Foundation 5.1 for UNIX : Install & Configure
    2. Veritas Storage Foundation 5.1 for UNIX: Manage & Administrator do you have this ?

  4. Yogesh Raheja says:

    @Saurabh, you can download the same from Symantec side. You will find all these mentioned pdf’s from there. :)

  5. teesamlovesu says:

    Thank you :)

  6. Yogesh Raheja says:

    @teesamlovesu, you are most welcome at Gurkulindia.

  7. shekar says:

    Hi Ramdev

    ,Very good ArtIcle ,have removed the VMDISK,diskgroup and device etc .the disks are came from Direct attach storage ( DAS ) , what is the procedure to remove the DAS from Solaris 8. pl

  8. Yogesh Raheja says:

    @Shekar, thanks. For DAS, you need to remove the disks from OS and then phyically remove the DAS from server. After that run devfsadm -Cv to clean the unused ref. links.

  9. Chandrashekhar says:

    @Yogesh Thanks for posting such a nice article !!!!!

  10. Viki says:

    Hi,
    I faced issue as i tried to replace failed disk is part of rootvol and it mirror. After selecting option 4 in vxdiskadm and once confirmed the disk by “yes”, server unexpected shutdown and it gone to maintenace mode. Why it happened? Later it was fixed.

  1. July 22, 2016

    […] disk Read – Resolving the Intermittent Disk errors by clearing the failing flag on a disk Read – Procedure for disk replacement under veritas volume manager using vxdiskadm utility. Read […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us