Operating System - HP-UX
1833187 Members
2758 Online
110051 Solutions
New Discussion

Re: Extend Logical volumes

 
SOLVED
Go to solution
Michael Selvam
Occasional Advisor

Extend Logical volumes

Hello

I need a great help from the UNIX experts because in my current project there is no Unix administrator.

Here system is Oracle Parallel Server in HP-UX 11.0 environment (oracle 8.1.6) and database is created in the RAW devices.

For the RAW devices volume group is vgoracle. In the volume group (vgoracle) all oracle datafiles logical volumes were created.

The problem is, for the system datafile the logical volume name is orasystem and the size is 300 MB. I need to increase this the orasystem logical volume from 300MB to 1.5GB or 1GB.

After shutdown the database can I increase the logical volume? If I increase the logical volume is there any possibility of database crush. Now the situation is I should not re-create the database.

Also the below scripts is correct

lvextend -l 1500 /dev/vgoracle/orasystem /dev/dsk/c6t0d0


regards

Michael
7 REPLIES 7
harry d brown jr
Honored Contributor

Re: Extend Logical volumes

Although there is always a possibility of error, I've done countless extends without any issues. Just make sure you have a good backups before starting.

Also, you need to use the UPPER CASE "L" option, not the "lower case" option. The UPPER CASE "L" tells the system to extend the LV in X number of MEGABYTES ie "-L 1500" = 1.5GB. If you use the lower case "l", as in "-l 1500", you will get 1500 * 4MB extents, which is not what you want.
Live Free or Die
A. Clay Stephenson
Acclaimed Contributor

Re: Extend Logical volumes

Hi:

Not quite, use this:
lvextend -L1500 /dev/vgoracle/orasystem

Befor you do this, first do a vgdisplay -v /dev/vgorasystem to make sure that you have enough free extents to extend the logical volume.

The good news is that the operation is safe. Your existing data will not be clobbered.

Clay


If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: Extend Logical volumes

Micheal,

1. Bring down your oracle database. Make sure there are no oracle processes running.
2. If this is a file system, then you need to unmount the file system.
umount /dev/vgoracle/orasystem.

If this is raw, skip this step.

3. Extend the file system

lvextend -L 1500 /dev/vgoracle/orasystem

This will increase the orasystem logical volume to 1.5 GB. If you want to extend it to a specific disk, specify the disk name

lvextend -L 1500 /dev/vgoracle/orasystem /dev/dsk/c6t0d0

-L option is less confusing. You can specify the new size in MBs.

3. Again, if this is a file system, you need to an extendfs

extendfs /dev/vgoracle/rorasystem.

If not ***DO NOT use the above command****

4. If this is a file system, you need to mount it back.

mount /dev/vgoracle/orasystem.

Otherwise, skip this step.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Extend Logical volumes

You did mention that you are using only RAW devices. I think I should go for a coffee now.

After making sure you brought down the database, just use

lvextend -L 1500 /dev/vgoracle/orasystem

or

lvextend -L 1500 /dev/vgoracle/orasystem /dev/dsk/c6t0d0

As you told you don't have an administrator, you can use the above process if you have to extend a file system.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Michael Selvam
Occasional Advisor

Re: Extend Logical volumes

Thanks for your Replies

Here with I am giving the details

1. We are using RAW devices.

2. the vgdisplay result is below
VG Name /dev/vgoracle
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 31
Open LV 31
Max PV 16
Cur PV 6
Act PV 6
Max PE per PV 4331
VGDA 12
PE Size (Mbytes) 4
Total PE 25980
Alloc PE 7665
Free PE 18315
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

3. the vgdisplay -v reslut is

--- Physical volumes ---
PV Name /dev/dsk/c6t0d0
PV Name /dev/dsk/c4t0d0 Alternate Link
PV Status available
Total PE 4330
Free PE 2991
Autoswitch On

PV Name /dev/dsk/c6t0d1
PV Name /dev/dsk/c4t0d1 Alternate Link
PV Status available
Total PE 4330
Free PE 3314
Autoswitch On

PV Name /dev/dsk/c6t0d2
PV Name /dev/dsk/c4t0d2 Alternate Link
PV Status available
Total PE 4330
Free PE 3066
Autoswitch On

PV Name /dev/dsk/c6t0d3
PV Name /dev/dsk/c4t0d3 Alternate Link
PV Status available
Total PE 4330
Free PE 3314
Autoswitch On

PV Name /dev/dsk/c6t0d4
PV Name /dev/dsk/c4t0d4 Alternate Link
PV Status available
Total PE 4330
Free PE 2316
Autoswitch On

PV Name /dev/dsk/c6t0d5
PV Name /dev/dsk/c4t0d5 Alternate Link
PV Status available
Total PE 4330
Free PE 3314
Autoswitch On

I am expecting your valid response

Thanks & Regards

Michael
linuxfan
Honored Contributor

Re: Extend Logical volumes

Hi Michael,


Looks like you have enough free extents so you should be ok to extend your filesystem.

Shutdown oracle
lvextend -L 1536 /dev/vgoracle/orasystem
lvdisplay /dev/vgoracle/orasystem
Start Oracle

Here is used 1536 because 1.5GB*1024=1536MB
lvdisplay is to check the LV size has been increased.

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Michael Selvam
Occasional Advisor

Re: Extend Logical volumes

Thanks everyone....I tried it, and it works.

Regards

Michael selvam