Operating System - HP-UX
1836999 Members
2031 Online
110111 Solutions
New Discussion

Re: increasing filesystem in ServiceGuard

 
mark yeo
Advisor

increasing filesystem in ServiceGuard

hi, i wanted to increase my filesystem in my active node which is on ServiceGuard.

in sam , i noticed the below

logical volume -> action -> increase

in one of my box. However, i cant find this in both of my nodes which are ServiceGuard. Also, i noticed that their type are different. One is Vsfx while the other (ServiceGuard) is DVLM. Seems like i cant use sam but rather fsadm.

My question is how cant i increase the file sysetm in the one with ServiceGuard?


# swlist | grep -i online
B3929BA B.11.00 HP OnLineJFS (Advanced VxFS)
OnlineDiag B.11.00.24.11 HPUX 11.0 Support Tools Bundle, Mar 2003
PHKL_22393 1.0 VxFS 31 OnlineJFS cumulative patch

Thanks
6 REPLIES 6
monasingh_1
Trusted Contributor

Re: increasing filesystem in ServiceGuard

You have OnlineJFS so just go ahead and use lvextend -l NEW_SIZE /dev/VGNAME/LVOL_NAME and then use fsadm to extend the size.

fsadm -b (NEW_SIZE*1024) /MOUNT_POINT

The lv and filesystem extension on MCSG node is same as that of without MCSG. I think SAM is not allowing LV extension because of MCSG present. Never tried using sam to extend LV in MCSG env , but it does work fine in not MCSG env...

hope this helps...
monasingh_1
Trusted Contributor

Re: increasing filesystem in ServiceGuard

forgot to add that if you are adding disks to VG for extending LV then you must add the same disk to other node as well....
monasingh_1
Trusted Contributor

Re: increasing filesystem in ServiceGuard

Also, you will not find the LV mounted on otehr machine unless the package has moved to other node.

The VG is not activated on both machine at the same time. So you can only work on LV on active node.

You work on all LV related stuff on active node and then do vgexport from active followed by vgimport on standby node to sync the vg details.
mark yeo
Advisor

Re: increasing filesystem in ServiceGuard

thanks.. guys
Geoff Wild
Honored Contributor

Re: increasing filesystem in ServiceGuard

If there is space in the vg, then you just lvextedn, then fsadm it on on e node (no need to do on other as it will see it automatically on a package switchover).


Example - increase oracle mount:

lvextend -L 7168 /dev/vg20/lvoracle
fsadm -b 7168M /oracle/IPR


If you need to add a disk, then you will have to vgextend as well, then lvextend/fsadm. After that, you will have to create a map file:

vgexport -s -p -v -m /tmp/vg20.map /dev/vg20

Then copy that map file to other node(s), vgexport that volume group on the other node(s), then vgimport it again using that map file.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Stephen Doud
Honored Contributor

Re: increasing filesystem in ServiceGuard

ITRC.HP.COM DOCUMENT ID: UXSGKBAN00000342
TITLE:Resizing a logical volume in a ServiceGuard package

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


NOTES:
See also KBRC00003170

### DOCUMENT END ###

Search the http://itrc.hp.com technical knowledge database (login required) for
more ServiceGuard documents using the prefixes of UXSG* or UMCSG*