Unix Technical Forum

importing VGs?

This is a discussion on importing VGs? within the AIX Operating System forums, part of the Unix Operating Systems category; --> I'm soon moving all local disk to a SAN device. I want to be able to varyonvg for any ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 08:47 AM
Mike
 
Posts: n/a
Default importing VGs?

I'm soon moving all local disk to a SAN device. I want to be able
to varyonvg for any VG that's on the SAN. My end goal is to have
my boxes and LPARs configured such that any box can run any application.
To do this I need to importvg for all pdisks/hdisks/vpaths while
keeping the VG varyed off. I know that I can only varyonvg for
a single host unless the VG is one of the Current VGs (none of
these are). Then I want to choose which VG to varyonvg, loop
through and mount the filesystems, then start the application.



These are just typed, never tested:

------ importvg.sh

#!/bin/sh
cfgmgr # not sure this is a good idea, any way to limit to only disks?
lspv | awk '{print $1}' | while read disk
do
importvg $disk
done

------- varyonvg.sh
#!/bin/sh
vg=$1
varyonvg $vg
lsvg -p $vg | tail +3 | awk '!/^N.A$/ {print $NF}' | while read fs
do
mount $fs
done
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 08:49 AM
sbzx
 
Posts: n/a
Default Re: importing VGs?

importvg.sh: you only need to run importvg once per VG, select one disk
(any disk will do) from the VG and run 'importvg -y <vgname> <disk>'.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:10 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com