System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to see volume groups and lvol's on system

 
SOLVED
Go to solution

Unable to see volume groups and lvol's on system

Problem: We received a Itanium RX4640 system with HP-UX 11i v2. We have an existing RX4640 with HP-UX 11i v2. I went to restore a file (/etc/profile) to the new system and I only checked the folder etc and chose "overwrite" and after it started restoring the directory /etc I killed the restore. The restore looks like it wiped out my drive configuration. I have rebooted the machine and my VG00 volume is mounted. When I go into SAM and look at the drives it shows all drives as "unused" and with no volume groups or logical volumes. Is there a way to get my missing volume groups back? Since this was a new system I do not have a backup of it (I know that was a mistake). Can anyone help?
33 REPLIES
Suraj K Sankari
Honored Contributor

Re: Unable to see volume groups and lvol's on system

Hi,
Not able to understand your question.

>>I went to restore a file (/etc/profile) to the new system and I only checked the folder etc and chose "overwrite" and after it started restoring the directory /etc I killed the restore.

if you restore only one file /etc/profile then what you killed?

Suraj

Re: Unable to see volume groups and lvol's on system

>I went to restore a file (/etc/profile)

What software were you using?

>Suraj: if you restore only one file /etc/profile then what you killed?

That was the mistake, Darrell did all of /etc/, until it was killed.

Re: Unable to see volume groups and lvol's on system

I was using Data Protector to restore from one system to another. I mean to select just the "profile" file and not the whole /etc directory.

Re: Unable to see volume groups and lvol's on system

If it helps, it appears that the /etc/lvmconf directory is in tact as well as /etc/fstab.
S.N.S
Valued Contributor

Re: Unable to see volume groups and lvol's on system

Hi Darrell

May be vgdisplay -v VG00 will give a start...

HTH
SNS
"Genius is 1% inspiration, 99% Perspiration" - Edison

Re: Unable to see volume groups and lvol's on system

When I issue the vgdisplay command I get "couldn't query volume group vg00. Possible problem in the volume group minor number. Please check and make sure the group minor number is correct. How do I check to see what the group minor number is?

Re: Unable to see volume groups and lvol's on system

If your /etc/lvmconf is indeed intact, you will most likely have some shared mapfiles that will allow you to vgimport your missing volume groups. If you look at your fstab, you should be able to get a good idea of what volume groups were present before your restore. You'll need to create the directory and group node (/dev/vgxxxx/group) and import using the shared mapfiles in /etc/lvmconf.

Hope this helps,

Bruce
Vijaykumar_1
Valued Contributor

Re: Unable to see volume groups and lvol's on system

As your lvmconf entries are overwritten/wiped, you can always create the configuration file using vgcfgbackup.

#vgcfgbackup vg00

But in this scenario, vg00 seems to have an issue.so im not sure it will work.But have a try ...

And also to the final query about minor numbers
/dev/vg** is the directory that can provide the required info.
Bill Hassell
Honored Contributor
Solution

Re: Unable to see volume groups and lvol's on system

You can possibly get back the VGs using vgscan but that is only a small part of your problems. The /etc directory contains many files that are critical to the machine but are not portable. Do you have a recent backup of the existing RX4640? If not, you will have to spend a lot of time finding and fixing the overlaid files.

Since lvmtab was overlaid, it must be reconstructed. Normally you would save the old lvmtab but since it is corrupted (overlaid by another system), just remove it and run vgscan:

rm /etc/lvmtab
vgscan -av

Now files in /etc such as fstab, hosts, syslog.conf, inetd.conf, services, resolv.conf, nsswitch.conf, pam* and so on may need to be verified. Use the Data Protector logs to see what was actually overlaid.



Bill Hassell, sysadmin

Re: Unable to see volume groups and lvol's on system

OK vgscan worked and I now have VG00 back. I had two other volume groups that I need to get back. VG01 and VG02. When I ran the vgscan command it told me to run the vgimport command. What switches do I need to use with the vgimport command? When I issue the vgimport command with no switches on /dev/vg01 and /dev/vg02 I get "Unable to read the physical volume". I did not have a backup. As I stated in my initial statement this is a new system and I know it was dumb to do anything without a backup. I wanted to get the system setup and then do a backup. This is a leason learned for me. Is there a way to get my VG01 and VG02 volume groups back?
Vijaykumar_1
Valued Contributor

