- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scripting Junkies. Need help with a script.
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
тАО03-27-2008 04:29 AM
тАО03-27-2008 04:29 AM
vg and number of disks for that vg
strings /etc/lvmtab|grep '\/dev'
gives following
vg_cl_PCM01_redo2
/dev/dsk/c1t1d1
/dev/dsk/c2t2d2
vg_cl_PCM01_sys
/dev/dsk/c1t3t4
It should give me as follows.
vg_cl_PCM01_redo2 2 pvs
vg_cl_PCM01_sys 1 pvs
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 04:42 AM
тАО03-27-2008 04:42 AM
Re: Scripting Junkies. Need help with a script.
for a in `strings /etc/lvmtab | grep -v "/dev/dsk/"`
do
echo $a "\c" >> lvm-task.file
vgdisplay -v $a | grep "Cur PV" | awk '{print $3}' >> lvm-task.file
done
Like I said...nothing fancy !
Rgrds,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 04:57 AM
тАО03-27-2008 04:57 AM
Solutionstrings lvmtab | awk '/vg/{d=$1}{V[d]++}END{for(f in V)print f,(V[f]-1), "pvs"}'
To remove the Alternate Link means taking more of a detailed approach.
Why do you want to look at lvmtab, not just use vgdisplay -v ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 05:03 AM
тАО03-27-2008 05:03 AM
Re: Scripting Junkies. Need help with a script.
vgs being used are in vcs and mcsg environment. the purpose is check if no. of pvs under a vg on primary node and secondary node is matching or not.
Many times sysadmins forget to import the vgs on alternate node for a vg under mcsg package and failovers run into the problem...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 05:29 AM
тАО03-27-2008 05:29 AM
Re: Scripting Junkies. Need help with a script.
Well, this will tell you if you have the same amount disks - but that's it. What about a new lvol. You may have a match on disk amt, but your failover could still cripple. So, I'm guessing your going to add something to compare the mapfiles between SG related nodes too.
This may be a side-bar suggestion, but making a form to confirm certain tasks are done & ck'd off helps. As does a naming standard for new mapfiles with the date created included it in.
Another quick auditing check is to compare the date of the primary nodes vg.map
I just sit on my primary node, check the dates on the latest mapfile on primary node and then just run a remsh to check all failover nodes
remsh
and then
remsh
Just a thought,
Rgrds,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2008 07:06 PM
тАО03-27-2008 07:06 PM
Re: Scripting Junkies. Need help with a script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2008 12:27 AM
тАО03-28-2008 12:27 AM
Re: Scripting Junkies. Need help with a script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2008 11:55 PM
тАО07-09-2008 11:55 PM