Mountd spamming the system log about missing sda serial

Hi, I have a problem, my /var/log/messages is full of lines like these:

2018-06-26 12:33:20 crit mountd[7811]: could not find a serial number for the device sda
2018-06-26 12:33:22 crit mountd[17126]: Last message 'could not find a ser' repeated 5 times, suppressed by syslog-ng on turris
2018-06-26 12:33:23 crit mountd[7811]: could not find a serial number for the device sda
2018-06-26 12:33:24 crit mountd[17126]: Last message 'could not find a ser' repeated 3 times, suppressed by syslog-ng on turris

/dev/sda is my USB connected SATA enclosure (“msi”) with WD 2.5" HDD used as a small NAS, running without any issues (sleeping, waking up, read and write speeds, everything works like a breeze).

udevadm info --query=all --name=/dev/sda | grep -i serial
returns nothing, but both
hdparm -I /dev/sda | grep -i serial
smartctl -i /dev/sda | grep -i serial
return the correct serial number.

How should I fix this? Thanks.

Hi,
I got the same issue. I have two disc in USB3 external box. Both disc are reported:

2018-07-03 22:27:27 crit mountd[8197]: could not find a serial number for the device sda
2018-07-03 22:27:28 crit mountd[6844]: Last message 'could not find a ser' repeated 1 times, suppressed by syslog-ng on turris
2018-07-03 22:27:28 crit mountd[8197]: could not find a serial number for the device sdb
2018-07-03 22:27:28 crit mountd[6844]: Last message 'could not find a ser' repeated 1 times, suppressed by syslog-ng on turris
2018-07-03 22:27:28 crit mountd[8197]: could not find a serial number for the device sda
2018-07-03 22:27:29 crit mountd[6844]: Last message 'could not find a ser' repeated 1 times, suppressed by syslog-ng on turris
2018-07-03 22:27:29 crit mountd[8197]: could not find a serial number for the device sdb


turris ~ # hdparm -I /dev/sda | grep -i serial
        Serial Number:      WD-WCC4N4YE7P6L
turris ~ # hdparm -I /dev/sdb | grep -i serial
        Serial Number:      WD-WCC4N3XU3TKV
        Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0

same issue on my TO after update to 3.10.3.

have 4 HDD with ntfs but only one HDD reported .

2018-07-03 22:46:54 crit mountd[28398]: Last message 'could not find a ser' repeated 5 times, suppressed by syslog-ng on turris.lan
2018-07-03 22:46:55 crit mountd[5270]: could not find a serial number for the device sde

My problems continue in 3.10.3 too (Turris 1.0).

Any progress with this issue? My external hdd is affected too.

Any progress with my ticket [#002699] about this issue? @Pepe or anyone else from Turris team?

mountd is still spamming logs with missing SDx serial … (3.10.4.)

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

Thank you for that workaround. it works perfectly. :+1:

A month after my original post my USB/SATA controller died.
A coincidence? Too much stress from this issue? Take the vote! :slight_smile:

  • Coincidence.
  • Turris did it!
  • Who knows?

0 voters

Since I replaced the controller I’m running my NAS from another OpenWrt router. I’m thinking about returning it to the Turris again, since we have a workaround now – thank you, peci1.

Maybe an even better workaround is: /etc/init.d/mountd stop; killall mountd; /etc/init.d/mountd disable if you do not need to hotplug external drives. You can always mount them manually via commandline.

doest it mean that HDDs which are connected will stay mounted to the system after restart? because I have about 5 HDD permanently connected and sometimes I need to plug in another one.

If you actually do hotplug drives, then stay with the previous workaround for staying at the comfortable side. Otherwise you’d have to connect the drives manually every time you insert them. The “new” workaround I posted was for people like me who connect just one drive that’s permanently there and never connect another one.

but the question was … if that drive will be mounted after restart, because I dont have an access to the router but still need to know that everything works (storage for graphs, ftp etc).

Drives defined in LuCI/Mountpoints (or what’s the name; it corresponds to /etc/config/fstab) will be mounted on startup. As well as the “Storage” plugin drive.