Operating System - HP-UX
1832872 Members
2326 Online
110048 Solutions
New Discussion

How to restore VG's special files?

 
SOLVED
Go to solution
Jorge Fabregas
Regular Advisor

How to restore VG's special files?

Hi,

I accidentally deleted my production VG device files:

rm /dev/vgoraprod/*

I created back the group file (with mknod) (I remembered the minor number) but I need to create the files for the logical volumes.

I know there is vgcfgrestore but I'm not sure if that would do it.

Any help will be appreciated.

Thanks,
Jorge
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How to restore VG's special files?

Ok, it's rather easy if you followed stand LVOL naming conventions otherwise you will need to find your original LVOL names.

For each LVOL, you will create two device nodes for the block and character devices respectively.

Let's pretend that your group device node is
64 0x050000

lvol1 will use 0x050001
lvol2 will use 0x050002
lvol20 (14 hex) will use 0x050014

For lvol1:
mknod /dev/vgoraprod/lvol1 b 64 0x050001
mknod /dev/vgoraprod/rlvol1 c 64 0x050001

and so on.

If it ain't broke, I can fix that.
Sandman!
Honored Contributor

Re: How to restore VG's special files?

What about Ignite backups? Or if this is a clustered VG then look at its definition in the /dev/vgoraprod directory on other nodes. If you have one you would be able to restore the char/block device special files. Besides you also need to know the mount points those lvols were mounted on or the app name for raw device files.
Jorge Fabregas
Regular Advisor

Re: How to restore VG's special files?

A. Clay: THANKS A MILLION! YOU SAVED MY LIFE :) This is actually the very first time I do something dumb like that. I have plenty of Ignite backups. I just knew there had to be an easier/faster way that restoring from backup (overkill) for this kind of particular situation. Again, thanks A. Clay and also for being so fast! All the best! Jorge