- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- disks to filesystem co-relation
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
07-09-2004 03:50 AM
07-09-2004 03:50 AM
disks to filesystem co-relation
I need a script which would help me to co-relate a disk to its filesystem. (if not logical volume atleast). I get performance monitoring reports for 400 odd disks everyday which are hitting a limit and when I send the reports my users want it to in the form of filesyste. (That is a legitimate request from them). Can someone help me by giving ideas or if there is a ready made one already could you please point me to one.? Thanks in advance.
Kennedy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2004 03:52 AM
07-09-2004 03:52 AM
Re: disks to filesystem co-relation
# cat vglist.sh
for name in `cat /root/vgnamesEMC.out `
do
echo $name
vgdisplay -v $name |grep "PV Name" |awk '{ print $3 }'
done > /root/disks.by.VG.`date +%m%d%y` 2> /root/vgerr.`
date +%m%d%y`
Must have a control file with the VGs listed called vgnamesEMC.out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2004 04:00 AM
07-09-2004 04:00 AM
Re: disks to filesystem co-relation
if it were for example freespace, used space, etc. - wouldn't it be more natural to start with filesystem and just report that? Since disks can be mirrored, raided, grouped into volume groups, filsystems spread out over several physical disks, single disks with multiple filesystems on them, etc, it seems to me it could be very difficult to start with disk and try to "correlate to filesystem", whatever that would mean.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2004 04:18 AM
07-09-2004 04:18 AM
Re: disks to filesystem co-relation
This is a small script that I use it on the fly
for PV in $(vgdisplay -v |grep -v Alternate|awk '/PV Name/ {print $3}')
do
LVs=$(pvdisplay -v $PV |printf "%s," $(awk '/current/ {print $3}' |sort|uniq))
LVs=$(echo $LVs|sed 's/,$//g')
echo $PV:$LVs
done
May give out errors if there is a problem with the VGs but should produce the output you need.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2004 04:19 AM
07-09-2004 04:19 AM
Re: disks to filesystem co-relation
for DISK in $(cat /tmp/400-odd-disksreport)
do
LVS=$(pvdisplay -v $DISK | grep "^ */dev/vg" | awk '{print $1}')
echo "$DISK"
echo "$LVS" | xargs -i echo "\t{}"
done
The above loop will display the list of logical volumes that the disk contains.
But remember, a logical volume can span multiple disks.
for DISK in $(cat /tmp/400-odd-disksreport)
do
LVS=$(pvdisplay -v $DISK | grep "^ */dev/vg" | awk '{print $1}')
echo "$DISK"
echo "$LVS" | xargs -n1 bdf
done
The above script excerpt will tell you the filesystems that are on the disk.
-- Sundar