Operating System - HP-UX
1833780 Members
2623 Online
110063 Solutions
New Discussion

Extend a VG online, with online JFS

 
SOLVED
Go to solution
N Ward
Regular Advisor

Extend a VG online, with online JFS

Hi, we have a plan to extend a redo log area in a Production Cluster (Primary, Standby setup). The LUN has been presented and we are ready to do the work.

Because we have online JFS I can do the vgextend, lvextend and fsadm online with no interruption, however what about letting the standby node know about the new PV in the volume group? I can't import on the secondary node without stopping the primary.. Is there a way to make sure the Standby node is aware of the PV for failover?
22 REPLIES 22
Sunny123_1
Esteemed Contributor

Re: Extend a VG online, with online JFS

Hi

Just import the VG on secondary node.It is the good way to Standby node to avare of PV for failover

Regards
Sunny
Rita C Workman
Honored Contributor

Re: Extend a VG online, with online JFS

When you say vgextend...you are implying you are adding new disk. Otherwise you'd just be lvextending.

So, make sure that your secondary nodes can "see" the new disk. i.e. the new disk is masked to the secondary nodes.

Do your extend on the primary production server, and create new mapfiles for the volume group.
Then as was just mentioned, do the vgimport steps on the secondary nodes.
i.e. vgexport /dev/vgname
mkdir /dev/vgname
mknod /dev/vgname/group c 64 0x--0000
vgimport -vs -m /etc/lvmconf/vgname. /dev/vgname

Regards,
Rita
Ganesan R
Honored Contributor

Re: Extend a VG online, with online JFS

Hi,

>>>I can't import on the secondary node without stopping the primary.<<<<

Why do you think so? If the lun is presented to both the nodes, you can take the map file by exporting the VG in preview mode and import the vg information on standby node using the map file.

No need to down the primary to take the map file. Just export the vg in preview mode. Preview mode does not export the vg. It just creates the map file.
Best wishes,

Ganesh.
N Ward
Regular Advisor

Re: Extend a VG online, with online JFS

Thanks, I was just concerned that I couldn't import on the Secondary node without the Primary being exported. I guess thats not the case.

So map file created on Primary (with export) and copied over to Secondary node where the import is run. Primary is not affected by this.
Lijeesh N G_1
Respected Contributor
Solution

Re: Extend a VG online, with online JFS

Hi,

You can do it without stopping the primary node,but note that, ensure you are
exporting/Importing the VG in ***preview mode***. Steps are follows,


1) Ensure the LUN is visible and accessable from both the nodes.
2) Extend the VG in Node1.
3) Export the VG configuration in preview mode,
#vgexport -p -s -m
4) Copy to Node2.
#scp Node2:/tmp
5) Import VG in Node2 in preview mode
#vgimport -p -s -m


Regards,
LIJEESH N G
Sunny123_1
Esteemed Contributor

Re: Extend a VG online, with online JFS

Hi

Yes you are right Ward.


Regards
Sunny
N Ward
Regular Advisor

Re: Extend a VG online, with online JFS

Thanks all, its clear now...
N Ward
Regular Advisor

Re: Extend a VG online, with online JFS

Having just carried out this work. When importing on the Secondary node the /etc/lvmtab hasn't been populated, how will node two know aobut the devices ( or how will I get it know about them? )
Michal Kapalka (mikap)
Honored Contributor

Re: Extend a VG online, with online JFS

hi,

Having just carried out this work. When importing on the Secondary node the /etc/lvmtab hasn't been populated, how will node two know aobut the devices ( or how will I get it know about them? )

the disks( LUNS ) must be presented on both nodes, and if you are using the vgexport with the -s option them the vgimport will be made with the vgid.

of course you need to make ioscan and them insf to see the special files on the server.


mikap
Ganesan R
Honored Contributor

Re: Extend a VG online, with online JFS

Hi Again,

I suspect that you have imported in preview mode on secondary. is it?

You have to import it in normal mode not the preview mode.

#vgimport -v -s -m vgname
Best wishes,

Ganesh.
Stephan.
Honored Contributor

