1834152 Members
2337 Online
110064 Solutions
New Discussion

Re: Extending a vg

 
kamal_9
Super Advisor

Extending a vg

Hi All
Wish u all a very happy christmas and newyear
I hav created a lun in the casa .using commandviewsdm.Now i want to extend a vg to the lun thru ioscan iam getting that lan as c20t3d4.and sfter that i want to extend the one of the lv inside that vg .Iam using 2 node cluster .and iam not having online JFS.Pls tell me wht are teh precaution that i shouls take .wht are the steps i should follow
18 REPLIES 18
G. Vrijhoeven
Honored Contributor

Re: Extending a vg

Hi,

Now i assume you want to extend an lvol ( since you mentioned you do not have olinejfs)
Online
pvcreate /dev/rdsk/c20t3d4
vgextend /dev/vgname /dev/dsk/c20t3d4
Disk is now added to volumegroup.
Online:
lvextend -L /dev/vgname/lvol

Offline
Make sure you have a good backup ( Not that you will need it...)
umount mountpoint
extendfs /dev/vgname/lvol
mount /dev/vgname/lvol mountpoint

If you only extend an lvol you do not need to distribute it to the other nodes. If you add an lvol you will.

HTH,

Gideon
PS. I would consider bying OnlineJFS since you have clustersoftware active.

kamal_9
Super Advisor

Re: Extending a vg

Hi
Iam using Lun.One more thing iwant to specify the alternative path for the lun which iam adding to that vg.
For eg the same Lun is showing in ioscan as
System A :-
c20t4d4
system b :-
c25t8d4
now for eg in in systemA i will do the pvcreate /dev/rdsk/c20t4d4
vgextend...
lvextend...
now in systemB the path is diff .i want to specify that path has alt path .can u tell me how to do that .If iam wrong wht is the procedure to do the alt path.

Fred Ruffet
Honored Contributor

Re: Extending a vg

If you have cXtYdZ as primary path and cUtVdW as alternate path, vgextend your vg on the two path will add both primary and alternate :
vgextend vgXX /dev/dsk/cXtYdZ # adds primary
vgextend vgXX /dev/dsk/cUtVdW # adds alternate
The second vgextend will be automatically detected as an alternate path.

Once this is done, do not deal with alternate anymore. Specify lvextend with only primary path. If, in some future, the primary fails, lvol will be addressed using alternate without any action needed.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
G. Vrijhoeven
Honored Contributor

Re: Extending a vg

Hi Kamal,

I made an mistake. Since you extended the vg with a diskyou do need to distribute the vgconfig to all the nodes.
Steps could be:

Node a:
vgextend etc.
at the end:

vgexport -p -v -m /tmp/vgname_mapfile -f /tmp/vgname.devfile vgname

( The -p only creates the files and does not remove the vg)

copy those files to node B. ( rcp -p /tmp/vgname.* nodeB:/tmp)
On node B:

