Operating System - HP-UX
1753767 Members
6052 Online
108799 Solutions
New Discussion юеВ

/dev/vg00 deleted - no mapfile

 
SOLVED
Go to solution
TMcB
Super Advisor

/dev/vg00 deleted - no mapfile

Hi

/dev/vg00 has been accidently deleted.
Is it possible to recover from this error.

I have a vg00.conf in /etc/lvmconf but no map file.

I am at the bcheckrc single user prompt.

(bcheckrc)#ls -l /dev/vg00
total 0
crw-rw-rw- 1 root root 64 0x000000 Jan 23 18:13 group


thanks so much for any advice
21 REPLIES 21
Torsten.
Acclaimed Contributor
Solution

Re: /dev/vg00 deleted - no mapfile

What is deleted and how you did this?

You can try vgscan or vgimport (even without a mapfile).

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
TMcB
Super Advisor

Re: /dev/vg00 deleted - no mapfile


Hi
thanks for getting back to me.

all the files in /dev/vg00 are missing.
I ran :
mkdir /dev/vg00
mknod

so the only files in /dev/vg00 is :
0x000000 Jan 23 18:13 group

thanks
James R. Ferguson
Acclaimed Contributor

Re: /dev/vg00 deleted - no mapfile

Hi:

You could try simply making the missing device files. For example:

# cd /dev/vg00
# mknod lvol1 b 64 0x000001
# mknod rlvol1 c 64 0x000001

...repeating for every logical volume (8 or more) with the appropriate minor numbers.

Regards!

...JRF...
Torsten.
Acclaimed Contributor

Re: /dev/vg00 deleted - no mapfile

Now proceed with vgimport.

example:

vgimport -v /dev/vg00 /dev/dsk/c0t1d0

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Eric SAUBIGNAC
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

Bonsoir,

System not yet rebooted, right ? May be it is enough to recreate special file in /dev/vg00. For exemple : "mknod /dev/vg00/lvol1 b 64 0x000001" and mknod /dev/vg00/lvol1 c 64 0x000001"

Do it for each missing lvol and change minor number to 0x000002, 0x000003 and so on ...
If you have any doubt have a look in other directories like /dev/vg*

In vg00, lvol are named lvol1 to lvol8. For others lvol it depends. I suppose that "vgdisplay -v vg00" still works, so it can give you some informations. Also have a look at /etc/fstab, it will give you some others informations to find lvol's names.

Eric
Torsten.
Acclaimed Contributor

Re: /dev/vg00 deleted - no mapfile

"System not yet rebooted, right ?"

I don't think so.

>>
I am at the bcheckrc single user prompt.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Eric SAUBIGNAC
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

oups ... :-(
Anyway, I was leaving office. I guess TMcB is in better hands with Torsten than mine's
Eric SAUBIGNAC
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

Just one thing before leaving : bcheckrc probably means than more things have been erased ?
sujit kumar singh
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

Hello friend


if u have forgot what OVs were there in the root vG vg00 then do the following. it can be assumed that u have a valid LVM Conf Backup file for the root VG vg00 in the /etc/lvmconf/vg00.conf

just give the command as

1)

#vgcfgrestore -l -n /dev/vg00
this shud show as for example

/dev/dsk/c5t6d0 ---- disk1
/dev/dsk/c5t5d0 -- disk2
/dev/dsk/c5t4d0 -- disk3
/dev/dsk/c5t3d0 -- disk4

this should show what PVs were the part of the VG vg00


reboot the system in LVM Maintenance mode.

ISL> hpux -lm


then

#vgexport /dev/vg00
#mkdir /dev/vg00
#mknod /dev/vg00/group c 0x000000
#vgimport /dev/vg00

#vgchange -a y vg00
#lvrmboot -r /dev/vg00
#lvlnboot -b /dev/vg00/lvol1
#lvlnboot -s /dev/vg00/lvol2
#lvlnboot -r /dev/vg00/lvol3
#lvlnboot -d /dev/vg00/lvol2


#lvlnboot -v

#vi /stand/bootconf

put the entry for this disk in here as

l
l

#setboot -p -a l -b on


boot the system normally

#shutdown -ry 00


on new boot

u may get the system running


Regards
Sujit