Operating System - HP-UX
1833780 Members
2448 Online
110063 Solutions
New Discussion

How to realize the same PVIDs wth different VGIDs or w/o ?

 
SOLVED
Go to solution
liuyl_it
Frequent Advisor

How to realize the same PVIDs wth different VGIDs or w/o ?

Anyone know Why hp-ux can allow the same PVIDs used with different VGIDs (or one has but the other w/o)?
For example, firstly dd one disk of a vg to another cloned disk,  then use vgchgid to make another new vg ....!!

5 REPLIES 5
liuyl_it
Frequent Advisor

Re: How to realize the same PVIDs wth different VGIDs or w/o ?

Still no one can answer my this question!?

Matti_Kurkela
Honored Contributor

Re: How to realize the same PVIDs wth different VGIDs or w/o ?

If your question is: "How to realize the same PVIDs with different VGIDs", then you seem to already know the answer: "For example, firstly dd one disk of a vg to another cloned disk,  then use vgchgid to make another new vg".

If your question is: "Why hp-ux can allow the same PVIDs used with different VGIDs", then I guess that the LVM designers at HP knew that disks may be copied with dd, and did not needlessly assume that PVIDs would be globally unique.

When you're doing something that requires HP-UX LVM to check the VGIDs and PVIDs (e.g. vgimport, vgextend, vgscan) of some PVs, it first checks the VGID. If it's the same, then those PVs belong to the same VG. If it's different, the PVs belong to different VGs and LVM does not need to care about the PVIDs at that point.

If the VGIDs are the same and the PVID are also the same, HP-UX LVM generally assumes that it's seeing multiple alternate paths to the same PV disk/LUN. In HP-UX 11.23 and older, this was the basic way to handle multipathing; for more advanced multipathing, you needed storage-vendor-specific add-on software. In HP-UX 11.31 with agile disk devices, the storage subsystem will handle the multipathing and only one agile device per disk/LUN is used by the LVM. For legacy compatibility reasons, 11.31 LVM can also handle multipathing the old way, if necessary.

MK
liuyl_it
Frequent Advisor

Re: How to realize the same PVIDs wth different VGIDs or w/o ?

Thank you very much!!

And I think that it should be still safe to the existing LVM running on system even if there were the other PVs with the same PVID/VGID that not using vgchgid after dd cloned, because the /etc/lvmtab is still original, that is to say, its configuration does not include the dd cloned PVs' name!

Am I right?

Matti_Kurkela
Honored Contributor
Solution

Re: How to realize the same PVIDs wth different VGIDs or w/o ?

Exactly - the LVM configuration won't change until you use some LVM commands to make changes, so any dd clones are safe if you don't use the LVM configuration commands.

I would think that "vgimport -s" and "vgscan" might be the only dangerous commands, as those are the only ones that have a reason to scan all the disks for VGID/PVIDs. But I'm not 100% certain of that: to be safe, I would want to always resolve any dd clones or any other such duplicates before making any other LVM configuration changes.

(By resolving, I mean either using vgchgid to give them a non-duplicate VGID, or maybe unpresenting them from the system if applicable.)

MK
liuyl_it
Frequent Advisor

Re: How to realize the same PVIDs wth different VGIDs or w/o ?

Good!    Thanks  again!!