Operating System - HP-UX
1826614 Members
2745 Online
109695 Solutions
New Discussion

Re: /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



sujit kumar singh
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

hi

to know about waht disks were a part of vg00

u can also run the vgcfgrestore command in the following manner depending on that the VG vg00 LVM Conf backup file that is as /etc/lvmconf/vg00.conf is okay and that shud be OK.

#vgcfgrestore -l -n vg00

or

#vgcfgrestore -l -f /etc/lvmconf/vg00.conf /dev/vg00


Wreagards
Sujit
TMcB
Super Advisor

Re: /dev/vg00 deleted - no mapfile

i realy appreciate your help.

I
recreated all the files under /dev/vg00 using, :
mknod lvol1 b 64 0x000001
mknod rlvol1 c 64 0x000001

now when I reboot I get eror below
lvlnboot: Could not find root lv related info to create /stand/rootconf file
: ioinit: Rebooting the system because /etc/ioconfig and /stand/ioconfig files are inconsistent

thanks
sujit kumar singh
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

hello


remeber that even if u have not a map file for a VG, u can still import the VG and get that running if u know the list of the PVs in that VG.

and if u have forgot that list of PVs also u can get that if u have an intact VG conf file for that VG, generally kept as /etc/lvmconf/.conf

and u can get this by

#vgcfgrestore -l -n /dev/

or

by

#vgcfgrestore -l -f /etc/lvmconf/.conf /dev/


-l option of vgcfgrestore is for listing the PVs and some other informations ... do not worry.
this list u the PVs which u can use witht the vgimport command.

Please refer to the man pages of vgcfgrstore(1M) and vgimport(1M) for the further details.


Regards
Sujit
sujit kumar singh
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

hi

please read all the three posts that i have made before u are planning to do anything .. and after that decide...

root vg can be modified imported , exported only in the LVM MAINTENANCE MODE.



I again say please read all my three erlier posts.

regards
Sujit
sujit kumar singh
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

hi


read the post of Torsten that u can vgimport root vg even if u have no map file.


but the vgexport and vgimport that is rewd to solve this scenario can be done only in LVM Maintenance mode.


Please reboot in LVM maintenance mode.

and post the errors that u get in the LVM Maintenance mode.


The error that u are getting is due to the fact that u have those lvol files created.

the /stand/ioconfig file is intact but the /etc/ioconfig is not valid.

u will need to recreate but do not worry fpr that

first boot the system in LVM Maintenance mode and tell me what u can see the system says.


Regards
Sujit

regards
Sujit
Torsten.
Acclaimed Contributor

Re: /dev/vg00 deleted - no mapfile

Do you know how to get into LVM Maintenance mode?

If not, tell us your server model (HP9000 or Integrity) and we can guide you ...

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

sorted - guys thanks you all for your help - I really appreciate it- probably wouldnt have got it back on my own

Bye

sujit kumar singh
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

Hi

congrats and great news friend... well done indeed ....

REgards
Sujit
TTr
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

> sorted - guys thanks you all for your help

If you don't mind, tell everybody what you did exactly to fix it. It is not clear that it was the LVM maintenance mode or a simple reboot to sync the ioconfig files.
Without a confirmed solution, this entire thread with all these great answers is totally useless.
sujit kumar singh
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

Hi freind,


This shall be great indeed if u can share waht actually went to solve the problem.


Reply awaited...

Regards
Sujit
sujit kumar singh
Honored Contributor

Re: /dev/vg00 deleted - no mapfile

hello

one correction : please in my earlier posts

#vgcfgrestore -l -n vg00
#vgcfgrestore -l -f /etc/lvmconf/vg00.conf

list the PVs that are the part of the VG vg00.

also booting in the LVM Maint mode u need to approcah this prob with the following steps.

when i LVM Maint Mode:


STEP1:
#vgcfgrestore -l -n vg00
or
#vgcfgrestore -l -f /etc/lvmconf/vg00.conf
to get the list of the PVs that are the part of the root VG named vg00.

Follow this by

STEP2:
#vgexport /dev/vg00
#mkdir /dev/vg00
#mknod /dev/vg00/group c 64 0x000000
#vgimport /dev/vg00 ....
#vgchange -a y vg00
#vgcfgbackup vg00
#lvlnboot -R
#lvlnboot -v

Perform a normal reboot:

#shutdown -ry 00

ur system shud comeup normally

Regard
Sujit
James R. Ferguson
Acclaimed Contributor

Re: /dev/vg00 deleted - no mapfile

Hi:

@Sujit: This shall be great indeed if u can share waht actually went to solve the problem.

You're not adding anything but spam and a hunt for points. TTr already asked for this, in fact, after you congratulated the OP for his/her closure: "congrats and great news friend... well done indeed ...."

By the way, "u" is an English letter. "You" is the English pronoun.

...JRF...