How to change the Name of Logical volume in Volume group

24,289

As you seem not interested in useful volume group and volume names (currently your vg is named VolGroup00 and your lv LogVol01), I'll leave these untouched.

So the only need is to change the mount point, so you edit /etc/fstab and change the respective line from pracle to oracle. That is for the next reboot.

Then do

mkdir /u001/app/oracle   # necessary before changes can take effect!
umount /u001/app/pracle  # unmount the old one
mount /u001/app/oracle   # mount it on the new place
rmdir /u001/app/pracle   # and dispose of the garbage.

for cleaning up and for having the changes immediately.


On the long run, it might be useful to at least have useful volume names: that's what lvrename is for. You would do that with

lvrename VolGroup00/LogVol01 oracle

after which an edit of the fstab is necessary again, as the device location changes from /dev/VolGroup00/LogVol01 to /dev/VolGroup00/oracle resp. from /dev/mapper/VolGroup00-LogVol01 to /dev/mapper/VolGroup00-oracle.

Share:
24,289

Related videos on Youtube

OmiPenguin
Author by

OmiPenguin

Proud to be part of Linux Family.

Updated on September 18, 2022

Comments

  • OmiPenguin
    OmiPenguin over 1 year

    I created an LVM and inside that i created Volume Group and within it created Logical Volume and given the mount point /u001/app/pracle I named it wrong instead of ORACLE i it should have been typed PRACLE.

    Now installation of RHEL 5.6 is complete and i noticed it now. How can i change this from /u001/app/pracle to /u001/app/oracle

    DF

  • OmiPenguin
    OmiPenguin over 11 years
    Dear I followed ur instructions but always say that please type correct volume name. This is the command i types LVRENAME VOLGROUP00-LOGVOL01/PRACLE ORACLE What wrong im doing here thanks
  • glglgl
    glglgl over 11 years
    Are you really using uppercase letters? That's not good. Besides, probably you have your LV name different from your mount point name. What do vgs and lvs tell you about their names?
  • glglgl
    glglgl over 11 years
    Ouch, I just saw your screen shot. (Why not just copy & paste text?!) So I'll modify my answer.
  • OmiPenguin
    OmiPenguin over 11 years
    Actually the server access was not allowed from Network team so i had to manually take the picture.
  • OmiPenguin
    OmiPenguin over 11 years
    Great help my friend
  • glglgl
    glglgl over 11 years
    @UmairMustafa Glad I could help