LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 02-22-2013, 03:48 AM   #1
kavya.
LQ Newbie
 
Registered: Mar 2012
Posts: 11

Rep: Reputation: Disabled
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.
 
Old 02-22-2013, 04:04 AM   #2
JJJCR
Member
 
Registered: Apr 2010
Posts: 566

Rep: Reputation: 26
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
 
Old 02-22-2013, 04:54 AM   #3
kavya.
LQ Newbie
 
Registered: Mar 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
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 ?.

Last edited by kavya.; 02-22-2013 at 04:56 AM. Reason: Missed some more info
 
Old 02-22-2013, 05:53 AM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,401

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
The relevant (lvm related) .src.rpm files I believe are what you want.
eg on my system
Code:
 rpm -qa|grep -i lvm
lvm2-2.02.95-10.el6_3.3.x86_64
lvm2-libs-2.02.95-10.el6_3.3.x86_64
so I'd download the .src.rpm files that matches those.

Of course if you've got a licensed subscription to RHEL, you could ask them.
 
Old 03-02-2013, 06:05 AM   #5
kavya.
LQ Newbie
 
Registered: Mar 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
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 ?
 
Old 03-02-2013, 10:40 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,613

Rep: Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662
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.
 
Old 03-04-2013, 12:30 AM   #7
kavya.
LQ Newbie
 
Registered: Mar 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
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.

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
 
Old 03-04-2013, 08:59 AM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,613

Rep: Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662
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.

Last edited by jpollard; 03-04-2013 at 09:00 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 08:02 AM
What are the ioctls that can be used to get volume group informations in linux. Dibyasri Linux - Newbie 1 02-18-2013 05:22 AM
[SOLVED] Redhat volume group,logical volume group dhairysheel Red Hat 3 08-02-2011 06:07 AM
Network interface information through ioctls sukumarbabu Programming 1 01-24-2008 08:06 AM
network interface information through ioctls sukumarbabu Linux - Networking 0 01-24-2008 04:40 AM


All times are GMT -5. The time now is 10:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration