Operating System - HP-UX
1833053 Members
2679 Online
110049 Solutions
New Discussion

Re: how to rename raw logical volume

 
Christian Marquardt_1
Regular Advisor

how to rename raw logical volume

Hi,
I need to rename a logical volume. This volume is a rawdevice for a oracle database. It isnt connected to the db and it's empty this time. How can I rename the LV? This is an MC/ServiceGuard Cluster environment.

regards
Christian
8 REPLIES 8
Robert-Jan Goossens
Honored Contributor

Re: how to rename raw logical volume

Hi Cristian,

renaming a unused logical volume is not a problem, you can just move them to a new name.

example vg01 lvol1
# umount /dev/vg01/lvol1
# cd /dev/vg01/
# mv rlvol1 roralv1
# mv lvol1 oralv1
create a backup of your volumegroup information
# vgcfgbackup vg01

As for ServiceGuard I can not find any info at this moment.

Hope this helps,
Robert-Jan
Robert-Jan Goossens
Honored Contributor

Re: how to rename raw logical volume

add on:

In my above info I forgot to mention that you need to update the /etc/fstab.

serviceguard info
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1004335

Regards,
Robert-Jan
Sundar_7
Honored Contributor

Re: how to rename raw logical volume

Hi Christian,

If it is not currently being used, then you can simply rename the character and block device file of the LV in the VG directory

# mv /dev/vgname/lvname /dev/vgname/newlvname
# mv /dev/vgname/rlvname /dev/vgname/rnewlvname

Now if the VG that contains this raw LV is part of the cluster, then you will need to execute the same commands on all the nodes that will activate the VG.

Hope this helps

Sundar.


P.S: you would not need to update the /etc/fstab or umount for a raw logical volume.
Learn What to do ,How to do and more importantly When to do ?
Steven E. Protter
Exalted Contributor

Re: how to rename raw logical volume

Shalom,

the mv command both in the rdsk and dsk section does the trick.

Then back up the volume group configuration.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: how to rename raw logical volume

And don't over look the obvious answer of simply creating symbolic links.
If it ain't broke, I can fix that.
Jimmy Rogers
Frequent Advisor

Re: how to rename raw logical volume

What if you need to rename an LV that has data in it?
Sandman!
Honored Contributor

Re: how to rename raw logical volume

If it has data in it then first unmount the lvol and then rename using the mv command. In non MC/SG environments update /etc/fstab and in MC/SG env update the pkg control script, ex. /etc/cmcluster/pkg/pkg.sh, so that the mount point information is reflected accurately otherwise the pkg will fail to start.
A. Clay Stephenson
Acclaimed Contributor

Re: how to rename raw logical volume

An LVOL always has data -- even if that data are a bunch of zeroes. That really has no bearing on the answer although if a database or other application expects a particular name then it's going to fail if not found. Symbolic links really address the problem quite well --- especially if the same LVOL might have more than one name from the standpoint of multiple applications.
If it ain't broke, I can fix that.