LVM and VxVM

how to recover a VG with its devices files lost?

 
SOLVED
Go to solution
stephen peng
Valued Contributor

how to recover a VG with its devices files lost?

dear all,
I've got network issue to cause MC ServiceGuard halted and server rebooted, after it's reboot,a package could not startup cause it could not mount a specific filesystem.one VG configured in the package lost its device files for no reason including lv* and rlv*(just one lv in that vg), vg's configuration on other server was not a correct copy. there was no map file backup for this vg, how could I achive to recover this vg?

thanks a lot!
12 REPLIES 12
Kapil Jha
Honored Contributor

Re: how to recover a VG with its devices files lost?

Do you have old lvmtab file, you can check the disk from lvmtab

else
restore the volume configuration from
/etc/lvmconf directory.

man vgcfgrestore
for more information.

What HPUX and service guard?

BR,
Kapil+

I am in this small bowl, I wane see the real world......
rariasn
Honored Contributor

Re: how to recover a VG with its devices files lost?

Hi Stephen:

Restore files /dev/vglost/* from backup.

Rgs,
Elmar P. Kolkman
Honored Contributor

Re: how to recover a VG with its devices files lost?

Or do a vgscan to find out which disks belong together in a VG and then do an import on the disks that most likely hold the VG you are missing. The only thing, before doing the vgimport, you have to do, is make sure that those disks are not in use by an active cluster package.
Every problem has at least one solution. Only some solutions are harder to find.
Elmar P. Kolkman
Honored Contributor

Re: how to recover a VG with its devices files lost?

(That, of course, only works if you have the device files for all disks... If not, do an ioscan -fnC disk, followed by insf (no options!))
Every problem has at least one solution. Only some solutions are harder to find.
stephen peng
Valued Contributor

Re: how to recover a VG with its devices files lost?

the VG was there, only that it missed its lv related device files.
Viktor Balogh
Honored Contributor

Re: how to recover a VG with its devices files lost?

>the VG was there, only that it missed its lv related device files.

try to activate the VG and see if those LV devices will get created.
****
Unix operates with beer.
stephen peng
Valued Contributor

Re: how to recover a VG with its devices files lost?

it is not an option to create lv device files by activating vg
Viktor Balogh
Honored Contributor
Solution

Re: how to recover a VG with its devices files lost?

So, this was happened on the node on which the vg in question is deactivated? take a map file with "vgexport -s -p -m vgname.map vgname" and re-import it on this node.
****
Unix operates with beer.
chris huys_4
Honored Contributor

Re: how to recover a VG with its devices files lost?

Hi Stephen,

So you're saying that a vgdisplay -v /dev/ still shows the logical volume with the "disappeared for no reason" /dev/lv* and /dev/rlv* device files ?

Like victor says, vgexport/vgimport would be the proper way to get the device files back, without specifying a mapfile as a backup seems also not have been taken, so afterwards you will need to rename the device files again that dont have a "standard" lvol* name.

If you have a ll output of the /dev/ directory in question, which a good sysadmin should have ;) , you can also manually mknod the device files back into existence, preserving the minor and major with which the originally /dev/lv* /dev/rlv* were created.

Greetz,
Chris