Problem
Additional details about vxconfigbackup
Solution
Location
Group: oradg
dgid: 1071722106.138.gopal
import-id: 1024.375
flags: cds
version: 110
alignment: 8192 (bytes)
ssb: on
detach-policy: global
copies: nconfig=default nlog=default
config: seqno=0.1078 permlen=1280 free=1267 templen=7 loglen=192
config disk c1t10d0s2 copy 1 len=1280 state=clean online
log disk c1t10d0s2 copy 1 len=192
/etc/vx/cbr/bk/oradg.1071722106.138.gopal/1071722106.138.gopal.diskinfo
( Contains "vxdisk list <devices>" )
/etc/vx/cbr/bk/oradg.1071722106.138.gopal/1071722106.138.gopal.dginfo
( Contains "vxdctl support, vxdisk list and vxdg list <disk group )
/etc/vx/cbr/bk/oradg.1071722106.138.gopal/1071722106.138.gopal.cfgrec.
( Contains "vxprint -m" )
/etc/vx/cbr/bk/oradg.1071722106.138.gopal/1071722106.138.gopal.binconfig
( Contains "vxprivutil dumpconfig" )
VxVM vxconfigd ERROR V-5-1-569 Disk group group,Disk disk:Cannot auto-import group:
VxVM vxconfigd ERROR V-5-1-123 Disk group group: Disabled by errors
# vxdg list oradg
To back up a single disk group manually :
# /etc/vx/bin/vxconfigbackup oradg
Start backing up diskgroup oradg to /etc/vx/cbr/bk/oradg.1071722106.138.gopal ..
To back up all disk groups :
# /etc/vx/bin/vxconfigbackup
V
xVM vxconfigbackup ERROR V-5-2-3694 Configuration Copy for diskgroup rootdg has
not changed since last backup (Thu Jan 8 15:55:20 EST 2004). Backup is not necessary.
Start backing up diskgroup datadg to /etc/vx/cbr/bk/datadg.1075436149.168.gopal...
VxVM NOTICE V-5-2-3100 Backup complete for diskgroup: datadg
VxVM vxconfigbackup ERROR V-5-2-3694 Configuration Copy for diskgroup oradg has
not changed since last backup (Thu Feb 12 16:19:59 EST 2004). Backup is not necessary.
To back up to an alternative location of the configuration database:
# /etc/vx/bin/vxconfigbackup -l /tmp/orgdgbck oradg
Start backing up diskgroup oradg to /tmp/oradgbck/oradg.1071722106.138.gopal ...
VxVM NOTICE V-5-2-3100 Backup complete for diskgroup: oradg
To activate and check if vxconfigbackupd is running, enter :
# /usr/bin/vxconfigbackupd &
# ps -edf | grep "vxconfigbackupd"
root 27423 27168 0 16:37:50 ? 0:00 /sbin/sh - /etc/vx/bin/vxconfigbackupd
root 27168 1 0 16:37:46 ? 0:00 /sbin/sh - /etc/vx/bin/vxconfigbackupd
( using default database location) and diskgroup name
# vxdg list oradg
Group: oradg
dgid: 1071722106.138.gopal
import-id: 1024.375
flags: cds restoring
TIMESTAMP
Tue Oct 15 23:27:01 PDT 2003
DISK_GROUP_CONFIGURATION
Group: mydg
dgid: 1047336696.19.xxx.veritas.com
Use the time stamp information to decide which backup contains the relevant information, and use the disk group ID instead of the disk group name:
# /etc/vx/bin/vxconfigrestore -p 1047336696.19.xxx.veritas.com
Vxconfigbackupd
monitors changes to disk group configuration in Volume Manager whenever a configuration change occurs, and stores the output in the configuration directory. This will assist recovery of lost or corrupt disk groups/volumes when they do not have backup copies of their configuration (old
vxprint
output).
The
vxconfigbackupd
daemon is started from the
/etc/rc2.d/S95vxvm-recover startup script. The script includes the following additional lines:
# Starting vxconfigbackupd.
#
#/etc/vx/bin/vxconfigbackupd &
The error messages as well as the warning messages for the daemon are written with a timestamp to the console device.
Usage
-d <dir>
To identify an alternate configuration data backup directory
Default: The configuration files are stored in /etc/vx/dgcfg.
-n <number>
Number of copies that are maintained and stored in gzip, compress, or ASCII text, depending on which utility is available on the system. The configuration copy files are maintained in a cyclic manner and are named dgname.n, where n is a number ranging from 1 to n.
Default: Five copies are stored, where n=1 is the most recent copy and n=5 is the oldest copy.
-R
The configuration files for the disk group are removed from the backup directory when a disk group is deported or destroyed.
Default: Files are moved to the /etc/vex/dgcfg/deport subdirectory (created as default after the first disk group is deported or destroyed).
<dg_name .... >
To restrict the daemon logging for specified disk groups
Default: The daemon logs all imported disk groups.
If the default setting is to be changed, stop/start
vxconfigbackupd
with the new options as follows:
# ps -edf | grep vxconfigbackupd
root 28899 25665 1 16:37:00 pts/3 0:00 /bin/ksh /etc/vx/bin/vxconfigbackupd
# pkill vxconfigbackupd
#/etc/vx/bin/vxconfigbackupd [ -d dir ] [ -n num ] [ -R ] [ dg_name ... ] &
For more details, refer to the
vxconfigbackupd
(1M) manual page.
Note: Currently, there is no
vxconfigrestore
utility to restore the "saved" data.
# vxprint -g <dg_name> -m
The
-m
option displays all information about each selected record in a format that is useful as input to both the
vxmake
utility and to
awk(1) scripts.
Recovery
The configuration data can be accessed from the default directory as follows (assuming that the disk group newdg has been created, more than five changes have been executed against the disk group):
# cd /etc/vx/dgcfg
# ls -lrt newdg*
-rw-r--r-- 1 root root 6019 Nov 7 16:26 newdg.5
-rw-r--r-- 1 root root 6001 Nov 7 16:26 newdg.4
-rw-r--r-- 1 root root 18034 Nov 7 16:27 newdg.3
-rw-r--r-- 1 root root 18034 Nov 7 16:27 newdg.2
-rw-r--r-- 1 root other 2035 Nov 7 16:53 newdg.1
# file newdg*
newdg.1: gzip compressed data - deflate method
newdg.2: compressed data block compressed 16 bits
newdg.3: compressed data block compressed 16 bits
newdg.4: ascii text
newdg.5: ascii text
Normally, all the files will be either in gzip, compressed, or ASCII text format.
This example illustrates how to access all the three possible formats (convert them back to ASCII text).
# cat "newdg.4"
File newdg.2 (compressed)
# mv newdg.2 newdg.2.Z
# uncompress newdg.2.Z
# cat "newdg.2"
File newdg.1 (gzip)
# gunzip -S .1 newdg
# cat "newdg"
This information can now be used as part of the
vxmake
or scripts utility to recreate disk groups, subdisks, plexes, and volume records for Volume Manager.
Changing vxconfigbackupd default location /etc/vx/cbr to another directory
Vxconfigbackup will automatically backup VxVM config copies into the default /etc/vx/cbr directory when there is a config change. If there are huge number of vxvm objects then the config copy backup can occupy a lot of space under the /etc/vx/cbr/bk directory. Moreover, vxconfigbackup keeps 5 copies by default.
If the customer is concerned with the amount of space taken by vxconfigbackup, the /usr/lib/vxvm/voladm.d/lib/vxcbrlib.sh script can be edited. Change CF_BKUP_BASE_PATH to point to a new location.
The binconfig file can have a size up to 25 MB or more.
To take effect immediately, need to restart vxconfigbackupd.
After the change, you can remove the /etc/vx/cbr directory.