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

Add a disk to vg and increase lv in a 2 node Service guard

 
SOLVED
Go to solution
Basheer_2
Trusted Contributor

Add a disk to vg and increase lv in a 2 node Service guard

Hello,
HP-UX 11.11
SErvice guard A.11.16
Advance JFS
2 node

I need to add a disk to an existing vg in the primary node and increase the LV (current 20GB) to 40 GB.

What are the steps.
Thanks in Advacnce
6 REPLIES 6
Murat SULUHAN
Honored Contributor

Re: Add a disk to vg and increase lv in a 2 node Service guard

Hi

take backup :) because backup is better than sorry :)
Shutdown clustered application (don't shutdown package)
vgextend with new disk
lvextend to 40 GB
umount
extendfs
mount
start the application

PS: I have never used Adv.JFS so I don't know its capabilities about online FS extension (without umount/mount) so check the documents

PS: You don't need to import/export VG map because your VG is same, LVs are same, only only LV size will change

Best Regards
Murat
Murat Suluhan
Hasan  Atasoy
Honored Contributor
Solution

Re: Add a disk to vg and increase lv in a 2 node Service guard


1. find the lun you want to use for extending the vg.

2. pvcreate the disk
# pvcreate /dev/rdsk/c?t?d?

3. extend the vg
# vgextend /dev/vg?? /dev/dsk/c?t?d? /dev/dsk/c?t?d? (the second disk is the altenate link)

4. extend any/all logical volumes/filesystems.
You will have to stop the app if it has control of the fs:

# umount /mountpoint
# lvextend -L /dev/vg??/lvol??
# extendfs -F vxfs /dev/vg??/rlvol??
# mount /dev/vg??/lvol?? /mountpoint

5. Restart the app on the package (if needed)

6. Update the LVM information for the vg on all other nodes in the cluster:

# vgexport -p -v -s -m /tmp/vg??.map vg??
# rcp -p /tmp/vg??.map nodeB:/tmp

On the other node(s):

(first, note the minor number of the vg group file, 0x??0000, as you will need it)
# ll /dev/vg??/group
# vgexport vg??
# mkdir /dev/vg??
# mknod /dev/vg??/group c 64 0x??0000 (same minor # as before)
# vgimport -v -s -m /tmp/vg??.map vg??
Sandman!
Honored Contributor

Re: Add a disk to vg and increase lv in a 2 node Service guard

-- Bring the new LUN/disk under LVM control
# pvcreate /dev/rdsk/c#t#d#

-- Add the new PV to the desired VG
# vgextend /dev/vg?? /dev/dsk/c#t#d#

-- Extend the lvol onto the newly added PV
# lvextend -L /dev/vg??/lvol??

-- Export the VD definition to all other nodes in the cluster
# vgexport -p -v -s -m /tmp/vg??.map

-- ftp the mapfile to the other nodes in the cluster

-- Recreate the VG on the other nodes using the ftp'ed mapfile
# vgimport -v -s -m /tmp/vg??.map
Murat SULUHAN
Honored Contributor

Re: Add a disk to vg and increase lv in a 2 node Service guard

Sorry

You are adding disk so you need to import export your VG as Hasan's post

Best Regards
Murat Suluhan
A. Clay Stephenson
Acclaimed Contributor

Re: Add a disk to vg and increase lv in a 2 node Service guard

There is absolutely no need to backup as long as you are reasonably careful. If you were simply extending an LVOL then nothing would be needed beyond an lvextend and a fsadm -F vxfs -b larger_size BUT because you are adding a disk to VG, you really should halt the package and vgexport/vgimport the VG again.

On primary node:
1) cmhaltpkg -v my_package
2) pvcreate /dev/rdsk/c1t2d0
3) vgchange -a e /dev/vg05 # because cmhaltpkg deactivated the VG
mount /myfilesys # because cmhaltpkg umounted it
4) vgextend /dev/vg05 /dev/dsk/c1t2d0
5) lvextend -L 30000 /dev/vg05/lvol2
6) fsadm -F vxfs -b 30720000 /myfilesys

7) vgexport -m /tmp/vg05.map -p -s /dev/vg05
8) umount /myfilesys
9) vgchange -a n /dev/vg05

10) Copy /tmp/vg05.map to the adoptive node using ssh, ftp, rcp, ...

On adoptive node:
1) vgexport /dev/vg05
2) mkdir /dev/vg05
3) mknod /dev/vg05/group c 64 0x050000
4) vgimport -m /tmp/vg05.map -s /dev/vg05
5) vgchange -a e /dev/vg05
6) vgcfgbackup /dev/vg05
7) vgchange -a n /dev/vg05

Back on primary node:
1) cmrunpkg -n primary_node -v my_package
2) cmmodpkg -e my_package # to re-enable package switching turned off by cmhaltpkg.

Adjust your pathnames, VG's, LVOL's, VG minor device numbers, and sizes to match your requirements.

If it ain't broke, I can fix that.
Basheer_2
Trusted Contributor

Re: Add a disk to vg and increase lv in a 2 node Service guard

This is the Full Solution