- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script for vgexport map files and vgimport map fil...
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
тАО09-09-2010 12:37 PM
тАО09-09-2010 12:37 PM
I need assistance to do the vgimport from the results output of vgexport script. Taking in mind that some of the vgs have unique names " testvg, etc" and others the default way " vg01, etc". I managed to create a vgexport script file which writes the output to /tmp/dev " hope it is correct" but I am having problems in creating a vgimport script to to use the previous output results from the vgexport.
here is my vgexport:-
#!/usr/bin/ksh
mkdir /tmp/dev/
VGS=`vgdisplay|awk '/VG Name/ {print $3}'`
for VG in ${VGS}
do
vgexport -v -p -s -m /tmp${VG}.map ${VG}
done
Solved! Go to Solution.
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2010 12:53 PM
тАО09-09-2010 12:53 PM
SolutionFirst, change you 'vgexport' to create files thusly so we can easily glob for them:
# vgexport -v -p -s -m /tmp/${VG}.map ${VG}
Now you can do:
# for VG in $(ls /tmp/vg*.map)
> do
> BASE=$(basename ${VG} .map)
> vgimport -v -s -m ${VG} /dev/${BASE}
> done
...I suggest you copy-and-paste the above for preserving the whitespace that is hard to see :-)
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2010 01:17 PM
тАО09-09-2010 01:17 PM
Re: script for vgexport map files and vgimport map files
Thanks for your assistance on this one much appreciated. I will try it tomorrow on my dev server.
Warm regards
Jose da Silva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2010 10:49 PM
тАО09-10-2010 10:49 PM
Re: script for vgexport map files and vgimport map files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2010 04:22 AM
тАО09-11-2010 04:22 AM
Re: script for vgexport map files and vgimport map files
> Thanks James for your help, much appreciated.
You're welcome. If you are satisfied, please assign points:
http://forums13.itrc.hp.com/service/forums/helptips.do?#28
...JRF...