Operating System - HP-UX
1751976 Members
4619 Online
108784 Solutions
New Discussion юеВ

Re: Recreating Logical Volumes

 
Steve Lamont_1
Occasional Advisor

Recreating Logical Volumes

Hi,

I am trying to recreate all of the logical volumes within a vg, to do this i first need to remove all of the lv that have previously been created.
The lv's are to be used in a Clustered Oracle 9i RAC env

the /dev/vg52 directory contains files as follows:
brw-r----- 1 oraswuat dba 64 0x130028 Oct 31 12:02 rlv_undo_SWUAT01_a
crw-r----- 1 root sys 64 0x130028 Oct 31 12:02 rrlv_undo_SWUAT01_a

for each raw device

when i issue
lvremove -f /dev/vg52/lv_undo_SWUAT01_a

the rlv* and any lv* devices are removed but the rrlv device (which is the character device) does not get removed

Does any one know why and how to tremove this device.

(Yes I know that the rrlv device is the character device required for a raw volume device but this would meen having to change ALL the creation and management scripts I have writen and migrated from an other instance

8 REPLIES 8
Dietmar Konermann
Honored Contributor

Re: Recreating Logical Volumes

If you have rlv_undo_SWUAT01_a and rrlv_undo_SWUAT01_a, then your lv name is rlv_undo_SWUAT01_a.

You need to use:

lvremove -f /dev/vg52/rlv_undo_SWUAT01_a
rlv* is your block special and rrlv* is your character special. The lv name always matches the block special.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Steve Lamont_1
Occasional Advisor

Re: Recreating Logical Volumes

on another instance the character device is rlv* and the block device is lv*,

but that does'nt answer why does not a lvremove remove the rrlv charater device?
Pete Randall
Outstanding Contributor

Re: Recreating Logical Volumes

Steve,

If you're going to re-create all of them, why not just export the vg the re-build it?

Pete

Pete
Steve Lamont_1
Occasional Advisor

Re: Recreating Logical Volumes

vgexport and vgimport would be good choices if I didn't have to resize the lv's and add new lv's at the same time.

Thanks anyway.
Rajasekhar Raman
Frequent Advisor

Re: Recreating Logical Volumes

Looks like there is a confusion with naming here. How many LVs did you have on this VG.

If you tried to remove lv_undo_SWUAT01_a, then it would have removed that and the rlv_xxxx.

If your lvol is called rlv_undoxxx then it will remove that and rrlv_xxx when you type lvremove -f rlv_undoxxx.

Each lvol has only the character and raw device associated with it. So yes, only the lv and rlv will get removed..where and how did you create the rrlv* device???
(It would seem that is associated with a character device rlv* )

=Shekar
Pete Randall
Outstanding Contributor

Re: Recreating Logical Volumes

Steve,

What I was suggesting was to do a vgexport to get rid of the existing lvm structures without having to mess with lvremove, etc. Then do a pvcreate with a -f option and start over with vg/lv creation. I don't have a playpen available to me at the moment to prove whether it would work or not but I **think** it would.

Pete

Pete
Oleg Zieaev_1
Regular Advisor

Re: Recreating Logical Volumes

Hello.

You may be concidefing using vgexport to delete information about your volume group:
vgexport /dev/VG_NAME
Then re-create your lvols as you see fit.

And, yes I agree with confusion you have in lvol names. We use raw devices as well. Names of lvols are without r, owned by root:bin.
Names for oracle raw devices are preceded with 'r' by unix; we own them by oracle:dba.

Hope this helps.
0leg
Professionals will prevail ...
Steve Lamont_1
Occasional Advisor

Re: Recreating Logical Volumes

sorry about the delay in getting back to you all, and thanks for your assistance.

I finally vgexported the vol group, and pvcreated the LUN then reimported the vol group, there seemed to have been a bit of confusion by the enginneer when he set up the lun/vg in the naming convention for the lv's
i manaually moved the rrlv_**** and rlv_***** to the standard naming convention.



thanks for your help.