Re: how to change LV name

 
sahaj bahra
Frequent Advisor

how to change LV name

Can anybody help me changing the Logical Volume name without unmounting filesystem.
3 REPLIES 3
Jollyjet
Valued Contributor

Re: how to change LV name

Hi sonal,

Renaming a LV is nothing but you are mounting a lv in a different mount point this can be done after unmounting the file system and create a new mount point and rename it and make the entries in /etc/fstab.
sahaj bahra
Frequent Advisor

Re: how to change LV name

thanks
mobidyc
Trusted Contributor

Re: how to change LV name

Hello,

you have a workaround:

look at the major/minor number of your special file.
# cd /dev/vg00
# ls -l lvol4 rlvol4
brw-r----- 1 root sys 64 0x000004 Mar 13 08:56 lvol4
crw-r----- 1 root sys 64 0x000004 Mar 13 08:56 rlvol4

create a new special file wiht these major/minor numbers
# mknod name_wanted b 64 0x000004
# mknod rname_wanted c 64 0x000004

verify
# ls -l name_wanted rname_wanted
brw-r--r-- 1 root sys 64 0x000004 Apr 11 10:15 name_wanted
crw-r--r-- 1 root sys 64 0x000004 Apr 11 10:16 rname_wanted

modify your /etc/fstab according the new name

at the next reboot, the lvols indicated in your /etc/fstab will be mounted et you'll can delete the old special files.

you can also schedule an intervention for unmounting/remounting these filesystems

Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard