This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 197548 - auto-mounting of external disks fails with device-mapper mappings
auto-mounting of external disks fails with device-mapper mappings
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: device-mapper-multipath (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-03 19:22 EDT by Alexandre Oliva
Modified: 2007-11-30 17:11 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-07 18:56:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Output of multipath -v4, as requested (4.53 KB, text/plain)
2006-07-17 13:35 EDT, Alexandre Oliva
no flags Details

  None (edit)
Description Alexandre Oliva 2006-07-03 19:22:46 EDT
Description of problem:
The new device-mapper-based device naming seems to have broken gnome's ability
to mount external hard disks, direct use of partitions in such external disks
for raid devices and possibly more.  In the case of mdadm, I can work around the
inability to reference /dev/sda* by referencing /dev/mapper/someuglyname*, but
that's not quite as intuitive and will probably break lots of existing scripts.

Version-Release number of selected component (if applicable):
udev-094-1
device-mapper-1.02.07-1.0

How reproducible:
Every time

Steps to Reproduce:
1.Plug in external USB disk while logged into gnome

Actual results:
The external disk won't be mounted automatically.

Expected results:
It should be.

Additional info:
Comment 1 Harald Hoyer 2006-07-04 02:45:47 EDT
and why is this a bug of udev and not the gnome automounting system?
Comment 2 Alexandre Oliva 2006-07-04 10:35:14 EDT
Because the KDE automounting system is broken as well and there's other fallout
from the change in (presumably) udev that introduced all of this dm-based magic.
 Even if it's not a bug in udev per se, it was the change in (presumably) udev
that caused all of it, so at the very least you need one tracking bug like this
to dupe others into and/or clone into other fallouts.
Comment 3 Harald Hoyer 2006-07-05 03:51:58 EDT
There was no change in udev, besides of switching to udev in the first place.

Could you please explain
"the inability to reference /dev/sda* by referencing /dev/mapper/someuglyname*"
a little bit more. I'm not sure, if I understand the problem completly.
Comment 4 Alexandre Oliva 2006-07-09 23:49:36 EDT
# mount /dev/sdc1 /media/DV5000
mount: /dev/sdc1 already mounted or /media/DV5000 busy
# mount /dev/mapper/20010b92000d5b665p1 /media/DV5000
# 

/dev/sdc1 is no longer available.  I can't mount it, and I can't add it as a
raid member.  I have to use the ugly /dev/mapper name.  I'm not even sure that
unmounting the external disk is enough to be able to disconnect it safely,
without leaving dangling device-mapper devices around.
Comment 5 Harald Hoyer 2006-07-10 05:18:51 EDT
questions:
1. /dev/sdc1 is available as a device node?
2. /proc/mounts does not show sdc1 already mounted?
Comment 6 Alexandre Oliva 2006-07-10 12:24:42 EDT
Yes, it is available, and it is in use only by device-mapper.
Comment 7 Harald Hoyer 2006-07-12 02:56:34 EDT
so why is this a problem/bug of udev?
Comment 8 Alexandre Oliva 2006-07-12 15:26:38 EDT
I don't know, it was just my best guess.  I thought it was udev that had the
rules that caused the newly-available disks to be turned into device-mapper
devices.  If not, please reassign this to the appropriate package.
Comment 9 Alexandre Oliva 2006-07-15 05:09:25 EDT
As it turns out, it is device-mapper-multipath that decides that any external
disk gets multipath dm devices created for it, rendering their original /dev
devices busy and unavailable for the raid subsystem.
Comment 10 Alasdair Kergon 2006-07-15 08:37:05 EDT
You don't say which version of device-mapper-multipath package you used!  If
it's prior to 0.4.7-2.0 then please update it and retest.
Comment 11 Alexandre Oliva 2006-07-15 11:19:11 EDT
Latest test was with 0.4.7-3.1.

FWIW, one way to avoid the problem is to get at least one of the disk partitions
to become busy before device-mapper-multipath's magic strikes, e.g., by having
raidautorun by initrd's /init script to activate one of the raid members present
in the external disk.  In this case, the external disk has another partition
mounted successfully at log in.  Booting without the disk plugged in, and then
plugging it in after udev is already running, however, restores the broken
misbehavior.

See bug 197547 for more information on other problems this magic is causing.
Comment 12 Ben Marzinski 2006-07-17 11:07:43 EDT
What's in your /etc/multipath.conf file?

It should have the following lines at the top:

# Blacklist all devices by default. Remove this to enable multipathing
# on the default devices. 
devnode_blacklist {
        devnode "*"
}

This is the file that is installed by the rpm unless there already is an
/etc/multipath.conf file on the machine. With these lines in my configuration
file, I don't see any multipathed devices.

If you have these lines in you file, and they aren't commented out, and you are
getting multipathed devices anyway. Could you please plug in external device,
run multipath -F to remove all the multipath mappings, and then run multipath
-v4 and put the output in this bugzilla.
Comment 13 Alexandre Oliva 2006-07-17 13:35:21 EDT
Created attachment 132560 [details]
Output of multipath -v4, as requested

# grep -v ^# /etc/multipath.conf 


devnode_blacklist {
	devnode "*"
}

defaults {
	user_friendly_names yes
}
#

I've attached the output of multipath -v4 after multipath -F.  Thanks for
looking into this.
Comment 14 Ben Marzinski 2006-07-17 16:18:31 EDT
Arghh!

Well, it seems like I was the one looking at outdated code.  Change the config
file from

devnode_blacklist {
	devnode "*"
}

to 

blacklist {
	devnode "*"
}

And your problems should go away. I'll get a new package built that fixes the
default config file.
Comment 15 Ben Marzinski 2006-07-17 19:50:18 EDT
There's a new build 0.4.7-4.0 that has a better default config file. 
Unfortunately, like I mentioned earlier, the new config file only gets installed
if there isn't a config file already there, so you have to uninstall the old rpm,
or simply delete /etc/multipath.conf before you upgrade.
Comment 16 Alexandre Oliva 2006-07-28 16:56:10 EDT
Wouldn't it be better if the new config file got installed only if the config
file in place hadn't been changed?  I'm pretty sure there's a simple way to
accomplish this with rpm, I'm just not sure what it is.

Anyhow, the original problem is fixed, feel free to CLOSE/RAWHIDE.

Note You need to log in before you can comment on or make changes to this bug.