| United States-English |
|
|
|
![]() |
HP-UX 11i Version 1.5 Reference Volume 2, Section 1M: System Administration Commands > ddgcfgrestore(1M) |
|
NAMEdgcfgrestore — display or restore VxVM disk group configuration from backup file SYNOPSIS/usr/sbin/dgcfgrestore -n dg_name -l /usr/sbin/dgcfgrestore -n dg_name [-o old_dm_name] dm_name /usr/sbin/dgcfgrestore -f dg_conf_path -l /usr/sbin/dgcfgrestore -f dg_conf_path [-o old_dm_name] dm_name DESCRIPTIONThe dgcfgrestore command may be used to restore configuration data to a disk making up a single-disk disk group or a disk in a multi-disk disk group in which all other disks have no copy of the configuration data. dgcfgrestore is not designed to work if the disk being restored belongs to a multi-disk disk group and at least one of the other disks in the group is online and contains configuration data. For those cases, simply adding the new disk to the disk group will result in the configuration data being copied to the new disk. dgcfgrestore will fail if the disk group to which the disk being restored belonged to does not exist. The dgcfgrestore command restores the VxVM configuration data from a default (-n option) or alternate (-f option) configuration backup file to the physical disk named by dm_name. Or, it displays the configuration data on standard output (-l option). The configuration stored for one disk device, old_dm_name, can be copied to another disk device dm_name (-o option). Options and Argumentsdgcfgrestore recognizes the following options and arguments:
RETURN VALUEdgcfgrestore exits with one of the following values:
EXAMPLESExample 1Restore the VxVM configuration information for the VxVM disk disk01 on replaced disk device c0t7d0 that was part of a one disk disk group onediskdg using the default file /etc/vxvmconf/dg00.conf: # Initialize replaced disk device c0t7d0 for use by VxVM /etc/vx/bin/vxdisketup -i c0t7d0 # Create disk group using this disk vxdg init onediskdg disk01=c0t7d0 # Restore configuration data dgcfgrestore -n onediskdg c0t7d0 vxprint -g onediskdg -ht 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 onedisk default default 7928000 944849696.3237.veritas9 dm disk01 c8t0d0 simple 1024 8885610 - v volume1 fsgen DISABLED EMPTY 10240 SELECT - pl volume1-01 volume1 DISABLED EMPTY 10240 CONCAT - RW sd disk01-01 volume1-01 disk01 0 10240 0 c8t0d0 ENA It is now necessary to start the volumes. For a simple volume (non-mirrored or non-RAID5) one may simply start the volume. vxvol -g onediskdg start vol01 Example 2Although not recommended, it is possible to initialize disks that do not contain configuration data. Having redundant copies of configuration data on disks in a disk group avoids the need for the following procedure. This example shows how restore the VxVM configuration information for the VxVM disk disk01 on failed and now replaced disk device c0t4d0. It was the only disk with configuration data in the two-disk disk group dgnocfg. The other disk, disk02, on c0t5d0 does not contain configuration data. The example makes use of the alternate configuration file /tmp/dgnocfg.backup: # Initialize replaced disk device c0t4d0 for use by VxVM /etc/vxvm/bin/vxdisksetup -i c0t4d0 # Create disk group using this disk vxdg init dgnocfg disk01=c0t4d0 # Reinitialize c0t5d0 to match new instance of dgnocfg /etc/vxvm/bin/vxdiskunsetup -C c0t5d0 /etc/vxvm/bin/vxdisksetup -i c0t5d0 noconfig vxdg -g dgnocfg adddisk disk02=c0t5d0 # Restore configuration data dgcfgrestore -f /tmp/dgnocfg.backup c0t4d0 vxprint -g dgnocfg -ht 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 dgnocfg default default 5035000 945182942.3700.veritas9 dm disk01 c0t4d0 simple 1024 8885610 - dm disk02 c0t5d0 simple 1024 8885610 - v mirvol01 fsgen DISABLED EMPTY 10240 SELECT - pl mirvol01-01 mirvol01 DISABLED EMPTY 10240 CONCAT - RW sd disk01-01 mirvol01-01 disk01 0 10240 0 c0t4d0 ENA pl mirvol01-02 mirvol01 DISABLED EMPTY 10240 CONCAT - RW sd disk02-01 mirvol01-02 disk02 0 10240 0 c0t5d0 ENA For a mirrored volume, we want to use the good plex on the disk that was not replaced (disk02) to resync the other one. To do so, we take the replaced plex offline, start the volume and place the remaining plex online. vxmend -g dgnocfg off mirvol01-01 vxvol -g dgnocfg start mirvol01 vxmend -g dgnocfg on mirvol01-01 Example 3List backup information saved in default configuration file /etc/vxvmconf/dgnocfg.conf: dgcfgrestore -n twodiskdg -l Above command might display the following: Disk Group Configuration information in "/etc/vxvmconf/twodiskdg.conf" DG Name twodiskdg ---- Physical disks : 2 ---- /dev/rdsk/c0t4d0 /dev/rdsk/c0t5d0 Example 4Restore the VxVM configuration information for the VxVM disk disk01 for failed disk device c0t2d0 that was part of a one disk disk group foodg to c0t3d0. Use the default file /etc/vxvmconf/foodg.conf: # Initialize c0t3d0 for use by VxVM /etc/vx/bin/vxdisketup -i c0t3d0 # Create disk group using this disk vxdg init onediskdg disk01=c0t3d0 # Restore configuration data dgcfgrestore -n foodg -o c0t3d0 c0t2d0 |
||||||||||||||||||||||||||||
|
|||||||||||||||