Mountd spamming the system log about missing sda serial

I think that’s because of the ancient version of mountd in TOS. This version assumes /proc/scsi/usb-storage/sda exists, which is not true in my case, and that’s the source of the errors (lib/mount.c:344 in http://mirror2.openwrt.org/sources/mountd-0.1.tar.bz2 ).

The error is probably no problem, since it’s only called from mount_enum_drives, which means, in the worst case, mountd won’t see the drive - but mountd is only used for hotplugged drives AFAIK - for static drives mounted on boot according to fstab, it’s block mount which mounts them.

I don’t think this will get fixed in TOS 3.*, so we have to wait for TOS 4, where updated versions of everything will hopefully solve this issue.

Workaround until then:

/etc/syslog-ng.conf:

// add this filter anywhere in the file
filter f_not_mountd_error {
    not match(".*could not find a serial number for the device sda.*" value(MESSAGE));
};

log {
    source(src);
    source(kernel);
    filter(f_turris_iptables);
    filter(f_not_mountd_error);  // add this line
    destination(messages);
};
3 Likes