Operating System - HP-UX
1833883 Members
2039 Online
110063 Solutions
New Discussion

how can I extend cluster file system online

 
SOLVED
Go to solution
Safarali
Valued Contributor

how can I extend cluster file system online

Hi experts
how can I extend one file system it is part of cluster MC serviceGuard
I added the disk from EVA
the following step
pvcreae the new disk
vgextend
lvreduce for removing mirror
then lvextend
then extendfs
is it correct
shall I need to vgexport and imprt
please provide detail step

Regards
Safar
22 REPLIES 22
freddy_21
Respected Contributor

Re: how can I extend cluster file system online

hello safar,

Is your system have mirror software and mirror configuration for share disk?

is your system have online JFS? the software to extend logical volume with online. without that software u must shutdown your cluster.

this is the prerequisite to create detail step.

thanks
Freddy
Safarali
Valued Contributor

Re: how can I extend cluster file system online

Fredy,
Thanks for your immediate response
please see below the out put from swlist
swlist -l product | grep -i jfs
JFS B.11.23 The Base VxFS File System
OnlineJFS B.11.23.0609 Online features of the VxFS File System
OnlineJFS01 4.1.008 Online features of the VxFS File System
PHKL_34179 1.0 JFS3.5 DIO performance; extent rollback
I think I have online JFS

hoping your immediate response
Rasheed Tamton
Honored Contributor

Re: how can I extend cluster file system online

Hi,

You have online jfs

Can you give us a
lvdisplay output of the lvol you are trying to extend.

e.g.,
lvdisplay /dev/vg00/lvol1
freddy_21
Respected Contributor

Re: how can I extend cluster file system online

Hello Safar, i assumed that your cluster conf not have mirroring configuration.

you want add new disk at existing volume group ex:
the vg is : vg01
the lvol is :lvol1
new disk is: c10t1d0
mount point is : /data1.
before size for lvol1 is: 10 GB
after extend is : 15 GB.

the step must do at server A are:
1. pvcreate -f /dev/rdsk/c10t1d0
2. vgextend /dev/vg01 /dev/dsk/c10t1d0
3. lvextend -L 15000 /dev/vg01/lvol1
4. fsadm -b 15000M /data1
5. check with bdf command already change to be 15 GB?


after that do export and import disk to another node

1. the step must do at server A:
vgexport -v -s -p -m vg01.map vg01

2. copy vg01.map to server B at /tmp

3. At server B run :
ll /dev/vg01 ( check minor number for vg01. ex : 0x010000)
vgexport vg01
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgimport -v -s -m /tmp/vg01.map vg01
check /etc/lvmtab. make sure vg01 already change.



that is the step that i know.

thanks
freddy




Safarali
Valued Contributor

Re: how can I extend cluster file system online

Hi Rasheed
Below will be the output of lvdisplay

Regards
Safar

lvdisplay /dev/vgsapdata7/lvsapdata7
--- Logical volumes ---
LV Name /dev/vgsapdata7/lvsapdata7
VG Name /dev/vgsapdata7
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 51184
Current LE 3199
Allocated PE 6398
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
Safarali
Valued Contributor

Re: how can I extend cluster file system online

Fredy
Thanks for your response
I have some more doubts
why i need to create volume group on second node
because volume group is already part of the cluster,
I am copying map file using rcp, then I assume I need to run vgimport is it correct

Regards
Safar
freddy_21
Respected Contributor

Re: how can I extend cluster file system online

Hello safar.

not create the volume group but import volume group. This is for consistency,

Server A have new disk, but at server B we still have the old one. so you need update volume group configuration with vgexport and import.


thanks
Freddy
Mridul Shrivastava
Honored Contributor

Re: how can I extend cluster file system online

Hi,

If you are extendinf fs while adding a new disk then you have to halt the package which contains that VG. since disk information has to be populated on other nodes of the cluster then you have to run cmcheckconf so binary configuration file is aware of the changes.

However if we are extending fs but not adding any physical disk/ LUN then it is not required to update lvmtab and this can be done without halting the package..

NOTE: Only package needs to ne halted, there is no need to halt the cluster.
Time has a wonderful way of weeding out the trivial
Safarali
Valued Contributor

Re: how can I extend cluster file system online

Let me clarify more
I added one disk from EVA 100 GB
and another disk from second EVA with Same LUN number, it will be the mirror of the first EVA disk both of them have Raid 1 configuration

so What I am going to do is
vgextend
lvextend
lvreduce
extendfs
vgexport
from second node
vgimport
my confusion is shall i need stop the package
and do the vgcreate again in the secondary node

Regards
Safar
san.sa
Advisor

Re: how can I extend cluster file system online


Hi Safer ,
Below is the step by Step procedure to add disk on a VG holding the cluster package

On Node 1

node1#cmhaltpkg -v package_name
node1#vgchange â a e vg01
node1#pvcreate -f /dev/rdsk/cxtxdx
node1#vgextend /dev/vg01 /dev/dsk/cxtxdx
node1#vgexport -v -s -p -m vg01.map /dev/vg01
node1#scp -p vg01.map node2:/tmp/vg01.map

On Node 2

node2 #ls â la /dev/vg01/group ----> Note down minor number (say 0x010000)
node2#vgexport vg01
node2#mkdir /dev/vg01
node2#mknod group c 64 0x010000
node2# vgimport â v â s â m /tmp/vg01.map /dev/vg01 --> import the VG in node2
node2#vgchange â a r /dev/vg01 --->Read only mode mount
node2#vgdisplay â v /dev/vg01
node2#vgchange â a n /dev/vg01
#cmrunpkg â v â n node1 package_name


