Operating System - HP-UX
1753777 Members
7780 Online
108799 Solutions
New Discussion юеВ

Re: Remove Cluster Lock Flags from PV

 

Re: Remove Cluster Lock Flags from PV

I have a vague memory that the vgchgid command might sort this out (you'd need to export the VG before doing it though and re-import afterwards)

Worth a try I guess...

HTH

Duncan

I am an HPE Employee
Accept or Kudo
maslo64
Advisor

Re: Remove Cluster Lock Flags from PV

Hi Dave,
if you have valid VG backup before cluster lock was in place ,try to user vgcfgrestore.

Laco
Emil Velez
Honored Contributor

Re: Remove Cluster Lock Flags from PV

vgchange -c n vgxx
vgchange -c y vgxx or
cmapplyconf with the vg at the end of the file should mark the vg and each disk for activation with SG>

The lock information if the disk is defined as a lock disk is written to the bad block area of a disk (unless you use LVMv2).

I think that until you associate that disk with a new cluster and do cmapplyconf it may not change that area in the BBRA and it will not use that area unless that disk is configured as the lock disk of a cluster.

as long as the disk can be activated with this cluster after it is associated with this cluster
vgchange -c y vgxx
or cmapplyconf

You should be ok using the disk with thsi cluster as part of a vgchange -a e activated volume group.

davesec
Advisor

Re: Remove Cluster Lock Flags from PV

1. Thanks to all you Answers. The solutions I adopted were the following:

Solution 1

If you have valid VG backup before cluster lock was in place, you can use vgcfgrestore.

1. Halt the cluster package that uses the vg01

# cmhaltpkg mypkg

2. Deactivate the vg01 on all nodes (normaly this is the case if you halt the package)

# vgchange -a n vg01

3. Restore the configuration from the

# vgcfgrestore -f /path/to/vg01.conf /dev/rdisk/disk71
Volume Group configuration has been restored to /dev/rdisk/disk71

4. Export and Import it on the other node

# vgex vg01 node2

* vgex is included in the HPUX Tools
5. Start the cluster package

# cmrunpkg mypkg

Solution 2

1. Halt the cluster package that uses the vg01

# cmhaltpkg mypkg

2. Deactivate the vg01 on all nodes (normaly this is the case if you halt the package)

# vgchange -a n vg01

3. Export the vg01

# vgexport -s -m /tmp/vg01.map vg01

4. Change the VGID of all disks that were member of the vg01

# vgchgid /dev/rdisk/disk71

5. Reimport the vg01

# vgimport -m /tmp/vg01.map vg01 /dev/disk/disk71
vgimport: Volume group "/dev/vg01" 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.

6. Cluster activate the vg01

# vgchange -c y vg01

7. Export the vg01 on the other node

node2# vgexport vg01

8. Export and Import it on the other node

# vgex vg01 node2

* vgex is included in the HPUX Tools
9. Check the newly created vg01

# vgchange -a r vg01
Activated volume group.
Volume group "vg01" has been successfully changed.
# vgdisplay -v vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read-only
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 25599
VGDA 2
PE Size (Mbytes) 4
Total PE 25599
Alloc PE 1
Free PE 25598
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 1638336m
VG Max Extents 409584

--- Logical volumes ---
LV Name /dev/vg01/lvol1
LV Status available/syncd
LV Size (Mbytes) 4
Current LE 1
Allocated PE 1
Used PV 1


--- Physical volumes ---
PV Name /dev/disk/disk71
PV Status available
Total PE 25599
Free PE 25598
Autoswitch On
Proactive Polling On

# lvm.11 -p -d /dev/rdisk/disk71 | grep -i lock
/* Alternate block pool length. */ 564
/* Alternate block pool start. */ 104857024
/* Cluster-lock flags. */
/* Cluster-lock area start. */ 0
/* Alternate block pool length. */ 564
/* Alternate block pool start. */ 104857024
/* Cluster-lock flags. */ <-- The lock has gone away
/* Cluster-lock area start. */ 0

10. Deactivate the vg01 again

# vgchange -a n vg01

11. Start the cluster package

# cmrunpkg mypkg