mink1956
Posts: 4
Joined: Mon Feb 10, 2020 7:50 pm

Modifying fstab/var/log entry for long-term SD Card reliability causes LMS boot failure

Mon Feb 24, 2020 11:58 pm

The line from several posts about optimizing SD Cards for longevity in RPi

Code: Select all

tmpfs /var/log tmpfs defaults,noatime,nodiratime,size=32M 0 0
caused logitechmediaserver to fail to run at boot. LMS worked fine during the installation session. I tried 7.9.2 and am now using the latest nightly build, 7.9.3, manually installed. Reverting back to the original FSTAB and adding the "tmpfs" lines one by one found this issue. Adding this single line will reliably reproduce the problem. A second RPi4 running only PiHole is fine, but this line is no longer there either for safety.

Note: device at /xxx is a Samsung QVO SSD, hence the short timeout. it holds the media files and is a backup target for raspiBackup
I left the commented line group in as a reminder, not to do this again.
/etc/fstab

Code: Select all

###################  PiLMS for MediaServer  #######################
proc            /proc           proc    defaults          0       0
PARTUUID=175dd7ce-01  /boot           vfat    defaults          0       2
PARTUUID=175dd7ce-02  /               ext4    defaults,noatime,commit=30,errors$
# PARTUUID=175dd7ce-02  /               ext4    defaults,noatime,commit=5  0   $
#added 2020-02-09
# removed 'users', added back
PARTUUID=0002dbf0-01 /xxx       ext4    defaults,noatime,auto,users,rw,nofail,x-systemd.device-timeout=5 0 0
tmpfs /tmp tmpfs defaults,noatime,nodiratime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,nodiratime,mode=1777 0 0
tmpfs /home/pi/.cache tmpfs defaults,noatime,nodiratime,size=400M 0 0
#################################################################
# This prevented LogitechMediaServer from starting on PiLMS at Boot
#tmpfs /var/log tmpfs defaults,noatime,nodiratime,size=32M 0 0   <<<<<<<<<<----------------------
#################################################################
after fail

Code: Select all

 
:~ $ netstat -t -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN     
tcp6       0      0 [::]:5900               [::]:*                  LISTEN     
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN 
Symptom is regular CPU spikes on htop and in the cpu monitor panel widget if you have that.
see this screen capture: https://drive.google.com/file/d/1lwMusg ... bFIB6/view

Remove the fstab line and all is well

Code: Select all

:~ $  netstat -t -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:9090            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:9000            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:3483            0.0.0.0:*               LISTEN
tcp6       0      0 [::]:5900               [::]:*                  LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
working environment:

Code: Select all

:~ $ uname -a
Linux pi 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
:~ $ dmesg | grep model
[    0.000000] OF: fdt: Machine model: Raspberry Pi 4 Model B Rev 1.1
:~ $ vcgencmd version
Feb 12 2020 12:36:21
Copyright (c) 2012 Broadcom
version c3c8dbdf147686fb0c3f32aece709d0653368810 (clean) (release) (start)
:~ $ dpkg -l logitechmediaserver | grep server
ii  logitechmediaserver 7.9.3~1580910396 all          Streaming Audio Server
Feel free to comment if anything looks off. Hope this saves someone some grief.
cheers

epoch1970
Posts: 4430
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Modifying fstab/var/log entry for long-term SD Card reliability causes LMS boot failure

Tue Feb 25, 2020 11:05 am

I assume the server looks for /var/log/squeezeboxserver (or some alternate name), doesn't find the directory, crashes and restart ad infinitum.
Did you visit the slimdevices forum?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Return to “General discussion”