Operating System - HP-UX
1819866 Members
2569 Online
109607 Solutions
New Discussion юеВ

DIOC_DESCRIBE IOCTL returned errno 25

 
Yulia Vilensky
Occasional Advisor

DIOC_DESCRIBE IOCTL returned errno 25

Hi,

DIOC_DESCRIBE ioctl for an lvm logical volume, that is also a clustered Serviceguard volume, returned errno 25.

What does it mean?
Thanks, Yulia
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: DIOC_DESCRIBE IOCTL returned errno 25

It's a bit difficult to answer a question like this without some context but errno 25 = ENOTTTY. This almost always is the result of an ioctl() call applied to an inappropriate device type. Are you seeing this in some application code or a result of a tisc output or what?
If it ain't broke, I can fix that.
Yulia Vilensky
Occasional Advisor

Re: DIOC_DESCRIBE IOCTL returned errno 25

Sorry there was a mistake, the IOCTL that failed is DIOC_CAPACITY.

I see it in our application, I just printed the errno to the syslog.

The thing we need is to get the size of the folume. First, get the number of logical blocks by DIOC_CAPACITY IOCTL, and then the block size of the volume - lgblksz field of the structure sent to the ioctl function - by DIOC_DESCRIBE IOCTL.

Does this error means that the LVM's logical volume doesn't support this ioctl?
A. Clay Stephenson
Acclaimed Contributor

Re: DIOC_DESCRIBE IOCTL returned errno 25

I've never actually tried it on a LVM LVOL but ENOTTTY is a veryu good indication that this ioctl function is not supported. The only time I have used the DIOC_XXXX ioctl calls is on the physical disk (or LUN's) themselves. I don't think there is a published API for LVM and a man 7 lvm only references commands (vgdisplay, vgcreate, ...) so as much as you would like to avoid it, I think you are going to be reduced to parsing the output of the vgdisplay and/or lvdisplay commands.
If it ain't broke, I can fix that.
Sameer_Nirmal
Honored Contributor

Re: DIOC_DESCRIBE IOCTL returned errno 25

In term of the "ioctl", the error 25 which is ENOTTY means "The request is not appropriate to the selected device".

As per my understanding, these ioctl calls should be run against the physical disk as they are meant for them. They are not meant for logical stuff like logical volumes etc.
Yulia Vilensky
Occasional Advisor

Re: DIOC_DESCRIBE IOCTL returned errno 25

The answer is to send the IOCTL to logical volume with "r" at the beginning of the name.
For example if path to logical volume name is lvm1, the ioctl should be sent to rlvm1.

Then, everything works.
Nobody here annswered to my question.