1834232 Members
2841 Online
110066 Solutions
New Discussion

raw volume creation

 
SOLVED
Go to solution
himacs
Super Advisor

raw volume creation

Hi Gurus,

I need a help in creating raw volume.

Db team has a raw volume of 1GB.They dropped the same from DB.They want to delete the same and attach to different DB.

Plz tell me the steps to delete the raw volume and creating a new one.

1. Since raw volume is dropped from DB,we can do the deletion online ?

2. We need to create new raw volume with same size and to be attached with another DB.Can we do it online?

3. Any risk around this?

Quick response is highly appreciated

Regards
himacs
14 REPLIES 14
Ganesan R
Honored Contributor

Re: raw volume creation

Hi Himacs,

Once the raw volume is dropped from the DB, then the data cannot be accessed. If you still need to remove and recreate the raw volume follow these steps.

#lvremove /dev/vgname/lvname

create the raw volume again.

#lvcreate -L -n /dev/vgname
Best wishes,

Ganesh.
himacs
Super Advisor

Re: raw volume creation

Hi Ganesan,

Thanx for the reply..

Can i do it online?

And newfs is required?

and while creating LV ,we need to give 'r' with LV name?

ex: lvcreate -L 1024 -n rvol.dbf /dev/vgdb


regards
himacs
Torsten.
Acclaimed Contributor

Re: raw volume creation

IMHO you can "re-use" the same LV for another DB, so you don't need any lvremove or lvcreate.

"newfs" is not needed since you want to have a "raw" device.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
himacs
Super Advisor

Re: raw volume creation

Hi Torsten,

Thanx for the reply..

Please tell me how to reuse the same with another DB..

and we need to bring down the DB while attaching new raw volume..

regards
himacs
Ganesan R
Honored Contributor

Re: raw volume creation

Hi Himacs,

"newfs" is nothing to do with raw volume. "newfs" is to create filesystem on raw logical volume.

>>and while creating LV ,we need to give 'r' with LV name?<<

No. When you create new LV both block and raw devices will be created.
Best wishes,

Ganesh.
Ganesan R
Honored Contributor

Re: raw volume creation

Hi,

>>Please tell me how to reuse the same with another DB..

and we need to bring down the DB while attaching new raw volume.<<

Just give the name of raw device file name of the lv(Ex:/dev/vg01/rlvol1) to DBA's. They will use that device.

No need to bring down the DB while attaching new raw volumes.
Best wishes,

Ganesh.
Torsten.
Acclaimed Contributor

Re: raw volume creation

I'm not a DBA but I guess when your DB wants to have a raw device you need to specify yours, e.g.

/dev/vgdb/rlvol1

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
himacs
Super Advisor

Re: raw volume creation

Hi Ganesan.Torsten,

Thanx for the replies..

I had a discussion with DB team..

They want to rename the raw volume...

if renaming done we can use the same raw volume with another DB without removing and recreating stuffs..

How to rename the raw volume


Regards
himacs
Lijeesh N G_1
Respected Contributor
Solution

Re: raw volume creation

Hi,

How to rename the raw volume??
==>
#mv

For example,
For renaming a raw volume with the name "rdata" to "rdb" in the volume group vg01,

#mv /dev/vg01/rdata /dev/vg01/rdb

Regards,
LIJEESH N G
Ganesan R
Honored Contributor

Re: raw volume creation

Hi Himacs,

>>How to rename the raw volume<<

LVM will not refer the lv's with it's name. It refer with it's major/minor numbers. So changing the LV name is simple and will not affect anything.

If the lv is not currently used, just follow these steps.

# mv /dev/vg01/lvol1 /dev/vg01/lvdata
# mv /dev/vg01/rlvol1 /dev/vg01/rlvdata

/dev/vg01/lvol1 is an example. Put the appropriate lv names
Best wishes,

Ganesh.
himacs
Super Advisor

Re: raw volume creation

Hi all,

Thanx for the answers..

Now m creating new POA based with raw volume renaming.So that ther is no need of removing and re-creating.

As my server is clustered one,need i change any configurations in /etc/cmcluster/pkg/pkg.sdf.sh ?

As this activity involves big heads in the loop
i want to clear all my doubts..


regards
himacs
Ganesan R
Honored Contributor

Re: raw volume creation

Hi Himacs,

If the raw volume being renamed is part of cluster VG, just edit the paackage control script to reflect the changes. You have to change it under FILESYSTEMS sub-section. Entries will look like this..

LV[0]="/dev/vg01/lvol1"; FS[0]="/u01"; FS_MOUNT_OPT[0]="-o rw"
LV[1]="/dev/vg01/lvol2"; FS[1]="/oraexp"; FS_MOUNT_OPT[1]="-o rw"
LV[2]="/dev/vg01/lvol3"; FS[2]="/archive"; FS_MOUNT_OPT[2]="-o rw"

Note that, you have to make the changes on all the nodes.
Best wishes,

Ganesh.
Mel Burslan
Honored Contributor

Re: raw volume creation

If the raw volume is going to be under cluster control make sure the volume group it sits under, is listed in the cluster config files. Since the volume is going to be raw, you do not need the mess with the [FS} portion of the package control script as the post above suggests.
________________________________
UNIX because I majored in cryptology...
himacs
Super Advisor

Re: raw volume creation

Hi Admins,

Thanx for ur support..

So the activity is very simple..

1. rename raw volume under /dev/vg_db

mv rrdb.dbf rrfs.dbf

Thats all...

/dev/vg_db already mentioned in cluster package script.
So no updation require in package script also
..


regards
himacs