Re: Unable to see volume groups and lvol's on system

Hello Darrel,

If you know the physical volume paths you can use them with the vgimport command

#vgimport -v /dev/vg01 >pvpath2>

If you have successfully created the lvmtab file with vgscan , then you can obtain the pvpaths from the lvmtab file.

Once vgimport succeeeds, activate the vg with

#vgchange -a y vg01

Hope this helps..

Re: Unable to see volume groups and lvol's on system

The vgimport command fails. I've attached a document with a screnshot of what is happening with the vgimport command.
Vijaykumar_1
Valued Contributor

Re: Unable to see volume groups and lvol's on system

Hello,

I could see that you have ran vgimport on an LV..instead that should be run on a disk

#vgimport -v /dev/vg01

Re: Unable to see volume groups and lvol's on system

I have successfully run the vgimport and vgchange commands but I still do not see the volume groups. Do I need to reboot the system now that those commands have run successfully?
Vijaykumar_1
Valued Contributor

Re: Unable to see volume groups and lvol's on system

No its not required. can u paste the o/p from

#strings /etc/lvmtab

#ls -l /etc/lvmconf*

Re: Unable to see volume groups and lvol's on system

Attached is a document with the output of the commands as requested. Thank you.
Vijaykumar_1
Valued Contributor

Re: Unable to see volume groups and lvol's on system

lvmtab has the entries of both vg01/vg02

/dev/vg01
/dev/dsk/c4t0d0
/dev/vg02
/dev/dsk/c4t1d0

Also the vg conf files are those of june and not recent..

-r-------- 1 root sys 61440 Jun 14 14:44 vg01.conf
-r-------- 1 root sys 61440 Jun 14 14:40 vg01.conf.old
-r-------- 1 root sys 61440 Jun 14 14:54 vg02.conf
-r-------- 1 root sys 61440 Jun 14 14:52 vg02.conf.old

So if activating VG succeeds, then then should be available.

If not,then there is an other option that you can try..since the vg01/vg02 conf files are existing you can restore the VG.

#vgcfgrestore -n /dev/vg01 /dev/dsk/c4t0d0

#vgcfgrestore -n /dev/vg02 /dev/dsk/c4t1d0

Re: Unable to see volume groups and lvol's on system

before you replied I had rebooted and VG01 is okay now but VG02 is still not visisble. When I issue the command vgcfgrestore for vg02 as you instructed I get the following message: vgcfgrestore: Cannot restore Physical Volume "/dev/dsk/c4t1d0", Detach the PV or deactivate the VG, before restoring the PV. How do I detach or deactivate VG02?

Re: Unable to see volume groups and lvol's on system

When I look in SAM under Logical Volumes the attached is what I get now. The ones highlighted in black I don't think belong there. Is it okay to remove them or should I wait until everything is okay with VG02?
Vijaykumar_1
Valued Contributor

Re: Unable to see volume groups and lvol's on system

The pv is not part of a mirror volume, so obviously you cannot detach. You can deactivate the VG using,

#vgchange -a n /dev/vg02

Let me know if you have any valid data on VG02..If not, then better delete and recreate :)

Re: Unable to see volume groups and lvol's on system

Yes, I have data on VG02. I would rather not have to recreate it but if I have no choice then I can recreate it. Attached is the output from the vgchange and vgcfgrestore commands.
Vijaykumar_1
Valued Contributor

Re: Unable to see volume groups and lvol's on system

Its not attached..

Re: Unable to see volume groups and lvol's on system

Sorry about that. Here it is.
Vijaykumar_1
Valued Contributor

Re: Unable to see volume groups and lvol's on system

You have to use the character device file along with vgcfgrestore..

#vgcfgrestore -n /dev/vg02 /dev/rdsk/c4t1d0

Also have a look at /etc/lvmconf/vg02.conf. This file should have the entry for /dev/rdsk/c4t1d0, for the command to succeed.