- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Trying to improve script for EMC disk mapping ...
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
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
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
12-14-2000 12:25 PM
12-14-2000 12:25 PM
Trying to improve script for EMC disk mapping report
The report gives me the /dev/dsk/
NOW...for what I am trying to do.
I want to expand this (..if it's possible) to add the logical volume and file system also.
I've thought of using the /etc/mnttab (cause with some boxes in SG fstab is obviously not do-able)
But so far I am not sure how I would do this....and ensure that it connects up to the corresponding /dev/dsk entry.
Has anyone done this....or something similar?
Thanks,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2000 12:41 PM
12-14-2000 12:41 PM
Re: Trying to improve script for EMC disk mapping report
If I understand your question, you want to be able to map a disk device name to logical volumes on that disk and map out the filesystems on the disk right?
AFAIK, Because lvols can be mounted to different filesystem names, given any lvol, you cannot determine what filesystem it maps to unless you consult the corresponding /etc/fstab (or /etc/mnttab). Therefore the way would be to search the fstab or mnttab for each of the identified volume groups. UNLESS you name logical volumes with names that are easily identifiable with the filesystem they are mounted on.
so given the mnttab/fstab, you would be able to do something like:
for lv in `cat list_of_lvol`
do
grep $lv /etc/mnttab
done
for finding out what volumes contain what disks, try:
for disks in `cat list_of_disk_devices`
do
echo $disk
pvdisplay -v $disk | grep "VG Name"
done
good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2000 01:02 PM
12-14-2000 01:02 PM
Re: Trying to improve script for EMC disk mapping report
Would you be willing to post your script? I've been meaning to write something along those lines myself, but I just never seem to have the time.
TIA,
Jim Donovan
Systems Administrator
Sony Computer Entertainment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2000 01:11 PM
12-14-2000 01:11 PM
Re: Trying to improve script for EMC disk mapping report
Yes, I understand how to do what you mentioned. What I am trying to do is tie the lvol and filesystem (and I agree more than likely using the /etc/mnttab) and have this tie back to the /dev/dsk/
So I'm attaching a copy of the script...and I have tried to note the section I'm looking at modifying...
NOW remember, this was not my script..it was written by someone else and I'm just using (enhancing.......) it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2000 01:15 PM
12-14-2000 01:15 PM
Re: Trying to improve script for EMC disk mapping report
Interesting. I suggest walking the output of 'bdf' (or /etc/mnttab) taking the filesystem and mountpoint; doing an 'lvdisplay -v' for each; awk that output looking at the "distribution of logical volume" information where the PV names are listed; and then matching those entities to the output in the 'inq' output. This would give you a mapping of mounted directories to physical volumes.
If during this processing you "mark" the 'inq' entities that you have matched you should end up (eventually) with nothing but the EMC gatekeeper disk, CDROMS, and non-EMC disk.
Does this provide any useful suggestion to you?
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2000 06:24 PM
12-14-2000 06:24 PM
Re: Trying to improve script for EMC disk mapping report
I don't care for programming (burned out 20 years ago with code...), and this little darlin' will take awhile to work out the bugs...but I think this will work..
Thanks for yours and everyones input.....
If and when I get the code worked out...I'll post the script for anyone who would like it.
Just be patient....I'm the only UNIX person here, so it may take awhile.
/rcw