- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Associate VGID with Volume Group Name
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
Discussions
Discussions
Forums
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
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
тАО05-27-2003 06:51 AM
тАО05-27-2003 06:51 AM
For example,
vgid=283173133ec80dbe = vg00
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 06:59 AM
тАО05-27-2003 06:59 AM
Re: Associate VGID with Volume Group Name
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 07:16 AM
тАО05-27-2003 07:16 AM
Re: Associate VGID with Volume Group Name
Yes it is possible, this information vgid <-> VG is kept in /etc/lvmtab. But it is not really easy to retrieve it:
For example:
#echo "0x40C?2X" | adb /tmp/lvmtab
40C: 2096147D 3AB1ED17
You have the vgid just before the first disk of the vg. You have to write a small c programm to do that. The last solution is to directly retrieve the vgid on the device itself, it is always at the same place:
#echo "0x0002010?2X" | adb /dev/dsk/c8t2d0
2010: 2096147D 3AB1ED17
Good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 08:35 AM
тАО05-27-2003 08:35 AM
Re: Associate VGID with Volume Group Name
To add to the information already provided, remember that the very way to rename a volume group is to first 'vgexport' it [which removes the '/dev/vgXX' structures from the server and purges '/etc/lvmtab' of the VG information]. Having done this, you create a new directory representing the new VG name (e.g. /dev/myvg) and a group file with a unique minor number of your choice, and 'vgimport' the appropriate physical disk [either by matching the VGID or by specifying the actual physical disks].
Thus, the *name* of a volume group is "known" only through the device directory structure, and is not recorded on the physical disk(s) comprising the volume group.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 09:34 AM
тАО05-27-2003 09:34 AM
SolutionI'm very sorry but Bruno (who is 2 meters away from me ...) is perfectly rigth. vgchgid must be done BEFORE importing a vg. One of my colleagues wrote a long time ago a tool to read the lvmtab file. I give you a simplified version which is more beautiful than 'strings /etc/lvmtab and also give you the required vgid.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2003 11:44 PM
тАО05-27-2003 11:44 PM
Re: Associate VGID with Volume Group Name
strings -t d /etc/lvmtab |
grep /dev |
grep -v /dev/dsk |
while read offset path; do
xd -An -j$(($offset+1024)) -N8 -tuL /etc/lvmtab |
read vgid1 vgid2
echo $path $vgid1-$vgid2
done
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2003 12:03 AM
тАО05-28-2003 12:03 AM
Re: Associate VGID with Volume Group Name
regards
mB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2003 12:21 AM
тАО05-28-2003 12:21 AM
Re: Associate VGID with Volume Group Name
You look at the disk to get the VGID, e.g.:
# echo "0d8208?UU" | adb /dev/dsk/c11t0d0
2010: 3216063718 1046873340
Then you look at the VGID of the lvmtab, e.g. using the script above:
/dev/vg00 3216063718-1052129048
/dev/vgtobi 3216063718-1008239346
/dev/vgignite 3216063718-1006159972
/dev/vgoracle 3216063718-1012832752
/dev/vg03 3216063718-1052471874
/dev/vgmichael 3216063718-1053943064
/dev/vgheiko 3216063718-1046873340
And now you know that the disk is part of /dev/vgheiko. This is especially useful in a SAN, where lots of systems potentially use the disk.
BTW, here is another way to look at the VGID:
# echo "0d8208?UY" | adb /dev/dsk/c11t0d0
2010: 3216063718 2003 Mar 5 15:09:00
# uname -i
3216063718
You see that the vgcreate was issued on Mar 5 from this system.
Same applies for the PVID, which corresponds to the pvcreate timestamp.
# echo "0d8200?UY" | adb /dev/dsk/c11t0d0
2008: 3216063718 2002 Mar 11 14:36:31
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2003 05:04 AM
тАО05-28-2003 05:04 AM
Re: Associate VGID with Volume Group Name
Thanks for all the responses. Dietmar's conclusion on why this is useful was right on mark and the script that Jean-Louis supplied makes this an easy task. Good info to have, just incase HP/UX renames the instances of the disk and you need to know which (if any) volume group that disk belonged to.
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2003 07:15 AM
тАО05-29-2003 07:15 AM
Re: Associate VGID with Volume Group Name
I'm receiving the following when trying to compile the c program you supplied:
cc: "lvmtab.c", line 103: warning 527: Integral value implicitly converted to pointer in assignment.
cc: "lvmtab.c", line 103: warning 563: Argument #1 is not the correct type.
Can you help?
Thanks