点击(此处)折叠或打开

  1. The vxdiskadm option #5 "Replace a failed or removed disk" to replace a failed encapsulated rootdisk fails, complaining that the public region is too small to replace the disk.
  2. 故障原因:
  3. vxvm对系统盘做的mirror,一块硬盘故障,按照vxdiskadm 步骤操作更换硬盘后报错:
  4. 参考 https://support.symantec.com/en_US/article.TECH15662.html
  5. Problem
  6. The vxdiskadm option #5 "Replace a failed or removed disk" to replace a failed encapsulated rootdisk fails, complaining that the public region is too small to replace the disk.
  7. Error Message
  8. "vxvm:vxdg: ERROR: associating disk-media rootdisk with c0t0d0s2: Disk public region is too small"
  9. Solution
  10. Sometimes the above vxdiskadm command will fail. If it does, try to ensure that the disk is replaced with a disk with the same geometry.  Use the output from the format command to verify if this is the case:
  11. AVAILABLE DISK SELECTIONS:
  12. 0. c0t0d0
  13. /sbus@3,0/SUNW,fas@3,8800000/sd@0,0
  14. 1. c2t1d0
  15. /sbus@3,0/SUNW,fas@0,8800000/sd@1,0
  16. If needed, the "public" and "private" lines from an output from vxdisk list c#t#d# of each device can be compared to confirm that the size is the same, although the disk will have to be initialized before this will work. (vxdisk list c#t#d# shows the same private/public configuration). Now that the disks have been established to be the same, an attempt can be made to manually mirror the volumes rather than use vxdiskadm:
  17. Device: c0t0d0s2
  18. devicetag: c0t0d0
  19. type: sliced
  20. hostid: 
  21. disk: name= id=996853491.1293.spaniel
  22. group: name= id=
  23. flags: online ready autoconfig autoimport
  24. pubpaths: block=/dev/vx/dmp/c0t0d0s4 char=/dev/vx/rdmp/c0t0d0s4
  25. privpaths: block=/dev/vx/dmp/c0t0d0s3 char=/dev/vx/rdmp/c0t0d0s3
  26. version: 2.1
  27. iosize: min=512 (bytes) max=2048 (blocks)
  28. public: slice=4 offset=0 len=17678493  ??----------
  29. private: slice=3 offset=1 len=3590         ??----------
  30. .
  31. .
  32. Device: c2t1d0s2
  33. devicetag: c2t1d0
  34. type: sliced
  35. hostid: spaniel
  36. disk: name=disk01 id=955517050.1076.spaniel
  37. group: name=rootdg id=955515570.1025.spaniel
  38. flags: online ready autoconfig autoimport imported
  39. pubpaths: block=/dev/vx/dmp/c2t1d0s4 char=/dev/vx/rdmp/c2t1d0s4
  40. privpaths: block=/dev/vx/dmp/c2t1d0s3 char=/dev/vx/rdmp/c2t1d0s3
  41. version: 2.1
  42. iosize: min=512 (bytes) max=2048 (blocks)
  43. public: slice=4 offset=0 len=17678493    ??----- same size as disk above
  44. private: slice=3 offset=1 len=3590      ??----- same size as disk above
  45. The following is an example output of the "vxprint -ht" command after #4 of vxdiskadm has been run:
  46. DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
  47. DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
  48. V  NAME         USETYPE      KSTATE   STATE    LENGTH   READPOL   PREFPLEX
  49. PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
  50. SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
  51. SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE
  52. dg rootdg       default      default  0        955515570.1025.spaniel
  53. dm disk01       c2t1d0s2     sliced   3590     17678493 -
  54. dm rootdisk     -            -        -        -        REMOVED
  55. sd rootdiskPriv -            rootdisk 15581349 3590     PRIVATE   -        RMOV
  56. v  rootdisk4vol gen          ENABLED  ACTIVE   7182     ROUND     -
  57. pl rootdisk4vol-01 rootdisk4vol DISABLED REMOVED 7182   CONCAT    -        WO
  58. sd rootdisk-B0  rootdisk4vol-01 rootdisk 15581348 1     0         -        RMOV
  59. sd rootdisk-03  rootdisk4vol-01 rootdisk 0     7181     1         -        RMOV
  60. pl rootdisk4vol-02 rootdisk4vol ENABLED ACTIVE 7182     CONCAT    -        RW
  61. sd disk01-01    rootdisk4vol-02 disk01 0       7182     0         c2t1d0   ENA
  62. v  rootvol      root         ENABLED  ACTIVE   15574167 ROUND     -
  63. pl rootvol-01   rootvol      DISABLED REMOVED  15574167 CONCAT    -        RW
  64. sd rootdisk-02  rootvol-01   rootdisk 7181     15574167 0         -        RLOC
  65. pl rootvol-02   rootvol      ENABLED  ACTIVE   15574167 CONCAT    -        RW
  66. sd disk01-02    rootvol-02   disk01   7182     15574167 0         c2t1d0   ENA
  67. v  swapvol      swap         ENABLED  ACTIVE   2097144  ROUND     -
  68. pl swapvol-01   swapvol      DISABLED REMOVED  2097144  CONCAT    -        WO
  69. sd rootdisk-01  swapvol-01   rootdisk 15584939 2097144  0         -        RMOV
  70. pl swapvol-02   swapvol      ENABLED  ACTIVE   2097144  CONCAT    -        RW
  71. sd disk01-03    swapvol-02   disk01   15581349 2097144  0         c2t1d0   ENA
  72. The following is an example output of "vxdisk list" command:
  73. DEVICE TYPE DISK GROUP STATUS
  74. c0t0d0s2 sliced - - online
  75. c2t1d0s2 sliced disk01 rootdg online
  76. - - rootdisk rootdg removed was:c0t0d0s2
  77. Run the following commands to completely remove the existence of the rootdisk in order to tidy up the configuration. This will involve disassociating plexes and removing the plexes with their associated subdisks:
  78. Disassociate the plexes. This must be done with all plexes with a "STATE" of "DISABLED REMOVED". They must be doneONE AT A TIME. A plex can be located by looking for a "pl" in the far left column of information in the "vxprint -ht" output.
  79. 分离plex:
  80. vxplex dis rootdisk4vol-01 
  81. vxplex dis rootvol-01 
  82. vxplex dis swapvol-01 
  83. After running the above commands, the vxprint will look like this:
  84. vxprint -htg rootdg
  85. DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
  86. DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
  87. V  NAME         USETYPE      KSTATE   STATE    LENGTH   READPOL   PREFPLEX
  88. PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
  89. SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
  90. SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE
  91. dg rootdg       default      default  0        955515570.1025.spaniel
  92. dm disk01       c2t1d0s2     sliced   3590     17678493 -
  93. dm rootdisk     -            -        -        -        REMOVED
  94. sd rootdiskPriv -            rootdisk 15581349 3590     PRIVATE   -        RMOV
  95. pl rootdisk4vol-01 -         DISABLED REMOVED  7182     CONCAT    -        RW
  96. sd rootdisk-B0  rootdisk4vol-01 rootdisk 15581348 1     0         -        RMOV
  97. sd rootdisk-03  rootdisk4vol-01 rootdisk 0     7181     1         -        RMOV
  98. pl rootvol-01   -            DISABLED REMOVED  15574167 CONCAT    -        RW
  99. sd rootdisk-02  rootvol-01   rootdisk 7181     15574167 0         -        RLOC
  100. pl swapvol-01   -            DISABLED REMOVED  2097144  CONCAT    -        RW
  101. sd rootdisk-01  swapvol-01   rootdisk 15584939 2097144  0         -        RMOV
  102. v  rootdisk4vol gen          ENABLED  ACTIVE   7182     ROUND     -
  103. pl rootdisk4vol-02 rootdisk4vol ENABLED ACTIVE 7182     CONCAT    -        RW
  104. sd disk01-01    rootdisk4vol-02 disk01 0       7182     0         c2t1d0   ENA
  105. v  rootvol      root         ENABLED  ACTIVE   15574167 ROUND     -
  106. pl rootvol-02   rootvol      ENABLED  ACTIVE   15574167 CONCAT    -        RW
  107. sd disk01-02    rootvol-02   disk01   7182     15574167 0         c2t1d0   ENA
  108. v  swapvol      swap         ENABLED  ACTIVE   2097144  ROUND     -
  109. pl swapvol-02   swapvol      ENABLED  ACTIVE   2097144  CONCAT    -        RW
  110. sd disk01-03    swapvol-02   disk01   15581349 2097144  0         c2t1d0   ENA
  111. Remove the DISABLED REMOVED plexes and the rootdiskPriv subdisk.
  112. 删除分离的plex:
  113. vxedit -rf rm rootdiskPriv 
  114. vxedit -rf rm rootdisk4vol-01 
  115. vxedit -rf rm rootvol-01 
  116. vxedit -rf rm swapvol-01 
  117. Remove the disk media name "rootdisk".
  118. vxdg rmdisk rootdisk 
  119. Run a vxprint and make sure that all of the items from the "rootdisk" are removed (the original failed disk).
  120. vxprint -htg rootdg 
  121. vxprint -htg rootdg
  122. DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
  123. DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
  124. V  NAME         USETYPE      KSTATE   STATE    LENGTH   READPOL   PREFPLEX
  125. PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
  126. SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
  127. SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE
  128. dg rootdg       default      default  0        955515570.1025.spaniel
  129. dm disk01       c2t1d0s2     sliced   3590     17678493 -
  130. dm rootdisk     -            -        -        -        REMOVED
  131. v  rootdisk4vol gen          ENABLED  ACTIVE   7182     ROUND     -
  132. pl rootdisk4vol-02 rootdisk4vol ENABLED ACTIVE 7182     CONCAT    -        RW
  133. sd disk01-01    rootdisk4vol-02 disk01 0       7182     0         c2t1d0   ENA
  134. v  rootvol      root         ENABLED  ACTIVE   15574167 ROUND     -
  135. pl rootvol-02   rootvol      ENABLED  ACTIVE   15574167 CONCAT    -        RW
  136. sd disk01-02    rootvol-02   disk01   7182     15574167 0         c2t1d0   ENA
  137. v  swapvol      swap         ENABLED  ACTIVE   2097144  ROUND     -
  138. pl swapvol-02   swapvol      ENABLED  ACTIVE   2097144  CONCAT    -        RW
  139. sd disk01-03    swapvol-02   disk01   15581349 2097144  0         c2t1d0   ENA
  140. 更换磁盘,重做mirror:
  141. Once the vxprint shows that everything associated with the rootdisk has been removed, use vxdiskadm option 1 to initialize the new disk into rootdg (if not already done).  DO NOT accept the default name.  Instead, name it "rootdisk" (using the same diskname as previously).  After the disk has been initialized, use vxdiskadm option 6 to mirror the volumes on a disk.  This should automatically start the recovery process.
  142. 可按照vxdiskadm步骤6重做镜像
  143. 也可使用命令行:
  144. 先用vxrootmir做rootvol的镜像
  145. # vxrootmir -v rootdg02
  146. 对根盘其他卷做镜像
  147. # vxassist -b -g rootdg mirror usr rootdg01


09-29 17:32