Matt Burgess wrote: > On Wed, 2012-11-28 at 20:44 -0800, Bryan Kadzban wrote: > >> it's a SATA drive. I'm pretty sure all of those show up as SCSI. > > That's what I thought as well, hence the sd* name, rather than hd*. > >> What does a udevadm info --attribute-walk on this device's /sys >> directory show? > > Attached.
Well that looks like it. :-) Note the devpath in there: /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda3 Also, this bit of code in udev-builtin-path_id.c, in handle_scsi(): /* * We do not support the ATA transport class, it creates duplicated link * names as the fake SCSI host adapters are all separated, they are all * re-based as host == 0. ATA should just stop faking two duplicated * hierarchies for a single topology and leave the SCSI stuff alone; * until that happens, there are no by-path/ links for ATA devices behind * an ATA transport class. */ if (strstr(name, "/ata") != NULL) { parent = NULL; goto out; } "name" here is the syspath, which I assume is the devpath printed by udevadm info. That strstr() is going to return something non-NULL in your case (it'll point at the ata1 entry), so this code will prevent path_id from doing anything. (Which explains why it works for USB. There's no IDE or SATA involved there.) The next question is why my machine still has these. And looking at udev-builtin-path_id.c in my version of udev (-180), indeed, that chunk is missing -- but I'm still not running the version out of systemd on my main machine, so that's why. Looks like it got added back in March: http://git.kernel.org/?p=linux/hotplug/udev.git;a=blobdiff;f=src/udev-builtin-path_id.c;h=5de72194a2185bbbc93b85630d182994fe165c0e;hp=b18b162755880b5d4c35fbc313ec00052d2b0c9e;hb=481dcf7c8fa8fd9fd181b59443b7e30e9b42add4;hpb=8e90942c7af2508f88c7284a0b116caf7ec854a9 in the old separate udev tree. So this has been disabled ever since -182, if I'm reading the tags correctly in the git tree. From the comment, it looks like the problem isn't so much the ATA config, it's the other (according to the comments up in handle_scsi_default()) stupid code in path_id that tries to rebase SCSI host numbers. The fact that each ata* directory only has one SCSI host* subdirectory, because (e.g.) ata0 and ata1 are different kobjects, is what's causing the duplicate symlinks that the comment is talking about. But if the path_id code just *didn't do the rebasing*, then there wouldn't be a problem. I suppose at that point it depends on whether the host number exported from the kernel is stable; if not then it's no worse this way. I suppose another way to do it would be to change path_id to use the ata device as the parent of the scsi device, naming the symlinks pci-<foo>-ata-<bar>-scsi-<baz>. That could change existing device links, but they're missing now anyway, so not likely. The last question is whether there's anything that can be done in the kernel configuration to stop this (skipping the ata transport stuff). I don't see anything helpful. I'm half considering just ripping out both chunks of code in the next udev I end up building, to see what happens. My one machine isn't a good enough test for doing that in the book, though, I don't think...
signature.asc
Description: OpenPGP digital signature
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page