Operating System - HP-UX
1827612 Members
3091 Online
109966 Solutions
New Discussion

Disks missing from /etc/lvmtab

 
SOLVED
Go to solution
WSS
Frequent Advisor

Disks missing from /etc/lvmtab


Hi All,

I have some disks missing from /etc/lvmtab and need to get them back in there via vgextend etc, but wanted your advice on the best way to do it - This is the output from strings /etc/lvmtab -

root@ugos388# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t1d0s2
/dev/dsk/c3t0d0s2
/dev/vgapp
/dev/dsk/c4t0d1
/dev/dsk/c8t0d1
/dev/vgclwss
/dev/dsk/c4t0d3
/dev/dsk/c4t0d4
/dev/dsk/c4t0d5
/dev/dsk/c4t0d6
/dev/vgclord
/dev/dsk/c4t0d7
/dev/dsk/c8t0d7
root@ugos388#

The volume group /dev/vgclwss should have the alternate disks in the lvmtab, which should be /dev/dsk/c8 ...

Can someone tell me how to identify the 4 disks that need to be put into the /etc/lvmtab file and the syntax to do that.

Thanks alot
Trev
16 REPLIES 16
Ninad_1
Honored Contributor

Re: Disks missing from /etc/lvmtab

Hi,

When you say the alternate disks are missing - do you mean the disks shown in vgdisplay -v output as Alternate Link ?
Then they will not show in the lvmtab as they are just differnt path to same disk.
Regards,
Ninad
James R. Ferguson
Acclaimed Contributor

Re: Disks missing from /etc/lvmtab

Hi Trev:

First, one does not edit '/etc/lvmtab'. It is a binary file maintained by 'vgscan', 'vgextend', 'vgreduce', 'vgimport' and 'vgexport'.

If you want to add alternate links (pvlinks) to the volume group "/dev/vgclwss", use 'vgextend':

# vgextend /dev/vgclwss /dev/dsk/cXtYdZ

Regards!

...JRF...
HGN
Honored Contributor

Re: Disks missing from /etc/lvmtab

Hi

The alternate disks will not show up on the /etc/lvmtab file.

Rgds

HGN
Victor Fridyev
Honored Contributor
Solution

Re: Disks missing from /etc/lvmtab

Hi,

AFAIK, the simplest way to see alternate pth disks in /etc/lvmtab is to add the disks to volume group.

If the alternate path is dev/dsk/c8t0 , then the needed command is
vgextend /dev/vgclwss dev/dsk/c8t0d3 /dev/dsk/c8t0d4 /dev/dsk/c8t0d5 /dev/dsk/c8t0d6

HTH

Entities are not to be multiplied beyond necessity - RTFM
Josiah Henline
Valued Contributor

Re: Disks missing from /etc/lvmtab

Both the primary link and the alternate link should be included in the VG and the lvmtab.

If you are not sure and are not on a clustered system, you could do the following steps:

mv /etc/lvmtab /etc/lvmtab.bak
vgscan -v # This will take awhile to run
strings /etc/lvmtab
#You should see the pvlinks in the vgdisplay and the lvmtab
vgchange -a y /dev/vgclwss
vgdisplay -v /dev/vgclwss

If you have a way to find out which devices are suppose to be the alternate links, you can simply vgextend them into the VG.

vgextend /dev/vgclwss /dev/dsk/cXtXdX
If at first you don't succeed, read the man page.
Ninad_1
Honored Contributor

Re: Disks missing from /etc/lvmtab

WSS,

Sorry - the disks should be visible in /etc/lvmtab.
And you can add those disks using vgextend vgname disk1 disk2 ..
No points for my posts please.

Regards,
Ninad
Darrel Louis
Honored Contributor

Re: Disks missing from /etc/lvmtab

Hi,

Before using vgextend check with pvdisplay -v /dev/dsk/c8t?d? if the disk belongs to a Volume Group.

Darrel
Sivakumar TS
Honored Contributor

Re: Disks missing from /etc/lvmtab

Hi,

to rescan and recreate the /etc/lvmtab,

do move the existing lvmtab and rin #vgscan

Regards,

Siva.
Nothing is Impossible !
Enrico P.
Honored Contributor

Re: Disks missing from /etc/lvmtab

