1825716 Members
3091 Online
109686 Solutions
New Discussion

renaming logical volumes

 
SOLVED
Go to solution
Wessel Baptist
Advisor

renaming logical volumes

Hi,

is it possible to rename a logical volume under HP-UX 10?

Thanks already.
logics take you from A to B, imagination takes you anywhere
6 REPLIES 6
John Palmer
Honored Contributor
Solution

Re: renaming logical volumes

Yes, no problem.

Make sure it's not in use, unmount it if it's a filesystem then rename both the character and block device files in /dev/vg?

Edit /etc/fstab if necessary.
Tim Malnati
Honored Contributor

Re: renaming logical volumes

An added item to John's solution. /etc/lvmtab is no longer valid and needs to be rebuilt. Move the existing file with something like 'mv /etc/lvmtab /etc/lvmtab_beforechange'. Then perform a 'vgscan' to rebuild /etc/lvmtab. After this is done perform a 'vgcfgbackup' to get everything in order.
John Palmer
Honored Contributor

Re: renaming logical volumes

Tim,

Renaming the logical volumes does not affect /etc/lvmtab in any way. lvmtab only holds details of the volume groups and which disks they consist of.

The ONLY place in the system that defines the volume number within the volume group is the device file in /dev/vg??.

Wessel Baptist
Advisor

Re: renaming logical volumes

John, your answer works fine, thanks! But does vgcfgbackup add any security?
logics take you from A to B, imagination takes you anywhere
John Palmer
Honored Contributor

Re: renaming logical volumes

Not in this case because nothing has changed within the volume group itself. All that you've changed is an external pointer to the volume number within the volume group.
박수정
Advisor

Re: renaming logical volumes

Hi!

No problem!

Example)

/dev/vg01/lvol9 1000 600 400 60% /fsname

1. #mount /fsname

2. #mv /dev/vg01/lvol9 /dev/vg01/lvname
#mv /dev/vg01/rlvol9 /dev/vg01/rlvname

3. #vi /dev/fstab

from /dev/vg01/lvol9 /fsname vxfs ....
to /dev/vg01/lvname /fsname vxfs ....

4. #mount /fsname