1835986 Members
2122 Online
110088 Solutions
New Discussion

change lvol name

 
Brian Lee_4
Regular Advisor

change lvol name

How can I change lvol name for data, not for vg00 ?
brian lee
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: change lvol name

Brian,

I'm believe you'll have to lvremove/lvcreate.


Pete

Pete
Helen French
Honored Contributor

Re: change lvol name

If you are talking about changing mount_point:

# umount file_system_name
# mkdir /new_name
# mount /dev/vgXX/lvol_name /new_name


If you really want to change the lvol name (eg: /dev/vg01/lvol1), which normally does not do much good, then you need to recreate the LV
Life is a promise, fulfill it!
A. Clay Stephenson
Acclaimed Contributor

Re: change lvol name

Since you mentioned vg00 then you may instead be talking about changing the name of the volume group. In that case, a vgexport, vgimport will be needed. In any event, you can probably achieve your desired resulting whether LVOL or VG by using symbolic links.
If it ain't broke, I can fix that.
Helen French
Honored Contributor

Re: change lvol name

Again, you might also change the lvol name by exporting and importing that particular VG. You may need to export it with a map file and then change the mapfile manually with new names. While exporting, the lvol names will be created in the specified name.

I haven't tried this, but I think it will work.
Life is a promise, fulfill it!
Victor BERRIDGE
Honored Contributor

Re: change lvol name

Hi,
Im not sure I understand what you are after...
If you want to rename some lvol in a non vg00 group, I would choose a safe vgexport -m vgname.map -v , then after editing and changing the lv names, do an vgimport using the modified map file

All the best

Victor
Jeff Schussele
Honored Contributor

Re: change lvol name

Hi Brian,

I agree with Clay - to a point.
IF all you want to change is an LV name, then why take the outage when you can just link (NOT symbolic) a new name to the old in the VG directory? Just remember to link the raw device as well.
Now, where I split from Clay is about VG names. Although you can do the same thing, the system will squawk any time you try to do anything with it because the link name won't be in the lvmtab file and because it's a dir, the link would have to be symbolic.

But this being said, I would still recommend that when you have a normal maintenance outage - get the name changed permanently & get rid of the links.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!