Hi,
if the commmand

vgdisplay -v /dev/vgclwss

not shows the Alternate Link disk, Es:

PV Name /dev/dsk/c6t3d4
PV Name /dev/dsk/c4t4d3 Alternate Link

You need to add them:

vgextend /dev/vgclwss /dev/dsk/c8t0d3 /dev/dsk/c8t0d4 /dev/dsk/c8t0d5 /dev/dsk/c8t0d6

and

strings /etc/lvmtab should to show them

If the vgdisplay show them and lvmtan not show them, you need to run the vgscan command:

mv /etc/lvmtab /etc/lvmtab.old
vgscan -a -v -p (preview)
then
vgscan -a -v

Enrico
Arunkumar.B
Trusted Contributor

Re: Disks missing from /etc/lvmtab

HI,

Automatically the links will not disappear.Pls check the root cause of that...
For bringing the links its not a matter.u can issue vgextend..Is there any errors in the syslog regarding the missing links..

Cheers
Arunkumar.B
Necessity breaks iron
Sandman!
Honored Contributor

Re: Disks missing from /etc/lvmtab

Could you post the output of ioscan...

# ioscan -fnC disk

Were the alternate links present in /etc/lvmtab? If that's the case then the easiest way to recover them is by doing a vgchange i.e.

# vgchange -a y vgclwss

See vgchange(1M) for details.
rariasn
Honored Contributor

Re: Disks missing from /etc/lvmtab

Hi Trev,

Verify than diskc c7t0d[3-6], are presents in "vgclwss":

# vgdisplay -v vgclwss

--> Act PV ?
--> Physical volumes ---
PV Names ?

rgs,

ran
BPatrick
Trusted Contributor

Re: Disks missing from /etc/lvmtab

Trev,
Copy the lvmtab to some safe location and then do a vgscan
vgscan -a -v
this will recreate the lvmtab file
Sp4admin
Trusted Contributor

Re: Disks missing from /etc/lvmtab

vgdipslay -v vgXX should show the pv links. then vgextend dev/vgXX /dev/dsk/c#t#d#. do a strings on /etc/lvmtab and you should the the pv link.
Mridul Shrivastava
Honored Contributor

Re: Disks missing from /etc/lvmtab

If a storage is connected to the server then its not recommended to execute vgscan -a -v as it will add device files to other vgs also and u may get confused so better way to add alternate disk is to do it manually. you know the device file names so execute vgextend command for each pv that will be added as alternate link.
If you want to do load sharing and change the prmiary link for different pvs then after extending it to alternate link execute vgreduce command on primarly link so the next link will become primary link. Later on add other link also so that will become alternate. This is helpful while planning for load sharing..
Time has a wonderful way of weeding out the trivial
WSS
Frequent Advisor

Re: Disks missing from /etc/lvmtab


Thanks for all responses guys, I have vgextend'ed the volume group and the disks are now seen in the strings /etc/lvmtab. Sorry it's taken a while to get back, but been a little hectic here.

For those that suggested doing a vgscan -a -v I didn't do this, as this can cause more problems than is already there!! You need to be VERY careful when running vgscan it's a very powerful command

James - I never said I was going to 'edit' the /etc/lvmtab file, I know you can't do that, I said I was going to use vgextend to add the disks

All people that suggested searching for the correct disks and using vgextend to add them I have assigned points.

In Summary -

I did this (for each disk that should be in /dev/vgclwss)

# ioscan -fnC disk | grep c8t0d3 (d4, d5 & d6)
# vgextend /dev/vgclwss /dev/dsk/c8t0d3 (d4, d5 & d6)

And this is now my strings /etc/lvmtab output -

# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t1d0s2
/dev/dsk/c3t0d0s2
/dev/vgapp
/dev/dsk/c4t0d1
/dev/dsk/c8t0d1
/dev/vgclwss
/dev/dsk/c4t0d3
/dev/dsk/c4t0d4
/dev/dsk/c4t0d5
/dev/dsk/c4t0d6
/dev/dsk/c8t0d3
/dev/dsk/c8t0d4
/dev/dsk/c8t0d5
/dev/dsk/c8t0d6
/dev/vgclord
/dev/dsk/c4t0d7
/dev/dsk/c8t0d7


Thanks all.
Trev