Need ioctls for geeting volume group information on RH and SLES
Objective:
To do volume group probing and collect information such as the lvols and the pvs present in the vg, wwid of the PV etc. Ways explored: 1) Ioctls 2) lvm apis Disadvantage is that the if the apis changes(it does .. Even in patches) I will be heavily impacted. Hence it is not a good option at all. 3) Parsing the commands such as vgdisplay and getting data. This option is quite rudimentary and not scalable. Please let me know the sources from which I can get more information about the ioctls. Any help regarding this is much appreciated. |
have you found this links before?
Talking to Device Files (writes and IOCTLs) http://linux.die.net/lkmpg/x892.html https://lwn.net/images/pdf/LDD3/ch06.pdf |
Thanks for your reply. I would want to do more than read, write operations on vg devices.
I would want to pass specific ioctl commands and retrieve the data. For instance, the below command exists on HP-UX and defined in lvm.h LVM_QUERYVG LVMP_QUERYPVPATH LVMP_REMOVEPV I'm looking for similar commands in RH and SLES. Does such ioctls commands exist on RH & SLES ?. If so where I can find info about them ?. |
The relevant (lvm related) .src.rpm files I believe are what you want.
eg on my system Code:
rpm -qa|grep -i lvm Of course if you've got a licensed subscription to RHEL, you could ask them. |
Through lvm2 src I have been able to find some apis that is of use to me. These api provided by liblvm2app and works like a dream. But the problem is that the library are not provided in all the RH versions. It's provided in RH 6.X and SLES11 SP2 but not on RH 5.X versions and SLES11 SP1. Problem cannot be solved merely by downloading the required library for the RH5.x version as solution should work in customer environments and not just on my machine. Shipping the library along with the solution is also rules out.
Any other suggestions to solve this problem ? |
This seems to be two separate questions: ioctl options for audio, and ioctl options for logical volumes.
Audio on RH systems should be using the pulseaudio service - though it can be disabled. The problem with talking directly to the hardware is that pulseaudio will override what you do, and if pulseaudio is disabled, then a lot of the RH audio handling disappears with it. Pulseaudio handles multiple simultaneous input from applications, and suitably (mostly) merges the result into a usable format for audio devices to output the result. LVM may or may not be available, but note: the ioctls will/may have changed since RH 5/SLES 11`- I know the software has. It would be better/easier to just update the systems. |
Quote:
Now actually I'm not looking at ioctls. I have actually got hold of apis provided by liblvm2app. These apis get the vg,lv and pv data. The problem is below: The library is not found in RHEL 5.x versions and SLES 11 SP1. The library is found in RHEL 6.X and SLES 11 SP2. What are the options for me to make use of this library seamlessly across all the above mentioned platforms?. The following two CANNOT be the options: i) Shipping the library along with the product that will do the vg probing(i.e the product in question) ii) I cannot just download and install the library as this should be present not in my local machine but in customer environment where the product would eventually get deployed. Please suggest any other alternatives |
I don't believe you can.
The libraries are for more recent implementations of LVM, and I don't think they are compatible with the older implementations. The reason the libraries were created was to isolate the changes taking place between the kernel and user mode applications. So as the kernel changes, so do the libraries. |
All times are GMT -5. The time now is 07:27 PM. |