FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 08-14-2010, 04:16 PM
Alasdair G Kergon
 
Default linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"

On Sat, Aug 14, 2010 at 04:54:01PM +0100, Alasdair G Kergon wrote:
> The only one there possibly relevant is 7e507eb6432afdd798d4c6dccf949b8c43ef151c.

I'm guessing you could have a configuration not covered by the latest userspace
libdevmapper - not handling some combination of kernel+userspace+initrd packages
correctly. We already dealt with one udev+initrd combination that failed last
week.

Alasdair

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 08-15-2010, 01:03 PM
Alasdair G Kergon
 
Default linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"

> Just a vanilla linux. No udev.

So likely a userspace problem where udev is now assumed to be present.

> > Provide long listing of /dev/mapper and any dm/lvm devices in /dev.

You can do that by running:
ls -l /dev/mapper /dev/vg01

Also:
cat /proc/devices
cat /proc/misc

Alasdair

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 08-16-2010, 02:22 PM
Alasdair G Kergon
 
Default linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"

On Mon, Aug 16, 2010 at 03:56:48PM +0200, Zdenek Kabelac wrote:
> Dne 15.8.2010 16:13, Jeff Chua napsal(a):
> > With 2.6.35++, /dev/mapper/control has moved from 60 to 236!

The latest LVM package made an assumption that it would be set up
correctly by udev (or manually in your case). We are updating
the userspace libdevmapper code to handle your circumstances
automatically.

> > # vgchange -a n vg01
> > Internal error: Maps lock 14217216 < unlock 14221312
> > Internal error: Maps lock 14221312 < unlock 14225408
> > Internal error: Maps lock 14225408 < unlock 14229504
> > Internal error: Maps lock 14229504 < unlock 14233600
> > Internal error: Maps lock 14233600 < unlock 14237696
> > Internal error: Maps lock 14237696 < unlock 14241792
> > 0 logical volume(s) in volume group "vg01" now active

> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=d7824370e26325c881b665350ce 64fb0a4fde24a

For those interested, originally we used mlockall() but in non-C locales
on some distributions glibc is configured to map 80MB+ of locale data
into memory without offering any way to unmap it. We don't need
that data locked and it increased the minimum memory required to install
a distribution as well as slowing down the LVM tools! So we had to
write a customised version that tries to skip locking unnecessary pages
like those.

Alasdair

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 08-16-2010, 03:55 PM
Alasdair G Kergon
 
Default linux-2.6.35+ causes LVM to fail with " device-mapper: version ioctl failed: Inappropriate ioctl for device"

On Mon, Aug 16, 2010 at 11:32:15PM +0800, Jeff Chua wrote:
> It'll be nice if lvm returns a more meanful message like "ioctl
> failed. Check /proc/misc to ensure the device is mapped correctly."

No need - LVM should be quite capable of detecting/dealing with the problem.

> To take care of it automatically with udev, I'm doing this in rc.S
> if [ -f /sys/devices/virtual/misc/device-mapper/dev ]
> then
> NODE=$(</sys/devices/virtual/misc/device-mapper/dev)
> rm -f /dev/mapper/control
> mknod /dev/mapper/control c ${NODE/:/ }

The whole point of this change was to trigger the loading of dm-mod
automatically for people using it as a module, based on using a known
major/minor number instead of a dynamic one only known after the module
has been loaded. That needs to happen regardless of whether someone is
using udev or not.

This can all be fixed easily enough in userspace.

Alasdair

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 01:29 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org