| Summary: | beagleboard/routerstation/mpc8315e: abnormal filesystem-related messages in dmesg when plugging a usb stick | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BSPs | Reporter: | Yi Zhao <yi.zhao> |
| Component: | bsps-meta-yocto | Assignee: | Donn Seeley <donn.seeley> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | bruce.ashfield, donn.seeley, dvhart, liang.li2, Qi.Chen, sgw, yi.zhao |
| Version: | 1.4 | ||
| Target Milestone: | 1.4 M6 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
|
Description
Yi Zhao
2013-02-26 03:32:32 UTC
M6 at the earliest for this, since the routerstation pro may get a kernel update before then, and will need to be retested. Bruce asked for help unloading some of his bugs... The kernel messages are due to udev's mount.sh script, which is running 'mount -t auto DEVICE' without '-o silent' to suppress error messages for failed mounts. Editing /etc/udev/scripts/mount.sh on the target to add '-o silent' makes the errors go away. If the automount eventually fails, it might be useful to have these error messages in the log. On balance, though, I think the messages are confusing and irrelevant. Any other opinions? This bug probably belongs with OE-Core, but I don't know yet how to select OE-Core versions and milestones. I'll get it straightened out tomorrow. Thanks for the analysis Donn.
I agree that in this case, since the script by design attempts
to mount filesystems that don't exist on devices, that silencing
it wouldn't be a great loss of information.
Three questions:
- are there events being generated that is causing udev to
attempt the mounts ?
- is there a way that we can mask the devices using udev rules ?
- would a real error message be lost if we silence the script ?
But I'd agree .. not a kernel issue, with a bit more information, we
should be able to change the part to 'runtime' and then see about the
maintainers view on the issue.
[...]
- are there events being generated that is causing udev to
attempt the mounts ?
Yes. These events occur both when starting up a system, and when
inserting new media. My Sabino Canyon (intel-xeon-core) board has a
semi-broken SATA drive attached to it that I've been trying to recover
(I think that it had some sectors curdled by a flaky power cable that I
have since replaced). The drive currently has no filesystem data at all
-- I ran 'dd if=/dev/zero' on it. When I boot WR Linux from USB media,
I get the same list of failed mount messages as Yi did, for the SATA
drive.
- is there a way that we can mask the devices using udev rules ?
Yes. In a sense, we're already doing this. The mount.sh script is run
from /etc/udev/rules.d/local.rules. The automount shell function in
mount.sh is triggered when we receive an 'add' event for a media
partition that isn't listed in /etc/fstab. It's easy to add '-o silent'
just for media that is automounted.
- would a real error message be lost if we silence the script ?
[...]
Yes, potentially. I can picture a situation in which an end-user
inserts media into (say) a kiosk and the device fails to recognize the
media, so the end-user (or the device owner) calls up a tech to ask why
the media wasn't recognized. The tech could check the dmesg log to make
sure that the OS tried to mount the relevant (probably FAT :-)
filesystem.
But I don't think that the noisy automount messages from the kernel are
all that useful even in a scenario like this one. I think most people
will be fine with just the knowledge that the automount failed. And
there is a nonzero cost to fending off the folks who are confused by the
automount messages in the log. I think '-o silent' is justified for
automounts.
We don't have to set this policy in the mount.sh script. We could
modify the kernel to default to MS_SILENT for automounts. I think it's
better to set the policy in mount.sh, though.
I agree that adding -o silent for automounted devices makes sense, and serious problems won't be masked. Can anyone confirm which mount this was using? Busybox vs util-linux? Busybox seems to set the MS_SILENT flag by default for auto. lrwxrwxrwx. 1 donn donn 16 Apr 9 09:25 bin/mount -> mount.util-linux Verified with dylan branch: 789b2b7e0cca404ff8ba8ed5ba823d215e6ba5b4 There is no such errors in dmesg when plugging a usb stick. |