Operating System - HP-UX
1832593 Members
2622 Online
110043 Solutions
New Discussion

Re: Increasing LV in shared VG

 
SOLVED
Go to solution
YMJ
Frequent Advisor

Increasing LV in shared VG

Hi all

I have two HP-UX 11.11 servers in a cluster running ServiceGaurd. they have a shared VG /dev/vgora. Two logical volumes (/dev/vgora/lvol1 and /dev/vgora/lvol2) need to be extended.

my plan to extend these LVs is as follows:

# vgchange -a n /dev/vgora (deactivate the VG)
# vgchange -S n -c n /dev/ vgora (mark the VG unsharable)
# vgchange -a y /dev/ vgora (activate the VG in normal mode -unsharable)
# umount /arch1 (is this necessary?)
# lvextend -L 50000 /dev/vgora/lvol1
# extendfs /dev/vgora/rlvol1
# mount /dev/vgora/lvol1 /arch1
# bdf (to check the new size)
# umount /arch1
# vgchange -a n /dev/vgora (deactivate the VG)
# vgchange -S y -c y /dev/vgora (mark the VG sharable)

I need to know if the steps are correct or not?

I have two concerns:
1. Do I need to stop the SG package and Oracle database?
2. Is there any actions to do with second node?

Thank you for your help...
8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: Increasing LV in shared VG

Do you have online JFS installed? If so, then this can be done online.

With Online JFS:

lvextend -L 50000 /dev/vgora/lvol1
fsadm -b 50000m /arch1

If you don't have online JFS, I would do the following:

Stop the MC/SG package that accesses this VG (This should also unmount the filesystem)
lvextend -L 50000 /dev/vgora/lvol1
extendfs /dev/vgora/rlvol1
lvdisplay /dev/vgora/lvol1 (to check the size)
Start the MC/SG package that accesses this VG
bdf

That should be all you need to do.

Since you are just extending the LV, and not adding a disk to the VG, then there is nothing that needs to be done on the other node.
nanan
Trusted Contributor
Solution

Re: Increasing LV in shared VG

Hi YMJ

I have a question that you told us you want to handle shard volume to be extend, does you?
But In what you posted, suddenly changed to File system.
you seem to be confused that your procedure is not correct.
There are two sort of cases
1. shraed vg
2. non shared, just file system

I would say that you can't change lvols on line even you have OnlineJFS, If your VGs are shared mode.
you have to halt package on the both nodes
and follow beloow procedure

#vgchange -S n -c n /dev/vgora (mark the VG unsharable)
#vgchange -a y /dev/vgora
#lvextend -L /dev/vgora/lvol1
#vgchnage -y n vgora
#vgchnage -S y -c y vgora
#cmrunpkage
end

The other is non shared, exclusive mode
If your lvols are filesystem and mounted a mount point
you should get the vgs mode to be Exclusive
so you can able to maintain a integrity of the file system from concurrnt access of both mode.
After all, you can choose two way to extend your lvols in this case
If you have Online JFS, You can extend without package halt(but vgmode should be exclusive: check whit vgdisplay command)

1. lvextend -L /dev/vgora/lvol1
2. fsadm -d M /dev/vgora/lvol1

If don't have Online JFS, you have to umount the file system.

1. Application stop
2. umount the corresponding filesystem
3. lvextend -L /dev/vgora/lvol1
4. extendfs /dev/vgora/lvol1
5. mount
6. application start

Your question
>1. Do I need to stop the SG package and Oracle database?

----> yes or not,
Yes: you meant that vgs were shard mode.
NO :In your vgs mode in exclusive and Online JFS in
2. Is there any actions to do with second node?
-----> In Shard mode Vgs you should halt the corresponding package


Regards
nanan

Muthyala
Frequent Advisor

Re: Increasing LV in shared VG

Hi

You can follow this document ID DOCUMENT ID: UXSGKBAN00000342

DATE: 5/10/00
DOCUMENT DESCRIPTION: RESIZING A LOGICAL VOLUME IN A SERVICEGUARD PACKAGE
DOCUMENT ID: UXSGKBAN00000342

You may provide feedback on this document

RESIZING A LOGICAL VOLUME IN A SERVICEGUARD PACKAGE
DOCID: UXSGKBAN00000342 UPDATED: 20031112
DOCUMENT
This article addresses the process of changing the size of a logical volume
governed by Serviceguard.

â ¢ A logical volume's size may only be increased or reduced when it's parent
volume group is active.

â ¢ VxFS = Journal File System. Online JFS = Advanced JFS = Advanced VxFS.

â ¢ If Advanced Journal File System (AdvJFS) features are loaded, the
administrator can grow/reduce a file system within the logical volume while
the file system is in service. If only standard JFS is loaded, the file
system must be unmounted in order to change it's size, and loss of data may
occur if the file system is reduced.

â ¢ The results of reducing the size of a VxFS filesystem prior to AdvJFS
version 3.3 (which is not available for 10.20) are uncertain. File system
backup is recommended prior to resizing a file system, but specifically
recommended for pre-3.3 file systems in case of unexpected truncation of a
file system.

â ¢ Changing the size of a logical volume only affects the content of the VGDA
(LVM structures on the disks). Therefore, after resizing the logical volume
and the file system within it, no Serviceguard files or commands need be
performed. The size of the logical volume is loaded whenever the VG is
activated with the package startup.

For the purposes of clarity, the following procedure uses an example volume
group and logical volume and mount point: vg07, lvol4 and /mnt1.


Growing a logical volume
1) If the VG is not active on any node, activate it on a node currently
running (Serviceguard cmlvmd (Serviceguard) must be running in order to
activate a clustered VG).

