- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Need script to generate volume groups from multipl...
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
тАО07-23-2008 04:05 PM
тАО07-23-2008 04:05 PM
Need script to generate volume groups from multiple disks / paths
/dev/rdsk/c14t0d4,/dev/rdsk/c18t0d4
/dev/rdsk/c14t0d5,/dev/rdsk/c18t0d5
The format I need for the vgcreate is the primaries then alternates:
vgcreate ..... /dev/rdsk/c14t0d4 /dev/rdsk/c14t0d5 /dev/rdsk/c18t0d4 /dev/rdsk/c18t0d5
I am hoping that someone has a script already that will do what I need. It can be more elaborate such as creating lvol, etc if thats what you have.
Thanks for all your help!
Craig
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 04:12 PM
тАО07-23-2008 04:12 PM
Re: Need script to generate volume groups from multiple disks / paths
If you do this and a path goes out you lose the whole volume group.
Whats the problem with normal pvlinks
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 08:37 PM
тАО07-23-2008 08:37 PM
Re: Need script to generate volume groups from multiple disks / paths
Here is how I would glue file into a long list:
perl -lne 'chomp; push @x,split /,/}{print join " ",@x' input
But wait, you need the first element from the first, with the first from the second.
perl -ne 'chomp; push @a,[split /,/] }{ print "$a[0][$_] $a[1][$_] " for (0..$#{$a[0]}-1)' < two-lines > one-long-line
Here @a is an Array-of-Arrays.
See perl documentation perllol.
That }{ (eskimo kiss) ends the implied loop requested by -n and opens an 'end' block to be closed by the pending } from the -n.
try it?
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 09:07 PM
тАО07-23-2008 09:07 PM
Re: Need script to generate volume groups from multiple disks / paths
awk -F, '{split($0,a); getline; n=split($0,b); while(i
And... do heed SEP's advice.
Hein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2008 09:13 PM
тАО07-23-2008 09:13 PM
Re: Need script to generate volume groups from multiple disks / paths
From the information you posted
"The format I need for the vgcreate is the primaries then alternates:
vgcreate ..... /dev/rdsk/c14t0d4 /dev/rdsk/c14t0d5 /dev/rdsk/c18t0d4 /dev/rdsk/c18t0d5"
It could be better to alternate primary and alternate links, like
/dev/rdsk/c14t0d4
/dev/rdsk/c18t0d4
/dev/rdsk/c18t0d5
/dev/rdsk/c14t0d5
This makes c14 as primary for the first, c18 as primary for the second - kind of balancing.
But anyway, much more details about hardware, software and requirements are needed ...
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!