Close

Fixing NFS

A project log for LCD music display

Legible notes that don't cost a fortune

lion-mclionheadlion mclionhead 12/08/2022 at 00:020 Comments

The immediate desire was getting rid of NFS & sending the score inside the load command.  That way rebooting doesn't need to involve mounting NFS before starting the program.  It would be simpler than configuring autofs.  The raspberry pi's have to automatically start the reader & mount the filesystem, since they crash every time the LCD panels are unplugged & the power supply is a trashed 10 year old Dell.  The problem with this is the annotations & score are separate files.  They're both gzipped.  The command packets are structured around single byte codes rather than sending a complete file.

This makes autofs the easiest way.  Past experience making virtual filesystems showed it's always easier to use NFS for sharing files than trying to make a custom solution.

Autofs begins by editing /etc/auto.master.  Uncomment the following line:

/misc   /etc/auto.misc

Then edit /etc/auto.misc & add a line for the filesystem to mount

reader          -rw,insecure,nohide,async,no_root_squash,anonuid=0 pi:/reader

Then restart autofs

service autofs restart 

The problem with autofs is all the filesystems have to be mounted inside /misc.  It can't mount anything inside /.  You have to ln -s /misc/reader /reader to get a filesystem to appear under /

Sadly, despite this level of automation, it still takes several minutes for autofs to access the filesystem after a reboot of the server.  The reader locks up for several minutes during that 1st load.  Rebooting the client goes fast.

Using dual 800Mhz raspberry pi's has been less than ideal.  The mane problem is it takes a real long time to load a score & save a score after annotating.  Page turning is fast.  The pi's also don't have a sleep mode, so they're getting expensive to keep on all day.

Discussions