1833788 Members
2375 Online
110063 Solutions
New Discussion

VG issue

 
Rahul Khare
Occasional Advisor

VG issue

Hi,

We had recently restored the OS through ignite tap and are currently running into Volume group issues.

# vgscan -p -v
vgscan: The physical volume "/dev/dsk/c0t8d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c0t9d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c0t10d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c1t8d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c1t9d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c1t10d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c1t11d0" is already recorded in the "/etc/lvmtab" file.
Couldn't stat physical volume "/dev/dsk/c2t2d0":
Invalid argument

/dev/vg00
/dev/dsk/c0t8d0
/dev/dsk/c0t9d0
/dev/dsk/c0t10d0
/dev/dsk/c1t8d0
/dev/dsk/c1t9d0
/dev/dsk/c1t10d0

Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c0t11d0

Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c9t0d0
/dev/dsk/c9t1d0
/dev/dsk/c9t2d0
/dev/dsk/c9t3d0
/dev/dsk/c9t8d0
/dev/dsk/c9t9d0
/dev/dsk/c9t10d0

/dev/vg01
/dev/dsk/c1t11d0


vg00, vg01 are currently active on the system but vg10 is not.

# vgcfgrestore -n vg10 -l
Volume Group Configuration information in "/etc/lvmconf/vg10.conf"
VG Name /dev/vg10
---- Physical volumes : 7 ----
/dev/rdsk/c4t0d0 (Non-bootable)
/dev/rdsk/c4t1d0 (Non-bootable)
/dev/rdsk/c4t2d0 (Non-bootable)
/dev/rdsk/c4t3d0 (Non-bootable)
/dev/rdsk/c4t8d0 (Non-bootable)
/dev/rdsk/c4t9d0 (Non-bootable)
/dev/rdsk/c4t10d0 (Non-bootable)


Seems like the c4** disks are being available as c9** disks. I tried vgimport but everything seems to fail.

# vgimport -v /dev/vg10 /dev/dsk/c9t0d0 /dev/dsk/c9t1d0 /dev/dsk/c9t2d0 /dev/dsk/c9t3d0 /dev/dsk/c9t8d0 /dev/dsk/c9t9d0 /dev/dsk/c9t10d0

Beginning the import process on Volume Group "/dev/vg03".
Volume group "/dev/vg03" is still active.

# vgchange -a n vg10
vgchange: Volume group "/dev/vg10" does not exist in the "/etc/lvmtab" file.


Is there any way to update the vg10.mapfile, vg10.conf file in /etc/lvmconf and then begin importing this volume group?

Please help!!

Rahul.




14 REPLIES 14
Steven E. Protter
Exalted Contributor

Re: VG issue

Shalom Rahul,

cd /etc/
mv lvmtab lvmtab.old # backup

vgscan -p -v

That should clean up the lvmtab issue. Then the rest of this operation might go a bit more smoothly.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Mel Burslan
Honored Contributor

Re: VG issue

after doing what Steven suggested, i.e. re-creating the lvmtab using vgscan command, could you please post the output from command:

strings /etc/lvmtab

here, so that we can see what disk belongs to which volume group. After that, I am sure you will get more meaningful answers. From the data you have provided, I am having hard time understanding what happened when you restored the OS from the ignite image.

Did you restore the ignite tapes to the same system it was created from or onto another system ? Also, if it is the same system, was there any hardware changes (like replacement of cards, or addition of new equipment) made to this system ?
________________________________
UNIX because I majored in cryptology...
Rahul Khare
Occasional Advisor

Re: VG issue

I tried creating the lvmtab file couple of times:-

Here is the output

# strings lvmtab
/dev/vg00
mk_G
/dev/dsk/c0t8d0
/dev/dsk/c0t9d0
/dev/dsk/c0t10d0
/dev/dsk/c1t8d0
/dev/dsk/c1t9d0
/dev/dsk/c1t10d0
/dev/vg01
mk_>R1
/dev/dsk/c1t11d0


Seems like its not able to associate the devices c9** with vg10. Please suggest..

Thanks,
Rahul.
whiz_kid
Regular Advisor

Re: VG issue

do u hv a good backup of /etc/lvmtab before you did the vgscan ?

how r u maping the disks against the vgs?

do u have any information collected based on the wwn or serial number of these disks before all these happened?

or are u doing a guesswork and trying ?
whiz_kid
Regular Advisor

Re: VG issue

