Operating System - HP-UX
1836412 Members
2784 Online
110100 Solutions
New Discussion

how can I use dgcfgrestore command?

 
andrea_53
Advisor

how can I use dgcfgrestore command?

Hi, here is Andrea,
I would like to know how to use the dgcfgrestore command (VERITAS).
I know how to use vgcfgrestore in LVM, is it quite the same?

Thanks
5 REPLIES 5
harry d brown jr
Honored Contributor

Re: how can I use dgcfgrestore command?

It is the Veritas command.

man dgcfgrestore --- note the title.

live free or die
harry
Live Free or Die
Pete Randall
Outstanding Contributor

Re: how can I use dgcfgrestore command?

from man dgcfgrestore:

The 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.



It appears to be similar to vgcfgrestore but I would suggest you spend some time going through the man page.

Good luck,
Pete

Pete
eran maor
Honored Contributor

Re: how can I use dgcfgrestore command?

Hi

here is some exam :
NAME
dgcfgrestore - 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

please also look at this menual :

http://www.docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B9106-90008/B9106-90008_top.html&con=/hpux/onlinedocs/B9106-90008/00/00/80-con.html&toc=/hpux/onlinedocs/B9106-90008/00/00/80-toc.html&searchterms=dgcfgrestore&queryid=20020618-045405
love computers
andrea_53
Advisor

Re: how can I use dgcfgrestore command?

I have already tried using man command without any result. Can someone give me some examples.
Thanks
eran maor
Honored Contributor

Re: how can I use dgcfgrestore command?

Hi

you didnt told us what do you want to do with the command .

here is an exam. how to use this command to recover from a bad voule group .

EXAM :

The following steps can be used to recreate a rootdg that had only one disk
after that disk failed. This document assumes that the original disk in the
rootdg and the replacment disk are both /dev/rdsk/c3t1d0.

1. Replace the failed disk and boot the system. Note that VxVM will not start
and any VxVM volumes that are usually mounted by reading /etc/fstab will not
be available.

2. Set the vxconfigd to run in disabled mode.

vxconfigd -m disable

If the following error is returned:

vxvm:vxconfigd: ERROR: cannot open /dev/vx/config: Device is already open

Check the state of vxconfigd as follows:

vxdctl mode

The output should look like this:

mode: disabled


3. Start 10 vxiod processes.

vxiod set 10

4. Run vxconfigd in disabled mode, and create the necessary /dev/vx/dmp device files.

vxdctl init

5. Create rootdg with no disks.

vxdg init rootdg

6. Initialize the original disk for use in the rootdg.

vxdisk init c3t1d0

7. Add the disk to rootdg.

vxdg adddisk disk01=c3t1d0

8. Reset vxconfigd to run in normal mode, and bring the other disk groups back on line.

vxdctl enable

9. Recover the rootdg volumes from the dgcfgbackup file.

dgcfgrestore -n rootdg c3t1d0

10. At this point the volumes are recreated with their original sizes, but are not
yet enabled. Run the following command for each volume in the rootdg:

vxvol ???g rootdg start vol01

11. Start all of the other volumes.

vxvol startall

12. Now any volumes in the rootdg that contained filesystems will have to
have those filesystems recreated.

newfs /dev/vx/rdsk/rootdg/vol01

13. Then the all of the volumes will have to be mounted.

mount -a

14. And finally any data in the rootdg volumes/filesytems will have to be
recovered from archives.


Now the rootdg is recovered, and VxVM will start automatically at each reboot.

love computers