Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

building as Volume Group

Status
Not open for further replies.

visvid

Technical User
Jun 3, 2002
131
GB
Logical Volume Filesystems size vapth vpath
xxxxxxxf00 xx/xx_u000 2G 0 26
xxxxxxxf01 xx/xx_u001 14G 1 27
xxxxxxxf02 xx/xx_u002 14G 2 28
xxxxxxxf03 xx/xx_u003 14G 3 29
xxxxxxxf04 xx/xx_u004 14G 4 30
xxxxxxxf05 xx/xx_u005 14G 5 31
xxxxxxxf06 xx/xx_u006 14G 6 32
xxxxxxxf07 xx/xx_u007 14G 7 33


I have been tasked with creating several new VG’s and was looking to see if there was an easier way of doing through a script

The Lv’s are the same except the end prefix running from f00 to f52 and FS ending in _u000 to U052 using 2 vpaths in separated data centres

File sizes with be different to ranging from 128 mb to 14G , to do the crfs I was going to create a flat flie and run it as a script.

Does any one know of a good way or could help with a script to do this. I have several new VG’s I need to create and I am looking at a way of saving time


The spread shhet looks out of line but vapths are 0 & 26 , 1 &27 etc

On the 7th day God created Super Moto
:)
 
with a text file as:

vg.conf:
xxxxxxxf00 xx/xx_u000 2G 0 26
xxxxxxxf01 xx/xx_u001 14G 1 27
xxxxxxxf02 xx/xx_u002 14G 2 28
xxxxxxxf03 xx/xx_u003 14G 3 29
xxxxxxxf04 xx/xx_u004 14G 4 30
xxxxxxxf05 xx/xx_u005 14G 5 31
xxxxxxxf06 xx/xx_u006 14G 6 32
xxxxxxxf07 xx/xx_u007 14G 7 33

cat vg.conf | awk 'BEGIN{c=0,x=26}{system("vgcreate " $2 " " c " " x); c+=1; x+=1)}'

system() will execute a system command.

just a though.

cheers.
 
UUOC!

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
UUOC?

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
UUOC - Useless Use Of Cat

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
All uses of cat, unless you're actually concatenating more than one file together are useless.... :)

Mike

"Deliver me from the bane of civilised life; teddy bear envy."

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
thanks for the useful comment! [wink]

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top