is this in a service guard setup ? (i see this qn under service guard section)
TTr
Honored Contributor

Re: VG issue

If I undestand you correctly, the controller paths may have changed during the ignite. You can edit the map file for vg10 and change the c4 to c9 and try reimpoting vg10.
Rahul Khare
Occasional Advisor

Re: VG issue

thanks for all of your suggestions. I tried most of the things but without luck. I am not able to change the device names in vg10.mapfile or /etc/lvmconf/vg10.conf files.

At this point it seems to be the issue with controller picking up wrong device ids. Could I import the metadata on the devices and try to create a new VG using the c9** devices?

Please suggest.

Thanks,
Rahul.
TTr
Honored Contributor

Re: VG issue

> Seems like the c4** disks are being
> available as c9** disks. I tried vgimport
> but everything seems to fail.

> # vgimport -
> v /dev/vg10 /dev/dsk/c9t0d0 /dev/dsk/c9t1d0 /dev/dsk/c9t2d0 /dev/dsk/c9t3d0 /dev/dsk/c9t8d0 /dev/dsk/c9t9d0 /dev/dsk/c9t10d0

> Beginning the import process on Volume
> Group "/dev/vg03".
> Volume group "/dev/vg03" is still active.
^^^^^^^^^
^^^^^^^^^
Why is vg03 showing up here? Do you have two VGs cross linked?

Check the group number for each VG and ensure they are unique.

ll /dev/vg*/group
Rahul Khare
Occasional Advisor

Re: VG issue

my mistake, I posted the output incorrectly, probably a typo.

There is no volume group with name vg03. It was actually vg10 only.

# vgimport -v /dev/vg10 /dev/dsk/c9t0d0 /dev/dsk/c9t1d0 /dev/dsk/c9t2d0 /dev/dsk/c9t3d0 /dev/dsk/c9t8d0 /dev/dsk/c9t9d0 /dev/dsk/c9t10d0

Beginning the import process on Volume Group "/dev/vg10".
Volume group "/dev/vg10" is still active.


Apologize for the above confusion..

Rahul.
TTr
Honored Contributor

Re: VG issue

1. Verify the correct device files in ioscan. The map file and the saved config file do not mean anything during a vgimport.

2. The error "vg10 is still active" indicates that the vg10 already exists when you try the vgimport. Probably a bad /etc/lvmtab. Try deleting /etc/lvmtab and vgscan to recreate it.

3. If the error persists after /etc/lvmtab is recreated, disocnnect the vg10 PVs and repeat deleting and recreating lvmtab. This way the vg10 PVs will not get vg-scanned.

4. If the lvmtab is recreated successfully, try importing the vg10 PVs again.

5. Try pvdisplay on one of the vg10 PVs. Do you see anything bad or is it normal? Do NOT run pvcreate on those PVs.
Rahul Khare
Occasional Advisor

Re: VG issue

tried your suggestion. After disconnecting the devices, they were not scanned in vgscan but still vg10 was showing as being "active".

Seems like its getting picked up irrespective of removing the lvmtab file.

Is there any way that I could mark this volume group to be de-active and then re-import the same?
whiz_kid
Regular Advisor

Re: VG issue

try this

vgexport -p -s -m vg10.map -f vg10.pvmap vg10

vgexport vg10

mkdir /dev/vg10
mknod /dev/vg10 group c 64 0xXX0000 (replace XX with suitable major value)

vgimport -s -m vg10.map vg10

post the output.
Ramesh S
Esteemed Contributor

Re: VG issue

Hi

Try this one also,

The most likely cause is a duplicate minor number in the group file. Check the group file also

# ll /dev/*/group

Thanks & Regards

Ramesh
TTr
Honored Contributor

Re: VG issue

I noticed in /etc/lvmtab, the vg00 has 3 PV that have target numbers t8, t9, t10 with dual paths c0 and c1. Might those be 3 of the 7 PVs of vg10 and that is why you can not restore vg10?

Go to /etc/lvmconf and post the output of
"strings vgXX.conf" for each vg. Preferably you should get an original vgXX.conf from the ignite tape because the current /etc/lvmconf is probably overwritten by ypur recent vgscan/vgimport attempts. To get an original copy of any folder or file from the ignite tape use

# mt -t /dev/rmt/0m rew
# mt -t /dev/rmt/0mn fsf 1 (must use "mn" here)
# cd /tmp
# tar xvf /dev/rmt/0mn etc/lvmconf