Renaming logical volume group and volumes | Unix Linux Forums | HP-UX

  Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Renaming logical volume group and volumes

HP-UX


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 10-16-2008
Mr. Zer0 Mr. Zer0 is offline
Registered User
 
Join Date: Oct 2008
Last Activity: 5 May 2011, 12:09 AM EDT
Posts: 16
Thanks: 4
Thanked 0 Times in 0 Posts
Renaming logical volume group and volumes

Hi all,

How do u rename a logical volume group and the logical volumes belonging to that? The logical volumes contain data and are in use.

eg: Renaming dev/vgov to dev/ov-dg ?
Sponsored Links
    #2  
Old 10-16-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Last Activity: 1 September 2014, 12:58 PM EDT
Location: Switzerland - GE
Posts: 5,648
Thanks: 152
Thanked 391 Times in 370 Posts
The easiest would be an export / import of the VG...(man vgexport/vgimport...)
Sponsored Links
    #3  
Old 10-16-2008
trek7300's Avatar
trek7300 trek7300 is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 14 August 2014, 1:18 PM EDT
Location: Arizona, USA
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Renaming lvols

This should rename the lvols. Once you do that then you can use vgexport and rename the VG's with a map file. Best to try this on a test VG first.

1. umount /<oldname>
2. mv /dev/vgxx/<oldname> /dev/vgxx/<newname>
mv /dev/vgxx/r<oldname> /dev/vgxx/r<newname>
3. Modify the /etc/fstab file to reflect the newname.
4. mount /dev/vgxx/<newname> /<oldname>
or
mount -a
NOTE: if you would also like to change the mount point to <newname>
do the following before step 3 above:
mkdir <newname>
rmdir <oldname>
Then modify step 3 and 4 above to reflect the newname
    #4  
Old 10-18-2008
Mr. Zer0 Mr. Zer0 is offline
Registered User
 
Join Date: Oct 2008
Last Activity: 5 May 2011, 12:09 AM EDT
Posts: 16
Thanks: 4
Thanked 0 Times in 0 Posts
Can i rename the group first and then the lvols?
Sponsored Links
    #5  
Old 10-18-2008
trek7300's Avatar
trek7300 trek7300 is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 14 August 2014, 1:18 PM EDT
Location: Arizona, USA
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
I don't see any reason why not. Do it on a test VG before you try it on a production one.
Sponsored Links
    #6  
Old 10-18-2008
DustBunny DustBunny is offline
Registered User
 
Join Date: Oct 2008
Last Activity: 28 December 2012, 7:08 AM EST
Location: Earth!
Posts: 83
Thanks: 0
Thanked 2 Times in 2 Posts
Well yes you can!!! Follow the below and that's it to change vg and lv as well..

Export the VG:

1. # umount /oldmountpoint
2. # vgchange –a n vgname
3. # vgexport –s –v –m /etc/lvmconf/vgname.map vgname

Rename the VG directory, edit LV names, and re-import:

1. # mkdir /dev/newvgname
2. # mknod /dev/newvgname/group c 64 0x010000 (Minor number example. Please ensure that it's unique)
3. # cp /etc/lvmconf/vgname.map /etc/lvmconf/newvgname.map
=>If you want to change your logical volume names, simply use the vi editor to modify the names in the map file.
4. # vi /etc/lvmconf/newvgname.map
VGID 0a0a0a0a0
1 newlvname

5. # vgimport –s –v –m /etc/lvmconf/newvgname.map newvgname
6. # vgchange –a y newvgname
7. # vgcfgbackup newvgname
8. # mv /oldmountpoint /newmountpoint
9. # vi /etc/fstab => add entry
10. # mount -a

-You're done!

Please let us know if you find any issues!

-DB
Sponsored Links
    #7  
Old 10-20-2008
Mr. Zer0 Mr. Zer0 is offline
Registered User
 
Join Date: Oct 2008
Last Activity: 5 May 2011, 12:09 AM EDT
Posts: 16
Thanks: 4
Thanked 0 Times in 0 Posts
THanks,

Did exactly as u mentioned-

First renamed the lvols,using umount, mv and then modified /etc/fstab, then mount -a

THen modified the group as explained.



Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Logical volume name conflict in two volume group dantares AIX 10 12-07-2009 12:12 PM
Unmount and remove all Logical vol.Volume group and physical disk joeli HP-UX 3 01-27-2009 09:59 AM
Basic Filesystem / Physical Volume / Logical Volume Check chipahoys AIX 1 12-02-2008 07:05 AM
Moving a Logical Volume from one Volume Group to Another krisw AIX 2 07-14-2008 07:48 AM
LVM - Extending Logical Volume within Volume Group ghimanshu UNIX for Advanced & Expert Users 3 07-26-2007 07:39 AM



All times are GMT -4. The time now is 07:26 PM.