- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Get a list of disks on Hp-ux
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
12-10-2002 10:24 AM
12-10-2002 10:24 AM
Get a list of disks on Hp-ux
I am trying to generate a list of disks on the system within my C program. On Solaris, I can do this by seeking to the kernel symbol _top_devinfo in /dev/kmem and walking down the structure. Is there an equivalent on HP-UX?
I know I could use ioscan -F -C disk, but I would rather not if it can be avoided. I notice from using trace that ioscan uses ioctls to /dev/config. Are there published ways of accessing /dev/config?
Thanks for any help,
Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 11:21 AM
12-10-2002 11:21 AM
Re: Get a list of disks on Hp-ux
I agree with you not to use ioscan. I believe there's a way like you mentioned, but as soon as I'm not so hpux deep person, I would propose another way:
- list /dev/rdsk directory to see if there are device files for disks which are accessible for OS;
- issue 'lssf /dev/rdsk/cXtYdZ' to get hardware path;
- issue 'diskinfo -v /dev/rdsk/cXtYdZ' to get low-level disk info (size, model, bps, firmware level etc).
Of course you will not be able to list disks if there're no device files generated for them, but this can be solved issuing 'insf -e' prior to all these actions :o)
Eugeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 11:55 AM
12-10-2002 11:55 AM
Re: Get a list of disks on Hp-ux
Will "ioscan -fun" work for you?. You can run it as an ordinary user.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 12:04 PM
12-10-2002 12:04 PM
Re: Get a list of disks on Hp-ux
ioscan -fnk -C disk
the k option = show kernel structures; don't scan hardware
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 12:18 PM
12-10-2002 12:18 PM
Re: Get a list of disks on Hp-ux
Eugeny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 12:30 PM
12-10-2002 12:30 PM
Re: Get a list of disks on Hp-ux
Try looking at vgdisplay and lvoldisplay.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 12:35 PM
12-10-2002 12:35 PM
Re: Get a list of disks on Hp-ux
Ioscan -fnk -C disk is an option. When I asked the question, I was mainly wondering if there was some way to directly get the information from the kernel instead of going through ioscan.
I need to know the device file name, and I don't like the way ioscan displays them. So if I could get the information directly, it would be better.
Thanks,
Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 02:02 PM
12-10-2002 02:02 PM
Re: Get a list of disks on Hp-ux
Would the following work for you?
ioscan -fnk -C disk | grep /dev/dsk | awk '{ print $1 }'
Gordon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 02:23 PM
12-10-2002 02:23 PM
Re: Get a list of disks on Hp-ux
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x026250011d20d6118ff40090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 03:50 PM
12-10-2002 03:50 PM
Re: Get a list of disks on Hp-ux
Yes there is, try using ioconfig C command which gives you a structure called ioconfig_entry defined in
You can get all information from there.
Cheers
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 04:13 PM
12-10-2002 04:13 PM
Re: Get a list of disks on Hp-ux
This sounds promising except I don't have sys/ioconfig.h on any of 3 boxes I have. sys/ioparams.h is similar...
Any ideas?
Thanks,
Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 04:44 PM
12-10-2002 04:44 PM
Re: Get a list of disks on Hp-ux
Also if you go through the header file ioparms.h it tell about all such structure to extract information. I think this should solve the issue.
(i think the structure name also which i gave is different now in ioparms.h its ioconfig)
Cheers
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2002 06:52 PM
12-10-2002 06:52 PM
Re: Get a list of disks on Hp-ux
man pstat
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 02:18 AM
12-11-2002 02:18 AM
Re: Get a list of disks on Hp-ux
Hi,
Use: ioscan -fnC disk
or use the LVMCollect script found in the scripts thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x026250011d20d6118ff40090279cd0f9,00.html
Bye...