Operating System - HP-UX
1826230 Members
4574 Online
109692 Solutions
New Discussion

/etc/lvmtab incorrect on cluster node after vgimport

 
SOLVED
Go to solution
Ross W
Advisor

/etc/lvmtab incorrect on cluster node after vgimport

Hi,

I have added a new PV to vg01 on node1 in a high availability cluster. Then I extended a logical volume and filesystem to use this space.

I exported the volume group information:
node1
vgexport -v -p -s -m /tmp/vg01.map vg01

node2
vgexport vg01
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgimport -v -s -m /tmp/vg01.map vg01

But now the /etc/lvmtab file does not reflect the changes that were made and does not include the additional physical volumes.

When I do a vgscan -p it does not see the physical volumes and comes up with;

Couldn't stat physical volume "/dev/dsk/c19t3d0":
Invalid argument

I am assuming this happens because the volume group is active on node1.

How can I fix the lvmtab file to add the additional disks.

Thanks
Ross
10 REPLIES 10
Sridhar Bhaskarla
Honored Contributor

Re: /etc/lvmtab incorrect on cluster node after vgimport

Hi Ross,

Do you see the new disks on the failover server?. Do 'ioscan' and 'diskinfo' show them up correctly?.

Your -s option should have picked up all the physical volumes per VGID. To find out if this disk is really a PV link, do the following.

1. On the primary server, pick up any disk in vg01 and run
echo 0x2010?2X|adb /dev/dsk/cxtydz |awk '{print $3}'

2. On the failover box, and the corresponding disk do the same.

Both the values should match. If not, then that disk is not really the same disk that you are seeing on the primary server.

Another way of importing the VG is to use "-f" option. On the primary server do

#vgexport -p -v -m /tmp/vg01.map -f /tmp/vg01.disk vg01

copy vg01.map and vg01.disk to the failover server. Create the directory and group files. Edit vg01.disk and replace cx with the corresponding controllers on the failover server.

#vgimport -v -m /tmp/vg01.map -f /tmp/vg01.disk vg01

This should be much faster than "-s" option and you should not see any errors. If so, then there is a LUN misconfiguration and is to be fixed.


-Sri


You may be disappointed if you fail, but you are doomed if you don't try
Ross W
Advisor

Re: /etc/lvmtab incorrect on cluster node after vgimport

Hi,
I have tried using the -f option instead of the -s option. Now when I run the vgimport command I get the error
vgimport: Physical volume "/dev/dsk/c19t3d0" is not a block special file.

When I run the suggested command echo 0x2010?2X|adb /dev/dsk/c19t3d0 |awk '{print $3}' I get the following output.
node1
3D882674
node2
`/dev/dsk/c19t3d0'

not

It looks like I have to add a physical volume. Normally I would use pvcreate, do you use the same command for a cluster?

Thanks
Ross
Sridhar Bhaskarla
Honored Contributor
Solution

Re: /etc/lvmtab incorrect on cluster node after vgimport

Hi Ross,

*DO NOT* pvcreate it on the failover box. You already did it on the primary server and all you have to do is to import the volume group with the disks.

This tells me that the disk c19t13d0 that you are seeing on the failover server is not as same as the one you are seeing on the primary server.

What does your 'diskinfo /dev/rdsk/c19t3d0' say?

You may have to check up with your Storage people to see if they correctly configured this LUN for the failover box.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try

Re: /etc/lvmtab incorrect on cluster node after vgimport

node2 diskinfo /dev/rdsk/c19t3d0
diskinfo: can't open /dev/rdsk/c19t3d0: No such file or directory

node1
diskinfo /dev/rdsk/c19t3d0
SCSI describe of /dev/rdsk/c19t3d0:
vendor: HP
product id: A6188A
type: direct access
size: 31457280 Kbytes
bytes per sector: 512

Sridhar Bhaskarla
Honored Contributor

Re: /etc/lvmtab incorrect on cluster node after vgimport

Hi Ross,

Your previous ( as Reach Managed Service??) message indicates that you are not seeing the disk that you are seeing on node1.

How are the disks connected to the system?. What array are you using?. You will need to make sure that the same disk is visible to both the servers.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Animesh Chakraborty
Honored Contributor

Re: /etc/lvmtab incorrect on cluster node after vgimport

Hi Ross,
There is nothing wrong in your steps.
make sure that you can see the disk on your failover node.The device file may not be the SAME i.e. c19t3d0 on 2nd node.
is your minor number for group file is same as 1st node?
What storage are you using ?

Thanks
Animesh
Did you take a backup?
Lorenzo Facello
Valued Contributor

Re: /etc/lvmtab incorrect on cluster node after vgimport


Hi Ross,
Your commands are right.
Try only to specificate the special file of the disk when make the vgimport (dev/dsk/cxtxdx).
Try to repeat all the commands...I think is only this
Ross W
Advisor

Re: /etc/lvmtab incorrect on cluster node after vgimport

I could not see the special file for the disk device. So i ran the insf -e command, which created the special file and then redid the other commands for importing the volume group information. All looks OK. Thanks for all your help.
Ross W
Advisor

Re: /etc/lvmtab incorrect on cluster node after vgimport

I recreated the special file for the disk using the insf -e command.
Then when I vgimport ed it worked find

Thanks for your help
Ross
Ross W
Advisor

Re: /etc/lvmtab incorrect on cluster node after vgimport

complete