- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: scripting vgimport commands - bad results?
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
тАО10-24-2002 02:14 PM
тАО10-24-2002 02:14 PM
scripting vgimport commands - bad results?
Bad or no VGID in mapfile /vgdb2_mapfile_orig./dev/vg00 The command in the script is:
vgimport -m /vgdb2_mapfile_orig -vs /dev/vgdb2_orig
why does work manually but fail when run inside a script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 02:19 PM
тАО10-24-2002 02:19 PM
Re: scripting vgimport commands - bad results?
A couple of things:
1) You MUST have used the -s on the vgexport command when you created the map file.
2) When using the -s you must ALSO use -p on both the vgexport & vgimport commands.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 03:13 PM
тАО10-24-2002 03:13 PM
Re: scripting vgimport commands - bad results?
vgimport vgname -m map_file_name /dev/dsk/c1t2d0 /dev/dsk/c1t2d1 etc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2002 03:13 PM
тАО10-24-2002 03:13 PM
Re: scripting vgimport commands - bad results?
vgimport vgname -m map_file_name /dev/dsk/c1t2d0 /dev/dsk/c1t2d1 etc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2002 07:21 AM
тАО10-25-2002 07:21 AM
Re: scripting vgimport commands - bad results?
# grep vgexport qdb2_move_install_yas1
vgexport -v -m /vgdb2_mapfile_orig /dev/vgdb2
vgexport -v -m /vgdb2_mapfile_new /dev/vgdb2_new
# grep vgimport qdb2_move_install_yas1
vgimport -m /vgdb2_mapfile_orig -vs /dev/vgdb2_orig
vgimport -m /vgdb2_mapfile_new -vs /dev/vgdb2
So I'm using -s on the import, but not the export. man page says -s indicates "Shareable" which I gather means shareable between 2 nodes in a ServiceGuard cluster... which I do have. Other thing it says, if -s is used, -p, -v -m must be used. and on vgexport therefore requires, -p -m -s. Hmm.. it also states "The specified mapfile is the same mapfile specified by using the -p, -m and -s options. Note that I'm using different mapfile names for the renaming of VGs. Maybe the lack of the -s on the export is my only hozer? I didn't think the pv names were really required in this instance...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2002 07:31 AM
тАО10-25-2002 07:31 AM
Re: scripting vgimport commands - bad results?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2002 07:34 AM
тАО10-25-2002 07:34 AM
Re: scripting vgimport commands - bad results?
You definitely must use "-s" on the vgexport. If not, your mapfile will not contain the VGID.
I think there's a type in the vgimport man page. If you use "-p" then how is lvmtab going to get updated? At the end of "man vgimport" you see the following example:
vgimport -v -s -m /tmp/vg02.mymap dev/vg02
I don't see how you could manually use "vgimport -s" successfully if you don't have the VGID in your mapfile.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2002 07:36 AM
тАО10-25-2002 07:36 AM
Re: scripting vgimport commands - bad results?
Try using full pathnames, not just the file name, maybe your script is not finding the file you intend.
Just a thought...
--bmr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2002 07:38 AM
тАО10-25-2002 07:38 AM
Re: scripting vgimport commands - bad results?
Using the -s on import causes LVM to look at the disk identifiers to determine which disks are to be included in the VG being imported. If they are not in the mapfile being used, the import will not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2002 07:38 AM
тАО10-25-2002 07:38 AM
Re: scripting vgimport commands - bad results?
To use the '-s' option with 'vgimport' you need to have a mapfile that has the VGID of the volumegroup in it. That (generally) means that you did a 'vgexport' with the '-s' option.
Whether or not the volume group is destined for a ServiceGuard environment is immaterial as far as use of this '-s' option is concerned.
In additon to *not* removing the volume group and its underlying structures from the exporting system, the '-s' option simply places the volume group ID (VGID) into the mapfile. This VGID is then used during a 'vgimport' process. The VGID in the mapfile is matched to that on the physical disk(s) scanned by the 'vgimport' process. A match indicates that the physical disk is a member of the VG and the 'etc/lvmtab' file is appropriately updated.
If you are importing a volume group because the underlying disk device files have changed, an alternative to importing with the VGID specification in a mapfile is to specify the new physical paths. The paths can be defined in the '-f outfile' of the 'vgexport' and manipulated in the '-f infile' of the 'vgimport'.
Regards!
...JRF...