Operating System - HP-UX
1833471 Members
2751 Online
110052 Solutions
New Discussion

Cannot Add alternate PV to a VG

 
Tuck Lee
Frequent Advisor

Cannot Add alternate PV to a VG

I am using HPUX 11.31. I am create a VG using a pri PV and a alt PV. Successfully cretaed the VG with the PRI PV but cannot extend the alt PV. Pls see below and advise how I can resolve this;

-- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 32
Cur PV 1
Act PV 1
Max PE per PV 3236
VGDA 2
PE Size (Mbytes) 8
Total PE 3236
Alloc PE 0
Free PE 3236
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 809g
VG Max Extents 103552


--- Physical volumes ---
PV Name /dev/dsk/c13t0d3
PV Status available
Total PE 3236
Free PE 3236
Autoswitch On
Proactive Polling On



root@sinsx046 [/dev]
# strings /etc/lvmtab
/dev/vg00
/dev/disk/disk59_p2
/dev/vg01
/dev/dsk/c13t0d3

root@sinsx046 [/dev]
# vgextend /dev/vg01 /dev/dsk/c19t0d3
Verification of unique LVM disk id on each disk in the volume group
/dev/vg01 failed.
Following are the sets of disks having identical LVM disk id
/dev/dsk/c13t0d3 /dev/dsk/c19t0d3
36 REPLIES 36
Torsten.
Acclaimed Contributor

Re: Cannot Add alternate PV to a VG

No idea about the reason for this, but it is always better to use the new device files, e.g. /dev/disk/disk7

# ioscan -m dsf

to find it.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
AnthonySN
Respected Contributor

Re: Cannot Add alternate PV to a VG

can you do a diskinfo on the disk
/dev/dsk/c19t0d3
else do a pvcreate
SoorajCleris
Honored Contributor

Re: Cannot Add alternate PV to a VG

Hi,

Is there a possibility to run a vgscan command ?

Else you can try to export and import the VG

Regards,
Sooraj

"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
SoorajCleris
Honored Contributor

Re: Cannot Add alternate PV to a VG

SASJ ==> else do a pvcreate


You are recommending to do a pvcreate on alternate link!!! Do you know that it will distroy existing LVM information ???

Regards
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Tuck Lee
Frequent Advisor

Re: Cannot Add alternate PV to a VG

I have done the pvcreate for the PRI PV. if I do it for the alternate PV it will destroy the PRI PV correct?
Torsten.
Acclaimed Contributor

Re: Cannot Add alternate PV to a VG

Yes. pvcreate will delete your data (structure) on disk.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Tuck Lee
Frequent Advisor

Re: Cannot Add alternate PV to a VG

I tried using the /dev/dsk/disk66 got this error;
vgcreate -s 8 -p 32 vg02 /dev/dsk/disk66
vgcreate: Physical volume "/dev/dsk/disk66" is not a block special file.
Usage:
For creating version 1.0 volume group,
vgcreate
[-V 1.0]
[-f]
[-A Autobackup]
[-x Extensibility]
[-e MaxPhysicalExtents]
[-l MaxLogicalVolumes]
[-p MaxPhysicalVolumes]
[-s PhysicalExtentSize]
[-g PhysicalVolumeGroupName]
VolumeGroupName PhysicalVolumePath ...

For creating version 2.x volume group,
vgcreate -V Version -S VolumeGroupSize -s PhysicalExtentSize
[-A Autobackup]
[-x Extensibility]
[-g PhysicalVolumeGroupName]
VolumeGroupName PhysicalVolumePath ...

For volume group version 2.x,
vgcreate -V Version -E
{-S VolumeGroupSize |
-s PhysicalExtentSize}

Note: The "-f" option is not available for volume group version 2.0 or higher.
"PhysicalVolumePath": must be a block special file.
Raj Briden
Frequent Advisor

Re: Cannot Add alternate PV to a VG

* do #diskinfo on both the link.

#diskinfo /dev/dsk/c13t0d3
#diskinfo /dev/dsk/c19t0d3



* Unmount all the filesystems that belong to .


Deactivate the volume group:

#vgchange -a n /dev/

* Activate the VG:

#vgchange -a y

* If it will activate, mount the filesystems and start the database.

* Add the alternate link:

#vgextend /dev/ /dev/dsk/c19t0d3

* Unmount all the filesystems that belong to .


Deactivate the volume group:

#vgchange -a n /dev/

* Activate the VG:

#vgchange -a y

* If it will activate, mount the filesystems

* Add the alternate link:

#vgextend /dev/ /dev/dsk/c19t0d3
Tuck Lee
Frequent Advisor

Re: Cannot Add alternate PV to a VG

I tried this method you suggested but no results, I even do vgchange -c n /dev/vg01 just to make sure I remove the HA totally and then vgchange -a y /dev/vg01.
AnthonySN
Respected Contributor

Re: Cannot Add alternate PV to a VG

Hi Sooraj.
>>You are recommending to do a pvcreate on alternate link!!! Do you know that it will distroy existing LVM information ???