# vgchange -a e vg07

2) On the node where the VG is active, use lvextend to increase the
size of the lvol.

lvextend syntax:
/usr/sbin/lvextend [-A autobackup] {-l le_number | -L lv_size | -m
mirror_copies} lv_path [pv_path ... | pvg_name ...]
- where lv_size is in megabytes.

Sample command to grow an LVOL to 8GB size:
# lvextend -L 8000 /dev/vg07/lvol4

3a) Growing a standard (non-AdvJFS) file system
# cmhaltpkg (umounts the file system)
# vgchange -a e vg07 (activates the VG)
# extendfs /dev/vg07/rlvol4 (grows the file sys)
# vgchange -a n vg07 (deactivate the VG)
# cmrunpkg (start the package)


3b) Growing AdvJFS file systems: (while the f/sys is active)
To grow the file system to the new boundary of the logical volume,
determine the number of disk blocks that match the new logical volume size.
The formula for determining the number of blocks is:

Megabytes x 1024 bytes per block = Disk Blocks.
NOTE: The fsadm_vxfs man page refers to disk blocks as "sectors".

Example: grow a logical volume to 8GB.

8000MB * 1024 bytes/block = 8192000 disk blocks

Syntax to adjust the size of an AdvJFS file system:
fsadm -F vxfs -b /

Sample command:
# fsadm -F vxfs -b 8192000 /mnt1
(see also the man page for fsadm_vxfs(1M))


Reducing the size of the logical volume

Standard LVM
1) Backup the data files in the logical volume.

2) If the logical volume has a file system on it, the file system must be
unmounted before proceeding:
# cmhaltpkg (umounts the file system)
# vgchange -a e vg07 (activates the VG)

3) Reduce the size of the logical volume.
Example - reduce an lvol to 2GB size:

# lvreduce -L 2000 /dev/vg07/lvol4

4) Because the file system is now truncated abnormally, recreate the file
system:
# newfs -F vxfs /dev/vg07/rlvol4
note raw logical volume

# mount /dev/vg07/rlvol4 /mnt1
# bdf /mnt1 # verify it's size is correct

5) Reload the data into the mounted file system.

6) Now complete the process:
# umount /mnt1
# vgchange -a n vg07
# cmrunpkg


Advanced JFS (while the logical volume is mounted):
1) Perform directory and extent re-org/de-fragmentation:

# fsadm -d -D -e -E /mnt1

NOTES:
â ¢ This will fail if an inode is assigned past the end of the lvol.

â ¢ HPUX 10.20 requires JFS version 3, 11.00 requires JFS version 3.3 and JFS
patches.

â ¢ errno 16 may mean it cannot be reduced if the old lvol size is not a
multiple of 32MB

2) Reduce the size of the file system online. Example: reduce the file
system to 2GB:

# fsadm -F vxfs -b 2048000 /mnt1

(2048000 = 2000MB x 1024 bytes per block.)

3) Now reduce the logical volume size. Example:
# lvreduce -L 2000 /dev/vg07/lvol4


How to Extend Mounted Filesystem OnHP-UX Under Cluster Environment

#lvextend â L (Present Space + New Space) /dev/vg00/lvol4

If OnlineJFS is avaible please carry the next step. (It is available on all NBB HP Servers)

#fsadm â F vxfs â b (Present Space + New Space X 1024) /mount_point

If OnlineJFS is not there not there then

Umount the file System
Then Do
#umount /mount_point
#lvextend â L (Present Space + New Space) /dev/vg00/lvol4
#extendfs -F vxfs /dev/vg00/rlvol
Then Do Mount
#mount /dev/vg00/lvol /mount_point


### DOCUMENT END ###





YMJ
Frequent Advisor

Re: Increasing LV in shared VG

Thank you all for all responses

Since this cluster running very critical services, I am getting difficulty to have approval to stop the cluster and do this task.

once I get approval, I'll back to you guys.
Thank you again.



YMJ
Frequent Advisor

Re: Increasing LV in shared VG

Hi guys again

finally I got the approval for the down time and I did all the changes seccessfully.
However, during the down time I had it a chance to install online JFS to make our life easier in the future. one node of the cluster has bundle installed and rebooted correctly. the second node has never been up after the reboot.

I found the server down and its two hard disks have orange led.

I login to MP to boot the server. but it give me this error:

"RtnCodeNoPoweredCellSlotsInPartition"

As I understand there in no power in the hard disk and that is why they have orange led.

How to fix this problem? please, help.
Carsten Krege
Honored Contributor

Re: Increasing LV in shared VG

You already managed the resizing of your lvol. Because you seem to use an SGeRAC cluster, I wanted to point you to the SNOR (Single Node Online Volume Reconfiguration) feature:

http://docs.hp.com/en/T1859-90038/ch04s03.html#d0e12024

The prerequisites are:

HPUX 11iv2:
LVM patches
kernel PHKL_33312 (released) or later patch
command PHCO_33309 (released) or later patch
SG/SGeRAC
11.17 (AR0512), or
11.16 + PHSS_33835 or later patch

HPUX 11iv1:
LVM patches
kernel PHKL_33390 (GR0: 9/19, GR: 10/19) or later patch
command PHCO_33310 (GR0: 9/19, GR: 10/19) or later patch
SG/SGeRAC
11.16 + PHSS_33834 or later patch

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
YMJ
Frequent Advisor

Re: Increasing LV in shared VG

Thanks all

we unpluged the power cables. then, we plug them again and the serve started.

thanks for all help
YMJ
Frequent Advisor

Re: Increasing LV in shared VG

closed