1753865 Members
7377 Online
108809 Solutions
New Discussion юеВ

VxVM /dev/vx recovery

 
Robert Klute
Visitor

VxVM /dev/vx recovery

OK, I fat fingered a rm -fr. I have recovered almost everything. All I have left is rebuilding the VxVM device files.

I am running 11.31 with VxVM, no LVM. I haven't rebooted so everything appears to still be working. Even so, I think it is kind of important to do rebuild the device files.

Is there some way to rebuild the /dev/vx directory. Before I reboot would be nice, in maintenance mode after reboot if necessary. BTW, this does mean that /dev/vx/dsk/rootdg is gone.

Thx.
6 REPLIES 6
Siju Vadakkan
Trusted Contributor

Re: VxVM /dev/vx recovery


I am not sure about rootdg, but for other DG's , You get the configuration back by doing a deport and import the DG's. This will created disk group directories and related files.

#vxdg deport
#vxdg import

And I think once u boot in maintenance mode , u can recover rootdg config as well.
Robert-Jan Goossens_1
Honored Contributor

Re: VxVM /dev/vx recovery

Hi Robert,

Why not restore the device files from your backup or make_tape_recovery image.

Regards,
Robert-Jan
Robert Klute
Visitor

Re: VxVM /dev/vx recovery

Good suggestions, both, but ....

You can't umount a filesystem if the device files for the volume don't exist anymore.

No backup yet. It took over a week to load the system, set up the 16TB of disk and restore data from tape. I was just cleaning up in prep for a backup when I did the rm -fr /dev/ .

I figure I can always re-import the non rootdg disk groups and volumes after a reboot. I am worried about the booting of the system without the bootdg/rootdg /dev/vx/rootdg/dsk files and the subsequent recovery. I know the information is somewhere in the running system, I was just hoping there was someway to get the device file information out of VxVM.
Robert-Jan Goossens_1
Honored Contributor

Re: VxVM /dev/vx recovery

Hi Robert,

Try below steps.

http://seer.support.veritas.com/docs/266847.htm

step 11

Regards,
Robert-Jan

Robert Klute
Visitor

Re: VxVM /dev/vx recovery

I think I figured out how to restore /dev.

First 'insf -e' will restore the traditional device files. Then you need to take care of the VxVM structure. I had a simple one - I didn't have clusters to deal with.

recreate the vx directory
mkdir /dev/vx

/dev/vx has 9 device files,
the major number is gotten from lsdev
look for 'vols vxvm' and 'dmp vxvm'.
They device files are
Major type vols: (minor devname)
0 config
1 trace
2 iod
3 info
4 task
5 taskmon
6 clust
7 netiod

Major Type dmp
0x03fffff dmpconfig

Make the following directories under /dev/vx
dmp dsk rdmp rdsk

- dmp and rdmp contain the device files.

Populate the dmp and rdmp directories
'vxdisk scandisks' will rebuild them

- dsk and rdsk contain the volumes.

Populate the volume device files.

The volume devices are of the form
/dev/vx/dsk//

For the rootdg there is also a symbolic link
/dev/vx/dsk/bootdg to /dev/vx/dsk/rootdg

The volumes and their major and minor numbers can be gotten from files under /etc/vx/cbr/bk. There you will find a directory for each dg in the form .... In each directory is a file ...cfgrec. grep the file for '^vol ', 'node_bdev=', and 'node_cdev'. You will get a series of entries like:

vol homevol
node_bdev=4/5619004
node_cdev=130/5619004


From that you can make the device file for homevol:

mknod /dev/vx/dsk/rootdg/homevol b 4 5619004
mknod /dev/vx/rdsk/rootdg/homevol c 130 5619004
Robert Klute
Visitor

Re: VxVM /dev/vx recovery

See above post