if you see the question it says
cannot add alt PV not alt link to the VG.

AnthonySN
Respected Contributor

Re: Cannot Add alternate PV to a VG

in his question he has written
Following are the sets of disks having identical LVM disk id
/dev/dsk/c13t0d3 /dev/dsk/c19t0d3

which ofcourse indicates its an alt link.

im sorry for overlooking the same.
Benoy Daniel
Trusted Contributor

Re: Cannot Add alternate PV to a VG

convert the disk layout to agile view using vgdsf. This can be done online..
Tuck Lee
Frequent Advisor

Re: Cannot Add alternate PV to a VG

Done it! I still cannot perform vgextend?

# vgdisplay -v /dev/vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 32
Cur PV 1
Act PV 1
Max PE per PV 3236
VGDA 2
PE Size (Mbytes) 8
Total PE 3236
Alloc PE 0
Free PE 3236
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 809g
VG Max Extents 103552


--- Physical volumes ---
PV Name /dev/disk/disk65
PV Status available
Total PE 3236
Free PE 3236
Autoswitch On
Proactive Polling On
TTr
Honored Contributor

Re: Cannot Add alternate PV to a VG

First see if you need to apply any LVM patches to your server. The vgextend command sees that it is the same disk but does not see it as an alternate path.

Second, try exporting the existing volume group and the import the volume group using both disk paths in the same command. This is not destructive but having a backup of your data is a good idea. And you have to unmount the volume(s) before exporting the disk. But if there is a bug in LVM you will probably get the same or similar error.
Benoy Daniel
Trusted Contributor

Re: Cannot Add alternate PV to a VG

You dont need to do vgextend.. you can check if lun path is online using

ioscan -P health -C lunpath. also see using
ioscan -m dsf /dev/disk/disk65 that will show both paths.
Tuck Lee
Frequent Advisor

Re: Cannot Add alternate PV to a VG

I see this from the command? Single path

# ioscan -m dsf /dev/disk/disk65
Persistent DSF Legacy DSF(s)
========================================
/dev/disk/disk65 /dev/dsk/c13t0d3

#ioscan -P health -C

what is lunpath?
Benoy Daniel
Trusted Contributor

Re: Cannot Add alternate PV to a VG

Looks like you have issue with 2nd path. try to do an ioscan and see 2nd path is visible..
Tuck Lee
Frequent Advisor

Re: Cannot Add alternate PV to a VG

When I do a ioscan I have both device Claimed and using syminq(symmetrix) command I have both the device present? When i do powermt all my links are optimal?

If no more solution , I will recreate the Lun again from scratch!!
Raj Briden
Frequent Advisor

Re: Cannot Add alternate PV to a VG

first of all.. are you doing vgextend on alternate LINK or alternate DISK?

The problem occurred because LVM found two disks with the same PVID. This is impossible unless the LUNs are
alternate links.This is why the error "Verification of unique
LVM disk id on each disk in the volume group.

Tuck Lee
Frequent Advisor

Re: Cannot Add alternate PV to a VG

I am doing a vgextend for alt links
Raj Briden
Frequent Advisor

Re: Cannot Add alternate PV to a VG

alternate method.

export the VG and import with alternate link details.

check man page for

#vgchange
#vgexport
#vgimport
SoorajCleris
Honored Contributor

Re: Cannot Add alternate PV to a VG

Take lvmtab backup

do a vgscan

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Kapil Jha
Honored Contributor

Re: Cannot Add alternate PV to a VG

First thing you have power path installed so you should not worry about anything cause power path handles the multi path.

your lvmtab has
vg00 >>> diskXX
vg01 >>> cXdXtX

I think you should change it to dsf name
by

/usr/contrib/bin/vgdsf â c

Read the below document carefully.

http://docs.hp.com/en/LVMmigration1/LVM_Migration_to_Agile.pdf

Do you have lvmtab_p??

BR,
Kapil+
I am in this small bowl, I wane see the real world......
RC Park
Frequent Advisor

Re: Cannot Add alternate PV to a VG

Hi Tuck! I don't know, maybe I missed something here, but maybe not... Looks like you accidentally crossed the two naming conventions, and that is all that is going on; I'm guessing if you try again with the correct device name you'll have more success:

You have above:
I tried using the /dev/dsk/disk66 got this error;
vgcreate -s 8 -p 32 vg02 /dev/dsk/disk66
vgcreate: Physical volume "/dev/dsk/disk66" is not a block special file

TRY THIS:
vgcreate -s 8 -p 32 vg02 /dev/disk/disk66

and you'll likely have more success.

There's several HP documents on the subject, but I've attached one that should help explain this all perfectly. Here's a simple note from that document:

Typical legacy and persistent DSFs for a LUN are shown below:
Legacy DSF: /dev/dsk/c8t1d3 and /dev/rdsk/c8t1d3 Persistent DSF: /dev/disk/disk66 and /dev/rdisk/disk66

Let us know if this helps, and don't forget to assign points :)

RCP