LVM and VxVM
cancel
Showing results for 
Search instead for 
Did you mean: 

Extend LV under Oracle ASM.

 
Wivo
Occasional Advisor

Extend LV under Oracle ASM.

Hi ,

How we can increase the size of an LV  which is under Oracle ASM by adding a new disk .

I  need the information like task for system admin and dba.

 

 

4 REPLIES 4
Matti_Kurkela
Honored Contributor

Re: Extend LV under Oracle ASM.

Sysadmin:

  1. Connect the new disk physically, or have a SAN administrator present a new LUN.
  2. Make the disk visible to the system: "ioscan -fnCdisk", then "insf" in HP-UX 11.23 and older, or "ioscan -fnNCdisk" in 11.31.
  3. pvcreate the disk
  4. join the disk in the appropriate VG with "vgextend <VG> <new PV>"
  5. extend the LV with "lvextend -L <new size> <LV>"
  6. tell the DBA that the sysadmin tasks of the extension are done and DBA task can begin

DBA:

  1. run an ALTER DISKGROUP <diskgroupname> RESIZE statement. See this link for more info: http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_1006.htm
  2. Task complete!
MK
Wivo
Occasional Advisor

Re: Extend LV under Oracle ASM.

Hi MK,

 

Thanks for your reply.

 

Do we need to  execute the vgextend/lvextend command only on  single node?

How does the second system know about the new changes?

DO we need to down the package/cluster during this activity?

 

And one more  query, how can we understand the RAC is using ASM over raw device or ASM over SLVM?

 

Thanks & Regards

Wivo

Matti_Kurkela
Honored Contributor

Re: Extend LV under Oracle ASM.

You did not say you were asking about a cluster! And not just a failover cluster, but a RAC...

 

If this is a Oracle RAC using ASM over raw device, only sysadmin steps 1 and 2 in my previous message are appropriate: the rest of the procedure will be different. The only remaining sysadmin step would be to assign permissions to the raw device so that ASM can access it.

 

If this is ASM over SLVM, the basic procedure is similar to my original message, but some extra steps are required in between the sysadmin steps I already listed...

 

Step 2.5: make sure the new disk is visible on all nodes (repeat steps 1 and 2 on each node if necessary).

 

Step 3 as in my previous message.

 

Step 3.1: stop the database (halt the package, if Serviceguard is involved) in all nodes except one (from this point, I will call this "the active node"). Now the database should be running on the active node only: on the other node(s), the database should be stopped and VG deactivated. If Serviceguard is used, halting the package on the node should do all this automatically.

 

Step 3.2: Switch the VG activation from shared mode to exclusive mode on the active node:

vgchange -a e <VG>

 

Steps 4 and 5 as in my previous message.

 

Step 5.1: create a new map file on the active node, using the vgexport command in preview mode:

vgexport -v -s -p -m <VG>.map <VG>

 Step 5.2: move the map file to the other node(s).

 

Step 5.3: on each non-active node, export the package VG and re-import it using the new map file. Remember to keep the same minor device number:

ll /dev/<VG>/group # to identify the device number
vgexport <VG>
mkdir /dev/<VG>
mknod /dev/<VG>/group c 64 0xNN0000 # use the same numbers as originally listed

vgimport -v -s -m <VG>.map <VG> # on HP-UX 11.23 or older
or
vgimport -v -s -N -m <VG>.map <VG> # on HP-UX 11.31

This will tell the other node(s) that the VG has been extended.

 

Step 5.4: this would be a good time for the DBA to make sure the ASM on the active node can see the increased disk space. I think it would be possible to do the ASM resize operation at this point.

 

Step 5.5: on the active node, switch the VG back to shared mode:

vgchange -a s <VG>

 Step 5.6: if Serviceguard is involved, restart the package on the other node(s). This should automatically activate the VG in shared mode on the node(s) and start the database on the node(s). If no Serviceguard, the same must be achieved in some other way.

 

Step 6 as in my previous message.

 

DBA steps: see sysadmin step 5.4.

 

 

As you can see above, the database does not need to be completely shutdown, but it needs to go to single-node operation for a while.

 

To see what kind of devices the ASM is using, check the ASM configuration parameter ASM_DISKSTRING. If it says something like "/dev/<VG>/*", it's ASM over SLVM; if it says something like "/dev/rdisk/disk*" (on HP-UX 11.31) or "/dev/rdsk/*" (on HP-UX 11.23 or older), it's ASM over raw devices.

MK
Highlighted
Wivo
Occasional Advisor

Re: Extend LV under Oracle ASM.

Hi Mk,

 

Yes..I forgot to say these are in Cluster. Really sorry... .

 

Thanks for your detailed reply.

 

..wivo