Operating System - HP-UX
1832983 Members
3017 Online
110048 Solutions
New Discussion

Re: Changing an the name of an lv that is mounted via package startup

 

Changing an the name of an lv that is mounted via package startup

I would like to rename a lv that is mounted via package startup. I believe that the only way you could do this is to stop the package which umounts all of the lv's in the cntl file, but I wanted to be sure.

Any suggestions?
If I can't be part of the Greatest, I just have to be the Greatest myself!
5 REPLIES 5
linuxfan
Honored Contributor

Re: Changing an the name of an lv that is mounted via package startup

Hi Michael,

stop the package (cmhaltpkg)
Rename the LV ( mv /dev/vg??/lv?? /dev/vg??/lvnew??
mv /dev/vg??/rlv?? /dev/vg??/rlvnew??)

Modify the package control script to indicate
the new LV,

start the package (cmrunpkg)

I don't believe you need to reconfigure the cluster for the LV name change

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
linuxfan
Honored Contributor

Re: Changing an the name of an lv that is mounted via package startup

Oh btw, make sure you change the LV name on all the nodes in the cluster

-Regards
Ramesh
They think they know but don't. At least I know I don't know - Socrates
David Navarro
Respected Contributor

Re: Changing an the name of an lv that is mounted via package startup

I think you can do it renaming lvol and rlvol file in /dev/vg directory, I tested it with out cluster, and bdf retains original name, but it works. If you want to be sure, you can create a new package and create a new small file system and test it. Of course, modify config files for correct workig in next startup of package.
In this situation, I will choose change config files and reboot package, is very fast and most secure and supported.

Good Luck
David Navarro
Respected Contributor

Re: Changing an the name of an lv that is mounted via package startup

Hi again, Ramesh metod is more secure, as I explained before...
If you chane lvol name you must not reconfigure cluster, of course, rename lvol in all nodes and copy modified files in all nodes also.
Sanjay_6
Honored Contributor

Re: Changing an the name of an lv that is mounted via package startup

Hi,

Shudown the package,
cmhaltpkg -v pkg_name

Reneame the lv files
mv /dev/vg_name/lv_old /dev/vg_name/lv_new
mv /dev/vg_name/rlv_old /dev/vg_name/rlv_new

edit the package control file to reflect this change
vi /etc/cmcluster/pkg_name/pkg_control_file

Activate the vg to take a conf backup for the vg
vgchange -a e /dev/vg_name

do a vgcfgbackup for this vg
vgcfgbackup -f /tmp/vg_name.conf /dev/vg_name

Deactivate the VG
vgchange -a n /dev/vg_name

using "vgcfgrestore" Replicate this change in VG configuration to other nodes where this package gets activated. Remember you may have to activate the VG on that node, do vgcfgrestore and deactivate the VG.

Once done, start the package on the node you want
cmrunpkg -v pkg_name

Enable package switching
cmmodpkg -e pkg_name

Check everything is working okay
cmviewcl -v

Hope this helps.

thanks