- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: adb diff between 11.23 and 11.11?
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
тАО04-04-2006 06:45 AM
тАО04-04-2006 06:45 AM
I have a script that helps to identify disks that are pvlinks but aren't part of the vg to which their corresponding pair is assigned. The function which identifies the vgid from the disk is defined as follows:
id_vgid()
{ pv=$1
echo 0x2010?2X| adb ${pv} 2>/dev/null | expand |tr -d " "| \
sed -e "s/2010://" -e 's/0x//g'
}
On an 11.11 system, the function returns in less than a second. On a pa-risc 11.23 system, it takes at least a couple of minutes.
Is there some argument I can supply to adb which would help it return quicker? Is there a better/quicker way to get the vgid from the disk?
Any hints/tips/suggestions greatly appreciated.
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2006 07:59 AM
тАО04-04-2006 07:59 AM
Re: adb diff between 11.23 and 11.11?
echo 0x2010?2X|adb /dev/dsk/c6t8d7|expand|tr -d " "|sed "s/2010://"
same thing...
I know adb behaves differently...
I identify disks with san commands.
For example, I use /usr/symcli/bin/syminq on EMC:
# /usr/symcli/bin/syminq |grep 11B
/dev/rdsk/c60t6d2 M(4) EMC SYMMETRIX 5670 6511B000 35354880
/dev/rdsk/c62t6d2 M(4) EMC SYMMETRIX 5670 6511B000 35354880
/dev/rdsk/c64t6d2 M(4) EMC SYMMETRIX 5670 6511B000 35354880
/dev/rdsk/c66t6d2 M(4) EMC SYMMETRIX 5670 6511B000 35354880
Those are all the same disks..
Sorry - not much help :(
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2006 08:02 AM
тАО04-04-2006 08:02 AM
Re: adb diff between 11.23 and 11.11?
Thanks for the reply. I'm working on a perl script which does something similar using inq. It just seems a whole lot cleaner and less error prone to go after the vgids directly. But, if I can't, I can't.
Thanks again for the reply.
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2006 08:10 AM
тАО04-04-2006 08:10 AM
Solution'adb' has undergone some extensive work. Check the 11.23 manpages. There is an '-o' old mode for backwards compatability.
Another way to obtain the VGID of a disk is:
# xd -An -j8200 -N16 -tx /dev/rdsk/cXtYdZ
The output will appear in four fields. The third and fourth field when joined together, are the VGID in question. The first and second field are the PVID.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2006 08:33 AM
тАО04-04-2006 08:33 AM
Re: adb diff between 11.23 and 11.11?
A little boiler-plate should surround my first offering to insure that we are really looking at an LVM disk:
#!/usr/bin/sh
typeset RAWDEV=${1}
[ -z "${RAWDEV}" -o ! -c "${RAWDEV}" ] && { echo "Not a raw device"; exit 1; }
KIND=`xd -An -j 8192 -N8 -tc ${RAWDEV} 2> /dev/null | xargs`
if [ "${KIND}" = "L V M R E C 0 1" ]; then
INFO=`xd -An -j8200 -N16 -tx ${RAWDEV}`
PVID=`echo ${INFO} | awk '{print $1 $2}'`
VGID=`echo ${INFO} | awk '{print $3 $4}'`
echo "${RAWDEV} PVID = ${PVID}"
echo "${RAWDEV} VGID = ${VGID}"
else
echo "${RAWDEV} is not an LVM disk"
fi
exit 0
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2006 12:36 AM
тАО04-05-2006 12:36 AM
Re: adb diff between 11.23 and 11.11?
That works perfectly, thank you very much. It also has the added benefit of working on 11.11 so I don't have to do any convoluted if/fi's based on os level.
For my particular need, there are no raw devices used w/o LVM so I'm not bothering to put that logic in; however, if/when I make it available for general use, I very definitely will.
Thanks for the info, I appreciate it alot.
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html