1832223 Members
2351 Online
110041 Solutions
New Discussion

vg extend

 
SOLVED
Go to solution
seenivasan
Frequent Advisor

vg extend

Dear team,

our server is running with mc/sg.the shared lv is going to full so i need to extend the lv in the servers.how can i extend the lv in cluster?where i need to enter the lv details in sg?could you any one help me?
7 REPLIES 7
R.K. #
Honored Contributor

Re: vg extend

Hello Seenivasan,

If you have space in that VG, you can simply do a lvextend followed by fsadm (OnlineJFS) on active node. That is all. Nothing is required to be done on other nodes.

If onlineJfs is not present then you have to unmount the file system (downtime).

Regds..
Don't fix what ain't broke
ani007
Super Advisor

Re: vg extend

Well without Online JFS, you will have to unmount the file system(s), so down time is a must!

So, you need to do something like:
1) cmhaltpkg
2) vgchange -a e
3) lvextend (to the size you want)
4) extendfs
5) mount
6) Use bdf to check the file sstem is now the size you need
7) umount

8) vgchange -a n
9) cmrunpkg
10) cmmodpkg -e

Please assign points each of us.
Regards,
Ani
Jayakrishnan G Naik
Trusted Contributor
Solution

Re: vg extend

Hi Seenivasan

Step 1) If there are no enough free extends, you need to get a new pv (disk or lun from the storage- depending on your env)Once PV is available then do the following steps . If you have enough space in your vg Start with step 2.

# pvcrerate /dev/rdsk/cxtxdx (New PV)

# vgextend vgname /dev/dsk/cxtxdx

# vgdisplay vgname
to see the added free extends.


Step 2) Please check whether you have enough free extends in your vg. If available you can direcly use lvextend to extend the filesystems.

# vgdisplay vgname

# lvextend -L XXXXM /dev/vgname/lvname
XXXXM stands for the size in Mb

Step 3) Further steps depend o the availability of online JFS. If online jfs not available follow the steps below. If online JFS is available skip to step 4 :

unmount the filesystem ( may need the related application to be shutdown first.)


# umount /app

# extendfs /dev/vgname/lvname

# mount /dev/vgname/lvname /app.

Step 4) If online JFS is available skip the above step "3", then follow the steps below.

# fsadm -F vxfs -b XXXXM /mnt_point

XXXXm stands for the size in MB and using the M/G is a must while using -b , if not used it will take the value as Kb (default)

Step 5) Once the filesystem is extended, vg changes should be replicated to other cluster node.

Create the map file in preview mode

vgexport -p -v -s -m vgname.map /dev/vgname

Step 6) copy it to the other node. you may need to remove and recreate the vg information on the other node where the vg is inactive.

# scp vgname.map user@clusternode2:/tmp

on other node
# vgexport /dev/vgname

# mkdir /dev/vgname; mknode /dev/vgname/group c 64 0x0X0000
( 0X0000: use the same minor number as in the other cluster node)

# vgimport -v -s -m /tmp/vgname.map /dev/vgname


Regards
Jayakrishnan G Naik
Jayakrishnan G Naik
Trusted Contributor

Re: vg extend

Hi Seenivasan,

Please note; Vgexport and vgimport is applicable only if a new pv is used (as suggested by RK above).

Regards
Jayakrishnan G Naik
seenivasan
Frequent Advisor

Re: vg extend

Dear ,

we need to add the any entries in the cluster conf file or some where else?
Jayakrishnan G Naik
Trusted Contributor

Re: vg extend

Hi

Nothing to add/modify cluster config files.


Regards
Jayakrishnan G Naik

Stephen Doud
Honored Contributor

Re: vg extend

As far as Serviceguard is concerned, the only references to volume groups and logical volumes are in the cluster ASCII configuration file (VG only), and the package configuration file (modular format) or package control script (legacy format) (VG and LV), however none of these files reference specific disks in volume groups.

Adding or removing a disk in an LVM volume group changes /etc/lvmtab on one node, but does not update other nodes. For this reason, you must vgexport and vgimport the VG on the other nodes manually.

Growing or shrinking a logical volume only changes the LVM metadata on-disk and does not affect any LVM files in a file system.

Growing a file system only changes the VxFS file system metadata on-disk.