LVM and VxVM

Filesystem extension in cluster

 
SOLVED
Go to solution
arkie
Super Advisor

Filesystem extension in cluster

Hi All,

We have the following 2 (two) nodes forming one SG cluster:-
1) eccprd1
2) eccprd2

Our requirement:
Extend LVOL /dev/vg_prd1/lvol10 by 20 GB in eccprd1 server and update in eccprd2.

Observation:
vg_prd1 has 1025 free PEs, size 32 MB each, totaling to 32 GB free space available. We will take 20 GB from there.

We have worked out the following steps in our action plan (need you experts' inputs/suggestions to zero in on them):-

eccprd1: cmhaltpkg ciPR1 # halt the CI package
eccprd1: cmhaltpkg dbPR1 # halt the DB package
eccprd1: vgchange -a e /dev/vg_prd1
eccprd1: vgchange -a y /dev/vg_prd1
eccprd1: lvextend -L 119808 /dev/vg_prd1/lvol10
eccprd1: extendfs -F vxfs /dev/vg_prd1/rlvol10
eccprd1: mount /dev/vg_prd1/lvol10 /oracle/PR1/sapdata2
eccprd1: umount /oracle/PR1/sapdata2
eccprd1: vgchange -a n /dev/vg_prd1
eccprd1: vgchange -a e /dev/vg_prd1

eccprd2: vgchange -a e /dev/vg_prd1
eccprd2: vgchange -a y /dev/vg_prd1
eccprd2: mount /dev/vg_prd1/lvol10 /oracle/PR1/sapdata2
eccprd2: umount /oracle/PR1/sapdata2
eccprd2: vgchange -a n /dev/vg_prd1
eccprd2: vgchange -a e /dev/vg_prd1

During the testing phase, we plan to check package failover in debug mode:-
eccprd1: touch /etc/cmcluster/PR1/debug
eccprd2: touch /etc/cmcluster/PR1/debug
eccprd1: cmruncl
eccprd1: reboot -q # Observe failover and VG activation in eccprd2
eccprd2: cmhaltpkg ciPR1
eccprd2: cmhaltpkg dbPR1
eccprd2: cmhaltcl
eccprd1: rm /etc/cmcluster/PR1/debug
eccprd2: rm /etc/cmcluster/PR1/debug
eccprd1: cmruncl # Start the cluster normally

Queries/Confusion
=================
1) vgchange -a e /dev/vg_prd1

>> Does the same 'vgchange -a e' command work as a toggler between activating & deactivating a VG in exclusive mode?

2) What additional safety/rollback options should we consider keeping, besides the following:-
- Keep ignite backup of both nodes
- Keep complete FS backup of both nodes
- Keep /etc/cmcluster tar backup
- Keep mapfiles of all VGs
- Keep backup of the following files from both nodes
> /etc/services
> /etc/fstab
> /etc/hosts
> /etc/exports

Anything we are missing? Pls advise.
7 REPLIES 7
Asif Sharif
Honored Contributor

Re: Filesystem extension in cluster

Hi,

you missed the vgexport and import activity.

please see the procedure on below thread.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1279878317499+28353475&threadId=1123317

Regards,
Asif Sharif
Regards,
Asif Sharif
melvyn burnard
Honored Contributor
Solution

Re: Filesystem extension in cluster

If you are ONLY extending the lvol and fs size, there is no need to export or import the VG as this metadata is held puirely on the disk, so all you need to do is:

eccprd1: cmhaltpkg ciPR1 # halt the CI package
eccprd1: cmhaltpkg dbPR1 # halt the DB package
eccprd1: vgchange -a e /dev/vg_prd1
eccprd1: lvextend -L 119808 /dev/vg_prd1/lvol10
eccprd1: extendfs -F vxfs /dev/vg_prd1/rlvol10
eccprd1: mount /dev/vg_prd1/lvol10 /oracle/PR1/sapdata2
Now check the file system shows the size you expect!
eccprd1: umount /oracle/PR1/sapdata2
eccprd1: vgchange -a n /dev/vg_prd1

Test on node 2:
eccprd2: vgchange -a e /dev/vg_prd1

eccprd2: mount /dev/vg_prd1/lvol10 /oracle/PR1/sapdata2
eccprd2: umount /oracle/PR1/sapdata2
eccprd2: vgchange -a n /dev/vg_prd1


As for your questions:
1) vgchange -a e /dev/vg_prd1

>> Does the same 'vgchange -a e' command work as a toggler between activating & deactivating a VG in exclusive mode?

No,the -a e option activates in exclusive mode, and a vgchange -a n deactivates the vg, no matter what mode is was activated in.
man vgchange


2) What additional safety/rollback options should we consider keeping, besides the following:-
- Keep ignite backup of both nodes
- Keep complete FS backup of both nodes
- Keep /etc/cmcluster tar backup
- Keep mapfiles of all VGs
- Keep backup of the following files from both nodes
> /etc/services
> /etc/fstab
> /etc/hosts
> /etc/exports

Looks fine to me
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
arkie
Super Advisor

Re: Filesystem extension in cluster

Thanks Melvyn, Have revised the action plan accordingly.

Thanks Asif
Emil Velez
Honored Contributor

Re: Filesystem extension in cluster

lvextend -L 119808 /dev/vg_prd1/lvol10
fsadm -F vxfs -b 119808M /oracle/PR1/sapdata2


if you have onlinejfs that should work. Since you are not adding or removign disks from a VG you probably do not need to do the vgexport and vgimport.


arkie
Super Advisor

Re: Filesystem extension in cluster

Thanks Emil, but unfortunately we dont have OnlineJFS.
stephen peng
Valued Contributor

Re: Filesystem extension in cluster

if vg_prd1 activate in exclusive mode in SG configuration? I don't think vgchange -a y vg_prd1 would succeed after you vgchange -a e vg_prd1. just activate it in exclusive mode and then do the extend job and de-activate it then run the package. period.