- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Rename a vg
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 03:12 AM
03-27-2008 03:12 AM
Rename a vg
I want to rename a volume group.
I believe i have to use vgimport and vgexport commands to achieve this!
Only one lvol reside in this VG, which doesn't have any data.
Can anyone provide me the syntax for renaming?
Say for example, renaming vg04 to vg05.
And do i need to do any vgcfgbackup for this?
Thanks in Advance!
Sridhar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 03:18 AM
03-27-2008 03:18 AM
Re: Rename a vg
vgchange -a n /dev/vg04
vgexport -s -m /tmp/vg04map /dev/vg04
mkdir /dev/vg05
mknod /dev/vg05/group c 64 0x050000
vgimport -s -m /tmp/vg05map /dev/vg05
vgchange -a y /dev/vg05
Note that map files are required only if you have non-standard lvol names (lvol1, lvol2, etc). Also note, that I suggest using the -s option so you don't have to identify the individual device paths.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 03:18 AM
03-27-2008 03:18 AM
Re: Rename a vg
#vgexport -v -s -m /tmp/vg04.map vg04
2. Create the new directory, group file and then import the old disk group structure for the new VG.
#mkdir /dev/vg05
#mknod /dev/vg05/group c 64 0x050000
#vgimport -v -s -m /tmp/vg04.map vg05
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 03:24 AM
03-27-2008 03:24 AM
Re: Rename a vg
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 03:41 AM
03-27-2008 03:41 AM
Re: Rename a vg
Hmmm...
--
Only one lvol reside in this VG, which doesn't have any data.
--
In that case, blow away your vg and create a new one.
# umount "lvol"
# vgchange -a n vgxx
# vgexport vgxx
# mkdir /dev/vgxx
# mknod /dev/vgxx/group c 64 0x0Z0000
change Z in a free number.
# pvcreate -f /dev/rdsk/cxtydz
# vgcreate /dev/vgxx /dev/dsk/cxtydz
You can additional parameters for larger disks if you like.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 10:31 PM
03-27-2008 10:31 PM
Re: Rename a vg
1.Deactivate vg #vgchange -a n /dev/vg04
2.Export vg and get a map file #vgexport -s -m /tmp/vg05.map vg04
3.create dir named with new vg #mkdir /dev/vg05
4.create device file for the same #mknod /dev/vg05/group c 64 0xXX0000 - XX should be unique
5.vgimport #vgimport -s -m /tmp/vg05.map /dev/vg05
6.vgactivate# vgchange -a y /dev/vg05
-s optin is using to get the vgid along with the map file. Thanks -ajeshvv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2008 11:20 PM
05-30-2008 11:20 PM
Re: Rename a vg
As u told data is not there so its very simple
u just go for new vg creation by removing old .
like ------>
# umount "lvol"
# vgchange -a n vg04
# vgexport vg04
# mkdir /dev/vg05
#ll /dev/*/group -----> for checking in our case assumin 5 for vg05
# mknod /dev/vg05/group c 64 0x050000
# pvcreate -f /dev/rdsk/cxtydz
# vgcreate /dev/vg05 /dev/dsk/cxtydz
regards
Vjta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2008 11:38 PM
05-30-2008 11:38 PM
Re: Rename a vg
In order to rename a VG you have to export and re-import it:
# umount /dev/vg01/lvol1
# umount /dev/vg01/lvol2
...
# vgchange -a n vg01
# vgexport -m /tmp/mapfile vg01
# ll /dev/*/group (choose a unique minor no.)
# mkdir /dev/vgnew
# mknod /dev/vgnew/group c 64 0x010000
# vgimport -m /tmp/mapfile vgnew /dev/dsk/c4t0d0 /dev/dsk/c5t0d0 ...