- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to get deveice name in kernel
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
тАО05-31-2009 10:25 PM
тАО05-31-2009 10:25 PM
How to get deveice name in kernel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2009 10:30 PM
тАО05-31-2009 10:30 PM
Re: How to get deveice name in kernel
if you will get /dev/root mean its not in vg and when you are getting /dev/vg00/lvol7 mean it configure as volume group, thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2009 10:48 PM
тАО05-31-2009 10:48 PM
Re: How to get deveice name in kernel
Using the "bdf" command can get correct result, it show that the root "/" was mounted on "/dev/vg00/lvo17".
Any idea? , How to using vfs struct at code to get device name? is it need to translate ?
other issue: I used vfs struct at my code can get device name correctly except the root "/" device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2009 11:02 PM
тАО05-31-2009 11:02 PM
Re: How to get deveice name in kernel
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 1335824 761328 64% /
/dev/vg00/lvol1 298928 61008 208024 23% /stand
/dev/vg00/lvol7 8388608 2121872 6217800 25% /var
/dev/vg00/lvol6 10485760 1788024 8629840 17% /usr
/dev/vg00/lvol5 5242880 825520 4383280 16% /tmp
/dev/vg00/lvol8 8912896 2622408 6242024 30% /opt
/dev/vg00/lvol4 32030720 28569496 3461224 89% /home
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 10:10 PM
тАО06-02-2009 10:10 PM
Re: How to get deveice name in kernel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2009 10:17 PM
тАО06-02-2009 10:17 PM
Re: How to get deveice name in kernel
I think some context would help here - what are you trying to acheive? Is the only way to acheive this by fishing around in memory or a kernel dump?
Generally I'd always tell people to avoid digging into the kernel if there's a user space method of doing whyat you are attempting - a lot of stuff thats supposed to be purely internal to the kernel can change without warning and with no backwards compatibility, so its best avoided.
Anyway IIRC /dev/root is a special case thats used before the LVM device drivers are stood up to get at the root filesystem, so it should always relate to the device on which / is mounted. It's not surprising that this is what the kernel sees, as its started before LVM starts.
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2009 07:24 PM
тАО06-03-2009 07:24 PM
Re: How to get deveice name in kernel
My point is : we need to get some information ( device name, process name...) of a spacial "file" we care when catching some system call. then We can logging this information for backup.
So , it is seem that getting these information in kernel directly for reasons of efficiency.
maybe , it can do some translation while doing the logs. let "/dev/root" to really logic device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2009 08:50 PM
тАО06-03-2009 08:50 PM
Re: How to get deveice name in kernel
I assume you are writing a device driver? You might want to be explicit about it.
Have you looked at the DDK? What OS version?
http://www.hp.com/go/hpux_ddk