Quantcast
Channel: UnixRock
Viewing all articles
Browse latest Browse all 25

VERITAS Disk group has no valid configuration copies

$
0
0
Last week middle of the change window I encounter an issue with the VxVM disk group which was not able to import it. when I'm trying to import the DG, got an error and also I tried to import forcefully, But no use, same error. Later I fixed the issue by restoring the DG's configuration with using "vxconfigrestore" command. 
VxVM vxdg ERROR  Disk group unixdg: import failed: Disk group has no valid configuration copies
VxVM vxdg ERROR Disk group unixdg: import failed: Disk group has no valid configuration copies
VxVM vxdg ERROR Disk group unixdg: import failed: Disk group has no valid configuration copies
Trying to import the DG forcefully, but getting same error. Please take a note while executing vxdg import option with "-f" force, this will make a serious issue when its imported on another host. Before force importing the DG, we need to make it sure, that DG its not imported status on any host.
[root@unixrock /]# vxdg import unixdg
VxVM vxdg ERROR V-5-1-10978 Disk group unixdg: import failed:
Disk group has no valid configuration copies
[root@unixrock /]#
[root@unixrock /]# vxdg -Cf import unixdg
VxVM vxdg ERROR V-5-1-10978 Disk group unixdg: import failed:
Disk group has no valid configuration copies
[root@unixrock /]#
It seems the particular DG (unixdg) configuration might be lost or become corrupted. Later I have checked and found there is valid DG configuration backup which initiated by "vxconfigbackupd" daemon. We can also take DG configuration backup by running the "vxconfigbackup" command. /etc/vx/cbr/bk is the default location where the DG's configuration backup resides. we can change the location according to our requirements.

Checking Valid DG configuration backup on the following locations /etc/vx/cbr/bk
[root@unixrock /]# cd /etc/vx/cbr/bk
[root@unixrock /]#
[root@unixrock /]# ls -ltr |grep -i unixdg
drwxr-xr-x 2 root root 512 Feb 21 2013 unixdg_old.983406264.1391.unixrock
drwxr-xr-x 2 root root 1536 Jan 31 15:21 unixdg.1359224991.491.unixrock
[root@unixrock /]#
[root@unixrock /]# cd unixdg.1359224991.491.unixrock
[root@unixrock /]# ls -ltr
total 242000
-rw-r--r-- 1 root root 8365 Jan 23 22:47 1359224991.491.unixrock.diskinfo.1
-rw-r--r-- 1 root root 88260 Jan 23 22:47 1359224991.491.unixrock.cfgrec.1
-rw-r--r-- 1 root root 19223 Jan 23 22:48 1359224991.491.unixrock.dginfo.1
-rw-r--r-- 1 root root 24649728 Jan 23 22:48 1359224991.491.unixrock.binconfig.1
-rw-r--r-- 1 root root 9719 Jan 31 15:20 1359224991.491.unixrock.diskinfo
-rw-r--r-- 1 root root 92508 Jan 31 15:20 1359224991.491.unixrock.cfgrec
-rw-r--r-- 1 root root 19314 Jan 31 15:21 1359224991.491.unixrock.dginfo
-rw-r--r-- 1 root root 24649728 Jan 31 15:21 1359224991.491.unixrock.binconfig
[root@unixrock /]#
Checking the configuration file whether we have a valid VM Disk which is associated to our DG
[root@unixrock /]# cat *cfgrec |vxprint -D - -ht |grep -i dm
ST NAME STATE DM_CNT SPARE_CNT APPVOL_CNT
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
dm emc1_12afe emc1_12afe auto 65536 645023488 -
dm emc1_32efa emc1_32efa auto 65536 752543488 -
dm emc1_429ec emc1_429ec auto 65536 107450368 -
dm emc1_43fae emc1_43fae auto 65536 645023488 -
[root@unixrock /]#
Here restoration part has 2 stages: first stage is precommit and second stage is commit the changes. Precommit stage will load the configuration temporarily where we can examine the configuration using with vxprint. Once we confirmed that we have a valid DG's configuration, then we can commit the changes permanently.
[root@unixrock /]#  /etc/vx/bin/vxconfigrestore -p unixdg  
Diskgroup unixdg configuration restoration started ......

Installing volume manager disk header for emc1_3ae9 ...
Installing volume manager disk header for emc1_4340 ...

unixdg's diskgroup configuration is restored (in precommit state).
Diskgroup can be accessed in read only and can be examined using
vxprint in this state.

Run:
vxconfigrestore -c unixdg ==> to commit the restoration.
vxconfigrestore -d unixdg ==> to abort the restoration.
[root@unixrock /]#
Checking the Integrity of the DG (unixdg)
[root@unixrock /]# vxprint -hvtg unixdg
V NAME RVG/VSET/CO 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
SC NAME PLEX CACHE DISKOFFS LENGTH [COL/]OFF DEVICE MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO
EX NAME ASSOC VC PERMS MODE STATE

v LVOL1 - ENABLED ACTIVE 320864256 SELECT - fsgen
pl LVOL1-01 LVOL1 ENABLED ACTIVE 320864256 CONCAT - RW
sd emc1_12afe-01 LVOL1-01 emc1_12afe 0 251658240 0 emc1_12afe ENA
sd emc1_429ec-01 LVOL1-01 emc1_429ec 0 18874368 251658240 emc1_439e ENA

v LVOL2 - ENABLED ACTIVE 180355072 SELECT - fsgen
pl LVOL2-01 LVOL2 ENABLED ACTIVE 180355072 CONCAT - RW
sd emc1_43fae-01 LVOL2-01 emc1_4330 0 134217728 0 emc1_43fae ENA
sd emc1_429ec-02 LVOL2-01 emc1_429ec 18874368 6291456 134217728 emc1_439e ENA


v LVOL3 - ENABLED ACTIVE 375390208 SELECT - fsgen
pl LVOL3-01 LVOL3 ENABLED ACTIVE 375390208 CONCAT - RW
sd emc1_43fae-01 LVOL3-01 emc1_43fae 0 341835776 0 emc1_43fae ENA
sd emc1_43fae-06 LVOL3-01 emc1_43fae 817195776 33554432 341835776 emc1_32efa ENA
[root@unixrock /]#
Yes, confirmed that we have valid configuration of unixdg. Now its ready to commit the changes permanently.
[root@unixrock /]# /etc/vx/bin/vxconfigrestore -c unixdg 
Committing configuration restoration for diskgroup unixdg ....

unixdg's diskgroup configuration restoration is committed.
[root@unixrock /]# vxprint -hvtg unixdg|grep -i disable
[root@unixrock /]#
Cool!!! We have committed the changes, let we can deport and import the DG again.
[root@unixrock /]#
[root@unixrock /]# vxdg deport unixdg
[root@unixrock /]#
[root@unixrock /]# vxdg import unixdg
[root@unixrock /]#
Yes, we have fixed the issue by restoring the DG's vxconfiguration file.

Thanks for reading this post Please leave your valuable comments or queries, I will respond to you at earliest.

Viewing all articles
Browse latest Browse all 25

Trending Articles