Regards

Anish
Mridul Shrivastava
Honored Contributor

Re: how can I extend cluster file system online

vgcreate on secondary node won't be required in any case. you said that its the same LUN which means from server side ioscan won't be shwoing new device file for the disk since we have presented a LUN..
In this case it won't be required to halt the package or to do vgimport/vgexport..

Package halt, vgimport & vgexport is required only when we are adding a device file to the existing vg.. this case you don't have to execute pvcreate also since that LUN is already part of VG and from server we can see only LUN's... not the physical disk..

Hope this helps.
Time has a wonderful way of weeding out the trivial
Safarali
Valued Contributor

Re: how can I extend cluster file system online

Srivastava,
Thanks for your comments

The current scenario is
I added a new disk from eva having lun number 24
and also added another disk from eva 2 to the same system same lun number for mirroring
now next step is I want to add this disk to existing volume group say vgoracle
I will do the following ste

Pvcreate
vgextend
lvextend
fsadm
vgexport
and vgimport
Still I am confusing shall I need to stop the package
and why I need to create new vgcreate on second node volume group is already the part of the cluster

Regards
Safar
Mridul Shrivastava
Honored Contributor

Re: how can I extend cluster file system online

Hi Safar,

I still don't have answer's to my question. If you run ioscan -fnCdisk then is it showing any new device files for the disk added to the existing LUN, as per my understanding it should not.

So from OS side there is nothing we are adding to the vg and all the device files under this vg will remain unchanged. Hence you don't have to do vgcreate or pvcreate.. you could just extend lv and then extend fs using online jfs and package need not to be halted.
Time has a wonderful way of weeding out the trivial
Safarali
Valued Contributor

Re: how can I extend cluster file system online

Hi Srivastva
I checked the system two unused disk found
I am adding this disk to existing volume group

so I should do the pvcreate and vgextend is it correct

Regards
Safar
Rasheed Tamton
Honored Contributor

Re: how can I extend cluster file system online

Hi Safar,

You did not give the lvdisplay output

Make a full backup including ignite before the activity

-did you check whether you can see the new disks from both nodes
-you have to stop the package
-pvcreate
-vgextend
-lvextend
-extendfs (the package is down)
-vgexport
-rcp/scp the map to the other node
vgimport

Regards.
Rasheed Tamton
Honored Contributor

Re: how can I extend cluster file system online

>You did not give the lvdisplay output

Oops. I saw the lvdisplay output. You are using strict allocation policy.
Safarali
Valued Contributor

Re: how can I extend cluster file system online

I checked both nodes I saw unused disk on both nodes with same lun number
I used SAM to view the disk
is any command can view the unused disk using ioscan
ioscan funC disk only showing claimed disk

Regards
Safar
DuKul
Regular Advisor
Solution

Re: how can I extend cluster file system online

Yes there is a way.

First try to get the information about presented LUNs from EVA, which you will use as PVs by evainfo tool http://storagetools.lvld.hp.com/Eva/EVAInfo/download.asp

You should then use "ioscan -fn" so to scan the buses and seel all available HW to the server - the paths to your EVA LUNs included.
Then you need to issue "insf -e" or "insf -eCdisk" to acquire the device files for the paths from server to EVA's LUNs.

The you will make PVs and extend the shared cluster VG with those PVs.

However in the case of the shared cluster volume group you should do:

1. on the node where the VG is activated at the moment:
"vgexport -v -p -s -m $MAPFILE $VG_NAME"
(this will export the vg **without** removing the VG)
2. on the node where the VG is not activated at the moment but it should be in the case of a failover to this node:
"vgimport -v -s -m $MAPFILE $VG_NAME"

=> by this you will have the same information for your VG on both (all) the nodes of the cluster

Then you can extend the LVOL on which your FS resides and then the FS itself.
It could be good to defragment the FS before extending by "fsadm -F vxfs -d -D -e -E $FileSystem_NAME", but this is just a tip.
Safarali
Valued Contributor

Re: how can I extend cluster file system online

Thanks for the help of all experts

Regards
Safar
Safarali
Valued Contributor

Re: how can I extend cluster file system online

I got the solution
Thanks the support of all experts

Safar
Fateh Malik
Advisor

Re: how can I extend cluster file system online

Hi Safar,

Since I am new to this field and having the cluster enviroment, May I know the step by step procedure you followed for extending the file system. this will help me in future if needed.
thanks
Daniel Anthony
New Member

Re: how can I extend cluster file system online

Hi Malik,

If you are adding disks for file system extension

On Primary node
1)add disks to the vg on which the fs resides.
2)extend lv to required size.
3)use fsadm command to extend the fs.
4)export vg in preview mode using
"vgexport -p -s -m mapfile vgname
5)copy the mapfile to failover node

On Failover node

1)take a backup of /etc/lvmpvg file.
2)export the vg using vgexport
3)then create the directory for the vg using
"mkdir /dev/vgname"
4)then create the group file using
"mknod /dev/vgname/group c 64 minorno"
(note minor number for the vg on the primary and the failover node should be same)
5)import the vg definition from the mapfile using vgimport
6)restore the /etc/lvmpvg file.
7)add the new disks on the /etc/lvmpvg file under the vg.

If no disks are added to extend the file system use lvextend to extend the lv and fsadm to extend the fs.