Operating System - HP-UX
1829631 Members
1642 Online
109992 Solutions
New Discussion

vgimport behaves differently when giving persistent file names

 
SOLVED
Go to solution
Kurz
Frequent Advisor

vgimport behaves differently when giving persistent file names

Hi,

I was just wondering, maybe you have come across this:

If I just do

vgimport -v -s -m /tmp/vg55.map,

then the volume group is based on the old non-persistent (legacy) device files, and I don't want that.

So I did:
# vgimport -v -m /tmp/vg55.map /dev/vg55 /dev/disk/disk88 /dev/disk/disk93
Creating "/etc/lvmtab_p".
Beginning the import process on Volume Group "/dev/vg55".
vgimport: Warning: Volume Group belongs to different CPU ID.
Can not determine if Volume Group is in use on another system. Continuing.
Logical volume "/dev/vg55/lvol1" has been successfully created
with lv number 1.
Logical volume "/dev/vg55/lvol2" has been successfully created
with lv number 2.
vgimport: Volume group "/dev/vg55" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
#

My question is: Why does he not like the persistent device files in this case? He wasn't complaining when I imported with the -s option, but then the VG was based on the legacy paths.
# vgimport -v -m /tmp/vg55.map /dev/vg55 /dev/disk/disk88 /dev/disk/disk93
Creating "/etc/lvmtab_p".
Beginning the import process on Volume Group "/dev/vg55".
vgimport: Warning: Volume Group belongs to different CPU ID.
Can not determine if Volume Group is in use on another system. Continuing.
Logical volume "/dev/vg55/lvol1" has been successfully created
with lv number 1.
Logical volume "/dev/vg55/lvol2" has been successfully created
with lv number 2.
vgimport: Volume group "/dev/vg55" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
3 REPLIES 3
Carsten Krege
Honored Contributor
Solution

Re: vgimport behaves differently when giving persistent file names

I'd say that this is not an effect of using new device files vs legacy device files.

In the map file you give with the vgimport -s -m command you have the volume group id specified in the first line. The VG id consists of the system's software id where vgcreate was executed and a timestamp. You are therefore asking LVM to import disks belonging to a specific VG id and therefore LVM assumes you **know** that you are about to import a VG from a different system; hence no warning.

This is different if you do not specify a map file that was not generated with -s. Here you specify disks and you might have chosen the wrong devices files and a warning is appropriate if the disks belong to a VG that was created on a different system.

I'd assume that a vgimport -s -m -N (-N option to force LVM to import with persistent device files; new option in 11iv3) also does not give you a warning.


Carsten


-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Kurz
Frequent Advisor

Re: vgimport behaves differently when giving persistent file names

You were right, -N is also what HP recommends:

"HP recommends converting volume groups with alternate links to use native multi-pathing by the use of persistent DSFs. The /usr/contrib/bin/vgdsf script, vgscan -N command, or vgimport -s -N commands perform this conversion. See the For More Information section for a whitepaper - LVM Migration from legacy to persistent naming model."

I had read the document but at that time i was only doing standard mirroring on 1 node, no ServiceGuard.

Kurz
Frequent Advisor

Re: vgimport behaves differently when giving persistent file names

Just to clarify what had happened:

I had exported the volume group with
# vgexport -v -p -s -m /tmp/vg55.map /dev/vg55

and then imported it on the 2nd node with

vgimport -s -m /tmp/vg55.map /dev/vg55

This gave me a volume group that looked like this:

# vgdisplay -v /dev/vg55
--- Volume groups ---
VG Name /dev/vg55
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 2
Open LV 2
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 2559
VGDA 4
PE Size (Mbytes) 4
Total PE 5118
Alloc PE 5000
Free PE 118
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 163776m
VG Max Extents 40944

--- Logical volumes ---
LV Name /dev/vg55/lvol1
LV Status available/syncd
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 500
Used PV 2

LV Name /dev/vg55/lvol2
LV Status available/syncd
LV Size (Mbytes) 9000
Current LE 2250
Allocated PE 4500
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c1t6d7
PV Name /dev/dsk/c11t6d7 Alternate Link
PV Name /dev/dsk/c17t6d7 Alternate Link
PV Name /dev/dsk/c7t6d7 Alternate Link
PV Status available
Total PE 2559
Free PE 59
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c5t6d7
PV Name /dev/dsk/c3t6d7 Alternate Link
PV Name /dev/dsk/c15t6d7 Alternate Link
PV Name /dev/dsk/c13t6d7 Alternate Link
PV Status available
Total PE 2559
Free PE 59
Autoswitch On
Proactive Polling On

--> not what I wanted

Giving the persistent device files on the command lines instead made things better:

# vgchange -a n /dev/vg55
Volume group "/dev/vg55" has been successfully changed.
# vgexport /dev/vg55
vgexport: Volume group "/dev/vg55" has been successfully removed.
#

# vgimport -v -m /tmp/vg55.map /dev/vg55 /dev/disk/disk88 /dev/disk/disk93
Creating "/etc/lvmtab_p".
Beginning the import process on Volume Group "/dev/vg55".
vgimport: Warning: Volume Group belongs to different CPU ID.
Can not determine if Volume Group is in use on another system. Continuing.
Logical volume "/dev/vg55/lvol1" has been successfully created
with lv number 1.
Logical volume "/dev/vg55/lvol2" has been successfully created
with lv number 2.
vgimport: Volume group "/dev/vg55" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group.
#
# vgchange -a y /dev/vg55
Activated volume group
Volume group "/dev/vg55" has been successfully changed.
# vgdisplay -v /dev/vg55
--- Volume groups ---
VG Name /dev/vg55
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 2
Open LV 2
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 2559
VGDA 4
PE Size (Mbytes) 4
Total PE 5118
Alloc PE 5000
Free PE 118
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 163776m
VG Max Extents 40944

--- Logical volumes ---
LV Name /dev/vg55/lvol1
LV Status available/syncd
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 500
Used PV 2

LV Name /dev/vg55/lvol2
LV Status available/syncd
LV Size (Mbytes) 9000
Current LE 2250
Allocated PE 4500
Used PV 2


--- Physical volumes ---
PV Name /dev/disk/disk88
PV Status available
Total PE 2559
Free PE 59
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk93
PV Status available
Total PE 2559
Free PE 59
Autoswitch On
Proactive Polling On

But it would probably have been best to use the -N option as you suggested.