Bug 138487
Summary: | /dev/mapper/control incorrect after module load: Inappropriate ioctl for device | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Corey Marthaler <cmarthal> |
Component: | device-mapper | Assignee: | Alasdair Kergon <agk> |
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4.0 | Keywords: | FutureFeature |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | RHBA-2005-192 | Doc Type: | Enhancement |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-05-24 13:52:40 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 143501 |
Description
Corey Marthaler
2004-11-09 16:07:45 UTC
Just a wild guess, have you checked that the device-mapper char device has the right minor number. This could be related to #138491 they are the exact same major/minor: [root@morph-01 mapper]# ls -l /dev/misc/dlm-control crw------- 1 root root 10, 63 Nov 10 16:07 /dev/misc/dlm-control [root@morph-01 mapper]# ls -l /dev/mapper/control crw------- 1 root root 10, 63 Nov 10 14:55 /dev/mapper/control What should they be? They're dynamic - can change on each boot and should be recreated in init scripts (or after module load with a post-install trigger, if you're using device-mapper as a module). See INSTALL, scripts/devmap_mknod.sh, /proc/devices & /proc/misc. We were able to work around this by always removing /dev/mapper/control before we load the dm_mod and then running scripts/devmap_mknod.sh afterwards as suggested. How is this going to be delievered to the customer? Are they going to have access to scripts/devmap_mknod.sh and have to run it if they get into this problem? It's probably a good idea for the modprobe of dm_mod to just always run scripts/devmap_mknod.sh afterward, rather than just when /dev/mapper/control doesn't exist, that way one shouldn't get into the senario where the major/minor numbers are out of sync. The LVM2 INSTALL instructions have always explained how to do this. If that isn't happening properly, we need to work out which RPM is supposed to take responsibility for installing scripts - whichever one installs the kernel module or module utilities maybe - and get it fixed. OK. The resolution for this one is going to be to perform the function of devmap_mknod.sh transparently from inside libdevmapper whenever an attempt to access /dev/mapper/control fails. That's probably more resilient than connecting it to module load/unload, even though it's more work. patch included in dm 1.00.20 |