ll /dev/vgname
(mind the minor number)
vgexport vgname
mkdir /dev/vgname
mknod /dev/vgname/group c 64 0x(number)
alter the device file on to c25 in the /tmp/vgname.devfile)
vgimport -m /tmp/*.mapfile -f *.devfile vgname
vgchange -a r /dev/vgname
vgcfgbackup /dev/vgname
vgchange -a n /dev/vgname

The alternate paths can be added by
vgextend /dev/vgname /dev/dsk/c?t?d?
HPUX will know it is an alternate since the numbers it writes on the disk (pvcreate) are identical.

HTH,

Gideon


mknod /dev/ngname/group

Bharat Katkar
Honored Contributor

Re: Extending a vg

Hi Kamal,

Primary and Alternate path comes in picture only when your Server is connected to Storage box with two different link using two HBA's.
ON a single server you will be able to see two entries for the same LUN. One is treated as primary and other one as alternate. That particular lun can be accessed by that server through any of those PATHS. This is done to achive no single point of failure. Now using the SDM you can select that particular LUN and change alternate to primary and vice versa.

Changing alternate PATHS to primary one distributes the load on both the HBA's equally thereby giving best performance along with redudansy and no single point of failure.

Hope that helps,
Regards,

You need to know a lot to actually know how little you know
kamal_9
Super Advisor

Re: Extending a vg

Hi all
Thanks for your replay.Do i need to halt the package .if i halt the package the vg will get deactivated then i may not able to do the vgextend etc ,Or just umount the file system will do .
Thanks
Kamal
Bharat Katkar
Honored Contributor

Re: Extending a vg

Hi Kamal,
Yes you will have to halt the package becuase your filesystem will be unavailable during the period.

After halting the package do:

1. vgchange -c n vgxx
2. vgchange -a y vgxx

And then extend the vg as told earlier.

Regards,
You need to know a lot to actually know how little you know
kamal_9
Super Advisor

Re: Extending a vg

Hi Gideon
wht is this line for .
alter the device file on to c25 in the /tmp/vgname.devfile)
Thanks
Kamal
G. Vrijhoeven
Honored Contributor

Re: Extending a vg

Hi,

Technically the package does not have to be halted, but since the changes are that you will not be able to umount the filesystem when the package is active to enlardge the filesystem. So Mr. Bharat solution is right.
If you are able to stop all processes on the lvol just an umount of the lvol is enough to enlardge it. The fuser command could be of use.

Regards,

Gideon
G. Vrijhoeven
Honored Contributor

Re: Extending a vg

Hi,

The device file contains a string on server a like:
c20t3d4

on server B that same disk is
c25t8d4
if i understand you correct.

So to do a vgimport using a device file (vgname.devfile)
you have to specify the same disk for server B.
What i ment to say is make sure the device file for LUNX on serverA is translated to the same device file for LUNX on serverB.

HTH,

Gideon
Girish_17
Regular Advisor

Re: Extending a vg

Hi Kamal,

Actually when u say :
System A :-
c20t4d4
system b :-
c25t8d4

This has nothing to do with alternate primary path.

Well from server A it is sitting on COntroller instance 20 and in System B on 25.

In this case what you can do is just use vgexport -p on Server A, create map file srvA.map and then ftp this file to ServerB.

On serverB

vgimport -s -v -m srvA.map /dev/dsk/c25t8d4

This will do the needful.

Hope that helps.
Regards,
Bharat Katkar
Honored Contributor

Re: Extending a vg

Hi,
In that case what you can do is:

1. On Server A
# vgexport -p -s -v -m vgxx.map vgxx
2. ftp this vgxx.map to server B
3. On serverB
# mkdir /dev/vgxx
# mknod /dev/vgxx/group c 64
# vgimport -s -v -m vgxx.map vgxx /dev/dsk/c25t8d4

This should do the trick.

Regards,

You need to know a lot to actually know how little you know
kamal_9
Super Advisor

Re: Extending a vg

Hi all
Thanks for your replay
Iam attaching the file which iam going to do
pls correct me iam wrong
For Bharat
# vgimport -s -v -m vgxx.map vgxx /dev/dsk/c25t8d4

if i gave like this will it import all the vginf to this particular disk or it will just add this pv to that vg .because already iam having 2 pv's in tha vg
or should i give like this
vgimport -s -v -m vgxx.map /dev/dsk/c25t2d1 /dev/c25t3d5 /dev/c25t8d4 Correct me if iam wrong
Thanks
Kamal
Bharat Katkar
Honored Contributor

Re: Extending a vg

Hi Kamal,
You are absolutely correct ... i was just assuming that you only have one PV.

# vgimport -s -v -m vgxx.map /dev/dsk/c25t2d1 /dev/c25t3d5 /dev/c25t8d4

vgxx on server A should have this PV's.
Basically you should be able to point out the same LUN's what are been used on A. Accordingly you can change the names while importing but you should be sure that these are ones attached with the said VG.

All the best.
Regards,
You need to know a lot to actually know how little you know
kamal_9
Super Advisor

Re: Extending a vg

Hi
One more this i didn't find any directory in the name of my vg inside /dev (which iam going to extend)on the serverB.the vg is controlled by cluster .And i thnk the cluster is tested already.is itrequired to use mkdir & mknod
Bharat Katkar
Honored Contributor

Re: Extending a vg

Hi Kamal,
If it was already an part of cluster and if server B was suppose be a failover node for your package then that directory must exist.
Did you do "vgexport vgxx" on server B??

Regards,
You need to know a lot to actually know how little you know
kamal_9
Super Advisor

Re: Extending a vg

Hi
How to see that volume is under cluster control or not .it tried doing more to the pakage cntl file .in that no entries are thr for my vg which iam going to extend ,but entries r thr for other vg
Fred Ruffet
Honored Contributor

Re: Extending a vg

If mount point is part of MC/SG package, mount order should be in package script and not in /etc/fstab. Package_script should be in /etc/cmcluster/package_name/package_name.sh or something like that.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)