Operating System - HP-UX
1847840 Members
4724 Online
104021 Solutions
New Discussion

Re: Discrepency between ioscan and lvmtab causing issue

 
WSS
Frequent Advisor

Discrepency between ioscan and lvmtab causing issue


Hi Everyone,

I just tried to import a volume group map file onto our disaster recovery server and it gave me the following output -

root@udox305# vgimport -s -v -m /home/trevm/dr/vgclwss.map /dev/vgclwss
Beginning the import process on Volume Group "/dev/vgclwss". vgimport: The physical volume "/dev/dsk/c4t3d1" is already recorded in the "/etc /lvmtab" file.

I didnt think this was possible becuase this is my ioscan for the EMC disks for that server -

disk 3 0/3/2/0.99.40.19.0.0.0 sdisk CLAIMED DEVICE EMC SYMMETRIX
/dev/dsk/c4t0d0 /dev/rdsk/c4t0d0

disk 4 0/3/2/0.99.40.19.0.0.1 sdisk CLAIMED DEVICE EMC SYMMETRIX
/dev/dsk/c4t0d1 /dev/rdsk/c4t0d1

disk 5 0/3/2/0.99.40.19.0.0.3 sdisk CLAIMED DEVICE EMC SYMMETRIX
/dev/dsk/c4t0d3 /dev/rdsk/c4t0d3

disk 6 0/4/2/0.100.40.19.0.0.0 sdisk CLAIMED DEVICE EMC SYMMETRIX
/dev/dsk/c6t0d0 /dev/rdsk/c6t0d0

disk 7 0/4/2/0.100.40.19.0.0.1 sdisk CLAIMED DEVICE EMC SYMMETRIX
/dev/dsk/c6t0d1 /dev/rdsk/c6t0d1

disk 8 0/4/2/0.100.40.19.0.0.3 sdisk CLAIMED DEVICE EMC SYMMETRIX
/dev/dsk/c6t0d3 /dev/rdsk/c6t0d3

BUT .. This is the problem. My current /etc/lvmtab has the following entries

# strings /etc/lvmtab
/dev/vg00
B]f?
/dev/dsk/c2t1d0s2
/dev/dsk/c3t0d0s2
/dev/vgcl
/dev/dsk/c4t3d3
/dev/dsk/c5t3d3
/dev/vgapp
/dev/dsk/c4t3d1
/dev/dsk/c5t3d1

I thought the the lvmtab entries would have to match the ioscan entries.

Help, I'm confused!!!
Thanks in advance
14 REPLIES 14
Geoff Wild
Honored Contributor

Re: Discrepency between ioscan and lvmtab causing issue

If c4t3d1 doesn't show up in an ioscan - it means it was removed from the server - but not exported from the lvmtab.

Can you do a
vgdisplay -v vgapp

If it is not active, and you don't need it, you can just vgexport it

vgexport /dev/vgapp

But first, do a:

diskinfo /dev/rdsk/c4t3d1
diskinfo /dev/rdsk/c5t3d1

Anything?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Kent Ostby
Honored Contributor

Re: Discrepency between ioscan and lvmtab causing issue

Also do:

strings /etc/lvmtab > afile

This may show you an old VG or show you where that disk used to be a part of an old vg.

Use vgreduce -f to remove it from the old VG that it used to be a part of.

Or if that entire VG is no longer on the box then just vgexport the old VG
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
AshishJain_USA
Frequent Advisor

Re: Discrepency between ioscan and lvmtab causing issue

Hi

You can have more Physical Volumes listed in IOSCAN than the entries in /etc/lvmtab. Since you are trying to import the VG on the DR server, I guess that the VG /dev/vgapp is not in use. So you just need to run

# vgchange -a n /dev/vgapp
# vgexport /dev/vgapp

You may now import the VG

Thanx
Ashish
Sivakumar TS
Honored Contributor

Re: Discrepency between ioscan and lvmtab causing issue


Hi,

you can move the lvmtab file to some other name.

and run

#vgscan

This will scan the PVs and create a new lvmtab

Regards,

Siva.
Nothing is Impossible !
Senthil Kumar .A_1
Honored Contributor

Re: Discrepency between ioscan and lvmtab causing issue

Hi,

Check vgdisplay -v vgapp. If it does not exist anymore I had say siva's response is lot easier.

Just move the current /etc/lvmtab to a different lcation and run
vgscan -a -v

Now you can go ahead and vgimport.


