Operating System - HP-UX
1752567 Members
5261 Online
108788 Solutions
New Discussion юеВ

ioctl definition for lvm operations

 
Kallol Biswas
Occasional Contributor

ioctl definition for lvm operations

Hello,
I have been developing a software that needs issuing ioctls to a lvm device from another kernel module.

With q4 I could reconstruct the structure like
lv_querylv:
q4 cat query |grep lv
.....
28 10 struct lv_querylv
.......

q4 fields struct lv_querylv

It will take a long time to decode the lv_ioctl() routine (that is what stored in cdevsw and bdevsw)
and find out the definition for the IOCTLS
those do various operation on a lvm device.

Question: How do we get access to the header for lvm code? It is not included in the standard distribution.


Kallol
4 REPLIES 4
Stephen Keane
Honored Contributor

Re: ioctl definition for lvm operations

int fd;
struct lv_querylv {
ushort_t minor_num;
ulong_t numpxs;
ushort_t numlxs;
ushort_t maxlxs;
ushort_t lv_flags;
ushort_t sched_strat;
ushort_t maxmirrors;
} lv_querylv;

Or something like that. You need lvm.h?
Kallol Biswas
Occasional Contributor

Re: ioctl definition for lvm operations

I also could reconstruct the strcuture with q4.

I am looking for the IOCTLS for doing various LVM operation like query etc...

lv_ioctl() {

case: LVMQUERY:
.......
}

I am looking for the definition of LVMQUERY, I believe it must be available in a header file.

I used tusc on lvdisplay command but it looked like that the ioctls were issued on the group file.
Ken Green
Advisor

Re: ioctl definition for lvm operations

I am afraid that they don't make the LVM header files available :-(

your observation that the ioctl calls are made against the group file are correct. That is what the group file is there for.

Dietmar Konermann
Honored Contributor

Re: ioctl definition for lvm operations

Ken,


welcome in here! I can't believe that the Guru himself joins the Forums. :-) Great news, indeed. I remember you quite well from an Internals Class in France some years ago.


Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)