Re: Extend a VG online, with online JFS

N Ward
Regular Advisor

Re: Extend a VG online, with online JFS

ioscan and insf been done, tried it in preview and 'proper' mode (without the -p) and still nothing extra in /etc/lvmtab. Output says "Beginning import... blah blah" then "Volume group already in /etc/lvmtab"
Michal Kapalka (mikap)
Honored Contributor

Re: Extend a VG online, with online JFS

hi,

of couse because the vg is there alredy.

the cluster was configured a nd the vg was imported to both nodes.

mikap



Ganesan R
Honored Contributor

Re: Extend a VG online, with online JFS

Hi,

>>>Output says "Beginning import... blah blah" then "Volume group already in /etc/lvmtab"<<<

As per this message, vg is already there in lvmtab file.

Can you post the volumegroup names you are trying to import and #strings /etc/lvmtab output from secondary node ?
Best wishes,

Ganesh.
N Ward
Regular Advisor

Re: Extend a VG online, with online JFS

"of couse because the vg is there alredy.

the cluster was configured and the vg was imported to both nodes"


I'm aware of this, I was just providing the text output, but that is all I get, /etc/lvmtab does not get updated.
Michal Kapalka (mikap)
Honored Contributor

Re: Extend a VG online, with online JFS

ok check if the vg that you like to import is in the /etc/lvmtab.


mikap
N Ward
Regular Advisor

Re: Extend a VG online, with online JFS

"ok check if the vg that you like to import is in the /etc/lvmtab"

It is already there, with the unextended set of devices..

I can get a strings of /etc/lvmtab off but it will take a while due to the nature of the system.

Ganesan R
Honored Contributor

Re: Extend a VG online, with online JFS

Hi,

If you are not providing the output we asked, it is little difficult to help you out. We are interacting through forum. So it is not possible to understand the issue correctly unless you provide all the necessary details.

ok. back to your reply.
>>"of couse because the vg is there alredy.
the cluster was configured and the vg was imported to both nodes"<<

Does current lvmtab file has entry about the vg or not? Or provide the exact steps you followed starting from exporting on primary node to importing on alt node.
Best wishes,

Ganesh.
N Ward
Regular Advisor

Re: Extend a VG online, with online JFS

Hi I appreciate the help and I haven't said I won't get the input, I'm just explaining that its difficult due to the security of the system.

Yes, the vg is in the /etc/lvmtab on both nodes. On the Primary node it has the newly added devices too, on the Standby node following the import, it does not have the extended devices.

I will try and get the info off and update the forum later.

Process followed..

Extend VGs on Primary, extend LVs, fsadm on mount points. Create map file

# vgexport -p -s -m /tmp/redo1.map /dev/vg_ora_coredb_redo1

Copy map file to Secondary node.
ioscan and insf -e on secondary node.

# vgimport -s -m -v /tmp/redo1.map /dev/vg_ora_coredb_redo1
Ganesan R
Honored Contributor

Re: Extend a VG online, with online JFS

Hi Again,

OK. I think we found out the steps we missed.

What we missed out is, before importing on secondary node, you need to export the vg on secondary node. This will remove the old configuration and allow us to import it with new configurations.

Follow these steps on secondary node.

Note down the minor number of volume groups to be exported and then imported.
#ll /dev/vgname/group
Exm:
# ll /dev/vg01/group
crw-r--r-- 1 root sys 64 0x010000 Jan 28 2005 /dev/vg01/group


#vgexport -v vgname
#mkdir vgname
#mknod /dev/vg01/group c 64
Exm:
#mknod /dev/vg01/group c 64 0x010000

#vgimport -v -s -m vgname
Best wishes,

Ganesh.
Sunny123_1
Esteemed Contributor

Re: Extend a VG online, with online JFS

Hi

You are right

But first if the vg is there in secondary then export it.Create an vg directory under /dev then create map file and then import the vg.


Regards
sunny
N Ward
Regular Advisor

Re: Extend a VG online, with online JFS

Hi, the export did the trick, thanks "Ganesan R" All ok now, all devices in /etc/lvmtab, noted for the future :)