Site icon UnixArena

VxVM – vxconfigrestore Command Syntax with Examples

vxconfigrestore – UnixArena’s Manual Page

/opt/VRTS/bin/vxconfigrestore – Restore disk group configuration

Product – Veritas Volume Manager-vxvm (Storage Foundation)

The vxconfigrestore utility is used to restore a disk group’s configuration information if this has been lost or become corrupted. The disk group whose configuration is to be restored is specified either by name or by identifier (ID). The disk group configuration backup files may have been automatically created by the ‘vxconfigbackupd’ daemon, or manually by running the ‘vxconfigbackup‘ command.

Restoration of a disk group configuration has two stages:

1. Pre-commit

2. Commit

File Names

Description

/etc/vx/cbr/bk/dgname.dgid/dgid.dginfo Default location of backup file for disk group information.
/etc/vx/cbr/bk/dgname.dgid/dgid.diskinfo Default location of backup file for disk attributes.
/etc/vx/cbr/bk/dgname.dgid/dgid.binconfig Default location of backup file for binary configuration copy.
/etc/vx/cbr/bk/dgname.dgid/dgid.cfgrec Default location of backup file for configuration records in vxprint -m format.

 

Tasks

Switches

To restore or precommit configuration of specific disk group vxconfigrestore -p disk_group
To restore configuration of specific disk group without writing header information vxconfigrestore -n disk_group
Restore the configration from different location vxconfigrestore -l directory -p disk_group
To abort the restoration vxconfigrestore [-l directory]  -d disk_group
To permanently commit the configuration restoration changes vxconfigrestore -c disk_group

 vxconfigrestore – Command Line Examples

To list the available backups for the restoration

  # ls -l /etc/vx/cbr/bk
	drwxr-xr-x   3 root     root         512 Sep 16 16:04 appsdg.1410430685.21.vxserver
	drwxr-xr-x   6 root     root         512 Sep 16 16:21 oradg.1410429571.18.vxserver
	drwxr-xr-x   6 root     root         512 Sep 16 16:21 rootdg.1410417163.12.vxserver

  # ls -l rootdg.1410417163.12.vxserver
	-rw-r--r--   1 root     root     30341120 Sep 16 16:21 1410417163.12.vxserver.binconfig
	-rw-r--r--   1 root     root       21561 Sep 16 16:21 1410417163.12.vxserver.cfgrec
	-rw-r--r--   1 root     root        2180 Sep 16 16:21 1410417163.12.vxserver.dginfo
	-rw-r--r--   1 root     root        2569 Sep 16 16:21 1410417163.12.vxserver.diskinfo
	drwxr-xr-x   3 root     root         512 Sep 11 13:44 bkp_20140911_134442
	drwxr-xr-x   3 root     root         512 Sep 11 13:52 bkp_20140911_135234
	drwxr-xr-x   3 root     root         512 Sep 16 16:03 bkp_20140916_160351
	drwxr-xr-x   3 root     root         512 Sep 16 16:21 bkp_20140916_162131

To restore or pre-commit or load the configuration of specific disk group

  # vxconfigrestore -p appsdg
	Diskgroup appsdg configuration restoration started ......
	Installing volume manager disk header for c4t10d0s2 ...
	Installing volume manager disk header for c4t11d0s2 ...
	Installing volume manager disk header for c4t12d0s2 ...
	Installing volume manager disk header for c4t13d0s2 ...
	Installing volume manager disk header for c4t9d0s2 ...
	|
	appsdg'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 appsdg ==> to commit the restoration.
	  vxconfigrestore -d appsdg ==> to abort the restoration.

[box type=”note” align=”alignleft” ]If you don’t want the disk header to be written use the option ‘-n’ instead of ‘-p'[/box]

To restore the configuration from different location

   # vxconfigrestore -l /TEST -p appsdg
	Diskgroup appsdg configuration restoration started ......
	Installing volume manager disk header for c4t10d0s2 ...
	Installing volume manager disk header for c4t11d0s2 ...
	Installing volume manager disk header for c4t12d0s2 ...
	Installing volume manager disk header for c4t13d0s2 ...
	Installing volume manager disk header for c4t9d0s2 ...
	/
	appsdg'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 -l /TEST -c appsdg ==> to commit the restoration.
	vxconfigrestore -l /TEST -d appsdg ==> to abort the restoration.

To abort the restoration

  # vxconfigrestore -l /TEST -d appsdg

To permanently commit the configuration restoration changes to the disk

  # vxconfigrestore -c appsdg
	Committing configuration restoration for diskgroup appsdg ....
	|
	appsdg's diskgroup configuration restoration is committed.
Exit mobile version