点击(此处)折叠或打开
- 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.
- 故障原因:
- vxvm对系统盘做的mirror,一块硬盘故障,按照vxdiskadm 步骤操作更换硬盘后报错:
- 参考 https://support.symantec.com/en_US/article.TECH15662.html
- Problem
- 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.
- Error Message
- "vxvm:vxdg: ERROR: associating disk-media rootdisk with c0t0d0s2: Disk public region is too small"
- Solution
- 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:
- AVAILABLE DISK SELECTIONS:
- 0. c0t0d0
- /sbus@3,0/SUNW,fas@3,8800000/sd@0,0
- 1. c2t1d0
- /sbus@3,0/SUNW,fas@0,8800000/sd@1,0
- 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:
- Device: c0t0d0s2
- devicetag: c0t0d0
- type: sliced
- hostid:
- disk: name= id=996853491.1293.spaniel
- group: name= id=
- flags: online ready autoconfig autoimport
- pubpaths: block=/dev/vx/dmp/c0t0d0s4 char=/dev/vx/rdmp/c0t0d0s4
- privpaths: block=/dev/vx/dmp/c0t0d0s3 char=/dev/vx/rdmp/c0t0d0s3
- version: 2.1
- iosize: min=512 (bytes) max=2048 (blocks)
- public: slice=4 offset=0 len=17678493 ??----------
- private: slice=3 offset=1 len=3590 ??----------
- .
- .
- Device: c2t1d0s2
- devicetag: c2t1d0
- type: sliced
- hostid: spaniel
- disk: name=disk01 id=955517050.1076.spaniel
- group: name=rootdg id=955515570.1025.spaniel
- flags: online ready autoconfig autoimport imported
- pubpaths: block=/dev/vx/dmp/c2t1d0s4 char=/dev/vx/rdmp/c2t1d0s4
- privpaths: block=/dev/vx/dmp/c2t1d0s3 char=/dev/vx/rdmp/c2t1d0s3
- version: 2.1
- iosize: min=512 (bytes) max=2048 (blocks)
- public: slice=4 offset=0 len=17678493 ??----- same size as disk above
- private: slice=3 offset=1 len=3590 ??----- same size as disk above
- The following is an example output of the "vxprint -ht" command after #4 of vxdiskadm has been run:
- DG NAME NCONFIG NLOG MINORS GROUP-ID
- DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
- V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX
- 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 rootdg default default 0 955515570.1025.spaniel
- dm disk01 c2t1d0s2 sliced 3590 17678493 -
- dm rootdisk - - - - REMOVED
- sd rootdiskPriv - rootdisk 15581349 3590 PRIVATE - RMOV
- v rootdisk4vol gen ENABLED ACTIVE 7182 ROUND -
- pl rootdisk4vol-01 rootdisk4vol DISABLED REMOVED 7182 CONCAT - WO
- sd rootdisk-B0 rootdisk4vol-01 rootdisk 15581348 1 0 - RMOV
- sd rootdisk-03 rootdisk4vol-01 rootdisk 0 7181 1 - RMOV
- pl rootdisk4vol-02 rootdisk4vol ENABLED ACTIVE 7182 CONCAT - RW
- sd disk01-01 rootdisk4vol-02 disk01 0 7182 0 c2t1d0 ENA
- v rootvol root ENABLED ACTIVE 15574167 ROUND -
- pl rootvol-01 rootvol DISABLED REMOVED 15574167 CONCAT - RW
- sd rootdisk-02 rootvol-01 rootdisk 7181 15574167 0 - RLOC
- pl rootvol-02 rootvol ENABLED ACTIVE 15574167 CONCAT - RW
- sd disk01-02 rootvol-02 disk01 7182 15574167 0 c2t1d0 ENA
- v swapvol swap ENABLED ACTIVE 2097144 ROUND -
- pl swapvol-01 swapvol DISABLED REMOVED 2097144 CONCAT - WO
- sd rootdisk-01 swapvol-01 rootdisk 15584939 2097144 0 - RMOV
- pl swapvol-02 swapvol ENABLED ACTIVE 2097144 CONCAT - RW
- sd disk01-03 swapvol-02 disk01 15581349 2097144 0 c2t1d0 ENA
- The following is an example output of "vxdisk list" command:
- DEVICE TYPE DISK GROUP STATUS
- c0t0d0s2 sliced - - online
- c2t1d0s2 sliced disk01 rootdg online
- - - rootdisk rootdg removed was:c0t0d0s2
- 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:
- 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.
- 分离plex:
- vxplex dis rootdisk4vol-01
- vxplex dis rootvol-01
- vxplex dis swapvol-01
- After running the above commands, the vxprint will look like this:
- vxprint -htg rootdg
- DG NAME NCONFIG NLOG MINORS GROUP-ID
- DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
- V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX
- 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 rootdg default default 0 955515570.1025.spaniel
- dm disk01 c2t1d0s2 sliced 3590 17678493 -
- dm rootdisk - - - - REMOVED
- sd rootdiskPriv - rootdisk 15581349 3590 PRIVATE - RMOV
- pl rootdisk4vol-01 - DISABLED REMOVED 7182 CONCAT - RW
- sd rootdisk-B0 rootdisk4vol-01 rootdisk 15581348 1 0 - RMOV
- sd rootdisk-03 rootdisk4vol-01 rootdisk 0 7181 1 - RMOV
- pl rootvol-01 - DISABLED REMOVED 15574167 CONCAT - RW
- sd rootdisk-02 rootvol-01 rootdisk 7181 15574167 0 - RLOC
- pl swapvol-01 - DISABLED REMOVED 2097144 CONCAT - RW
- sd rootdisk-01 swapvol-01 rootdisk 15584939 2097144 0 - RMOV
- v rootdisk4vol gen ENABLED ACTIVE 7182 ROUND -
- pl rootdisk4vol-02 rootdisk4vol ENABLED ACTIVE 7182 CONCAT - RW
- sd disk01-01 rootdisk4vol-02 disk01 0 7182 0 c2t1d0 ENA
- v rootvol root ENABLED ACTIVE 15574167 ROUND -
- pl rootvol-02 rootvol ENABLED ACTIVE 15574167 CONCAT - RW
- sd disk01-02 rootvol-02 disk01 7182 15574167 0 c2t1d0 ENA
- v swapvol swap ENABLED ACTIVE 2097144 ROUND -
- pl swapvol-02 swapvol ENABLED ACTIVE 2097144 CONCAT - RW
- sd disk01-03 swapvol-02 disk01 15581349 2097144 0 c2t1d0 ENA
- Remove the DISABLED REMOVED plexes and the rootdiskPriv subdisk.
- 删除分离的plex:
- vxedit -rf rm rootdiskPriv
- vxedit -rf rm rootdisk4vol-01
- vxedit -rf rm rootvol-01
- vxedit -rf rm swapvol-01
- Remove the disk media name "rootdisk".
- vxdg rmdisk rootdisk
- Run a vxprint and make sure that all of the items from the "rootdisk" are removed (the original failed disk).
- vxprint -htg rootdg
- vxprint -htg rootdg
- DG NAME NCONFIG NLOG MINORS GROUP-ID
- DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
- V NAME USETYPE KSTATE STATE LENGTH READPOL PREFPLEX
- 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 rootdg default default 0 955515570.1025.spaniel
- dm disk01 c2t1d0s2 sliced 3590 17678493 -
- dm rootdisk - - - - REMOVED
- v rootdisk4vol gen ENABLED ACTIVE 7182 ROUND -
- pl rootdisk4vol-02 rootdisk4vol ENABLED ACTIVE 7182 CONCAT - RW
- sd disk01-01 rootdisk4vol-02 disk01 0 7182 0 c2t1d0 ENA
- v rootvol root ENABLED ACTIVE 15574167 ROUND -
- pl rootvol-02 rootvol ENABLED ACTIVE 15574167 CONCAT - RW
- sd disk01-02 rootvol-02 disk01 7182 15574167 0 c2t1d0 ENA
- v swapvol swap ENABLED ACTIVE 2097144 ROUND -
- pl swapvol-02 swapvol ENABLED ACTIVE 2097144 CONCAT - RW
- sd disk01-03 swapvol-02 disk01 15581349 2097144 0 c2t1d0 ENA
- 更换磁盘,重做mirror:
- 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.
- 可按照vxdiskadm步骤6重做镜像
- 也可使用命令行:
- 先用vxrootmir做rootvol的镜像
- # vxrootmir -v rootdg02
- 对根盘其他卷做镜像
- # vxassist -b -g rootdg mirror usr rootdg01