- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Some simple script logic - I'm loosing my touch!!
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
Forums
Discussions
Discussions
Discussions
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
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
06-15-2004 10:02 PM
06-15-2004 10:02 PM
Some simple script logic - I'm loosing my touch!!
Nice easy one here but I'm at a loss for the best way to do it.
I just want to make sure each volume in the rootdg group is mirrored. So, I figure, vxprint and grep out the volume name. I then want to enure that there is a v entry and 2 'pl' entires for each volume. I was thinking of using awk to parse each line and search for the volume name and then check the beginning of the lines but it just seems too long winded. Shorter ideas would be appreciated..
Thanks,
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 10:35 PM
06-15-2004 10:35 PM
Re: Some simple script logic - I'm loosing my touch!!
#for i in `vgdisplay -v vg00 | grep "LV Name" | sed "s/^ *LV Name *//"`
> do
> echo "$i : \c"
> lvdisplay $i | grep -i mirror | tr -s " " " "
> done
/dev/vg00/lvol1 : Mirror copies 1
/dev/vg00/lvol2 : Mirror copies 1
/dev/vg00/lvol10 : Mirror copies 1
/dev/vg00/lvol3 : Mirror copies 1
/dev/vg00/lvol4 : Mirror copies 1
/dev/vg00/lvol5 : Mirror copies 1
/dev/vg00/lvol6 : Mirror copies 1
/dev/vg00/lvol7 : Mirror copies 1
/dev/vg00/lvol8 : Mirror copies 1
/dev/vg00/lvol9 : Mirror copies 1
/dev/vg00/lvol11 : Mirror copies 1
/dev/vg00/lvol12 : Mirror copies 1
regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 10:50 PM
06-15-2004 10:50 PM
Re: Some simple script logic - I'm loosing my touch!!
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2004 11:00 PM
06-15-2004 11:00 PM
Re: Some simple script logic - I'm loosing my touch!!
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 12:53 AM
06-16-2004 12:53 AM
Re: Some simple script logic - I'm loosing my touch!!
vxprint -g rootdg > data
for i in `grep "^v " data | awk '{print $2}'`
do
num_plexes=`grep "^pl $i" data | wc -l`
echo $i $num_plexes
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 01:02 AM
06-16-2004 01:02 AM
Re: Some simple script logic - I'm loosing my touch!!
# chkdisks
Logical Volume Filesystem Mirrored?
-------------- ---------- ---------
/dev/vg00/lvol1 /stand yes
/dev/vg00/lvol2 yes
/dev/vg00/lvol3 / yes
/dev/vg00/lvol4 /tmp yes
/dev/vg00/lvol5 /home yes
/dev/vg00/lvol6 /opt yes
/dev/vg00/lvol7 /usr yes
/dev/vg00/lvol8 /var yes
/dev/vg00/lvol9 /app yes
/dev/vg00/lvol10 /ops yes
/dev/vg00/lvol11 /data yes
/dev/vg00/lvol12 /opt/cctool yes
/dev/vg00/lvol13 /var/opt/perf/datafiles yes
/dev/vg00/lvol14 /usr/openv yes
/dev/vg00/lvpub no
/dev/vg01/lvol2 /var/adm/crash yes
/dev/vg01/swap yes
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 05:32 PM
06-16-2004 05:32 PM
Re: Some simple script logic - I'm loosing my touch!!
Is'nt it an option to make a 'ls' of the /dev/vg00 directory and use this as an input in a 'for . . . do' loop ?
Kl@@s