Regards,
Senthil
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Mridul Shrivastava
Honored Contributor

Re: Discrepency between ioscan and lvmtab causing issue

vgcl is not really using c4t3d3 then just run
#lvdisplay -k /dev/vgcl/lvname (for each lv on vgcl)
this will give u key no. for this c4t3d0. so first reduce all the lvs using the key then run
# vgreduce -f vgcl /dev/dsk/c4t3d3
then u can try importing it.
if any storage is not connected to server then u can go ahead with moving lvmtab & vgsca -av, else vgscan will take long time and will add alternate links also to existing vgs.
Time has a wonderful way of weeding out the trivial
LoC_1
Frequent Advisor

Re: Discrepency between ioscan and lvmtab causing issue

The first thing the you need to do is to verifiy yourvolume group vgapp.

If vgapp is still an active volume group and ist has /dev/dsk/c4t3d1 part of it then you probably have the wrong disk when trying to import.

You DO NOT want to do a vgscan as it may mees up you /etc/lvmtab more than it is ,deping what is active at the time.
Use vgscan as a last resort when all else fail.

1 _determine vgapp and what disk belong to it. If dev/dsk/c4t3d1 then your trying to import the wrong disk
If its an old volume that you are not using then the proper way to get rid of it is to vgexport vgapps. Thats cleans /etc/lvmtab and also get rid of /dev/vgapp
If ist a current vg and dev/dsk/c4t3d1 is no longer part of it vgreduce -f vgapp should get rid of it as long as there are still not any extend belonging to any lvol in vgapps

After that you shoud be able to import the required vg with its propper disk.


Louis
WSS
Frequent Advisor

Re: Discrepency between ioscan and lvmtab causing issue


Ok, all good advice, but don't think it's going to help me as we run the /dev/vgapp volume group on both servers, poiting at completely separate disks...

Can someone please explain that the differences in ioscan compared to /etc/lvmtab??

I would expect that the volume groups in lvmtab would be made up of the disks available in ioscan, but they are completely differnet addresses.....

Thanks
WSS
Frequent Advisor

Re: Discrepency between ioscan and lvmtab causing issue


It's looking more and more like I actually may have to do a vgscan and recreate the lvmtab. I am still looking into this tho.

We (well the client) also run powerpath software, so it's possible that maybe it's an issue with this?

Thanks alot
AshishJain_USA
Frequent Advisor

Re: Discrepency between ioscan and lvmtab causing issue

Ok, the answers to yr queries are

You can have /dev/vgapp on both your production and DR Servers at the same time, pointing to different disks.

Differences in lvmtab & ioscan : IOSCAN shows the devices that are available and can be used on the system whereas lvmtab will show the devices that you would be actually using ( e.g. you may have 10 disks on your system but you may be using only 6 of those, so the lvmtab will have entries for 6 disks only whereas ioscan will show 10 entries ).
You are absolutely right that the VGs in lvmtab would be made up of the disks available in ioscan. However, there can be scenarios where the device diles for a given physical volume may change.

You may run vgscan but you have to first do a vgexport to make sure that the system does not report the disk as being in use.

rgds..Ashish
Andrew Rutter
Honored Contributor

Re: Discrepency between ioscan and lvmtab causing issue

hi,

I had a similar thing the other day, i couldnt export the vg to remove it, the system thought that there was still lv's attached to it, and the vgs were in the lvmtab.

The only way round it for me was to copy the backup of the lvmtab file back in place, then carry on from there.

Check to see if you have a backup lvmtab file

/etc/lvmtab.old

if so do strings on this file and compare them.

this is before you have to do a vgscan

The disk in the lvmtab should match those in use for the vg's

Check the disks shown in ioscan with pvdisplay to see where they are been used.

Andy
WSS
Frequent Advisor

Re: Discrepency between ioscan and lvmtab causing issue


I needed to do a vgscan -v after moving the lvmtab to lvmtab.old. This replaced the entries that were in lvmtab, with the correct ones from iocan.

I am still not clear as to how the entries in lvmtab can be different to what ioscan is reporting....

Regards
Senthil Kumar .A_1
Honored Contributor

Re: Discrepency between ioscan and lvmtab causing issue

Hi WSS,

Before we do a Post-mortem(Autopsy), Just one concern, Is your problem solved.

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
WSS
Frequent Advisor

Re: Discrepency between ioscan and lvmtab causing issue


Yes problem solved now, but still unsure about the old entries in lvmtab (See above post from me)...