Thursday, June 27, 2024

Garage computer is back up and running

In my last post, I said I had three things to do.  Wishful thinking, to be sure.  Make that SIX things to do:
  1. Reinstall "tank" drives, and get Plex working
  2. Reset crontab
  3. Verify that Roku works from our TV
  4. Restore Samba access to the "tank" drive
  5. Revive my "To Do List" software
  6. Either get Zina working again or find a new music streaming option
REINSTALL "TANK" DRIVES / RESET CRONTAB
"tank" is an old ZFS convention, and refers to a single logical drive made up of one or more physical drives.  In my case, it's just a single 8T drive which contains all the media, in addition to other miscellaneous stuff.  I also have a second 8T drive which is used as a RSYNC mirror via crontab.

I've been using RSYNC in a standard archive mode, which adds anything new from the active drive into the backup drive, which means that the backup drive grows larger than the active drive over time.  Since I'm rebuilding the system anyway, I decided this was a good idea to wipe the backup drive and run a fresh RSYNC from the active drive.  There's about 1.38M objects on the drive and 6.4T of data, so replicating everything took several hours.  Once it was done, the following line was put into crontab:

0 2 * * * /usr/bin/rsync -av /tank/ /tank_copy/ >> /var/log/rsync_tank.log 2>&1

GET PLEX WORKING EVERYWHERE
This was my first time restoring Plex, so I was pretty nervous.  If the restore failed, then all my organizing of the DVD would be lost.  I downloaded the latest Plex, opened up the default port so I could talk to it from my Windows desktop, and verified that it worked.

Next step was to restore the library.  I thought at first that this would be /usr/lib/plexmediaserver, but it turns out the correct path is /var/lib/plexmediaserver.  The /usr tree is binaries, and replacing that with the old ones caused Plex to break.  Restored the originals, and then verified that I could play content on my desktop.  The restore worked, and I was able to play content by traversign through my categories.  WOO HOO!

Next step was to get it working from the TV.  Since I'm using Plex in a "non-authenticated" mode, all I needed to do was point to the new nodename, "kenny".  I'm running standard everything, so this worked right away.  It's nice to see that kind of success every now and then; it seems like most of these rebuilding tasks are a big hassle.

Plex is now working, and this is a big relief.

RESTORE SAMBA ACCESS TO "TANK"
Every time I go down this road, I try to use NFS on the Windows box.  And every time, I fail.  For some reason, NFS is the easiest thing in the world on Linux boxes, and a complete nightmare on Windows boxes.  I can understand that being a problem in, say, 1998.  But it's 2024 now, and this problem still isn't solved.  I mean, MAYBE it works on Windows, but it's not trivial to set up.  And it SHOULD be.

So I gave up on that particular road, and went back to basics of Samba.  I made it all work using this tutorial page, and then customized it for my use.  My entry in /etc/samba/smb.conf looks like this:

[tank]
path = /tank
browsable =yes
writable = yes
valid users = scott
read only = no

This is after using smbuser to create the "scott" account, which is what I use from the Windows box when I mount the share.

Once this was working, I remounted it on Windows as the Z: drive.  (That's kind of what we call it around here -- "The Z Drive".)

REVIVE MY "TO DO LIST"
The only data that I lost was my project and TODO lists.  This isn't a real crisis, as I can rebuild anything that's critical.  Plus, revisiting this enables me to do things like using more recurring Tasks on Google Calendar, rather than locating them in a separate software space.  Bottom line:  It's lost data, but not a big deal

After looking around at various standalone programs, I decided to go with "ToDoIst".  It's got a free option that will cover everything I need to do.  I added three projects right away, then started populating them with tasks based on what I remember from the last few months.

This is a good example of "splintering" a program into multiple parts.  Sometimes this is a good thing as it forces you to rethink what you're doing and maybe try a different way to achieve your goals.  By splitting recurring calendar events from projects, I'm getting the project software more focused and less distracted.

REVIVE THE MUSIC STREAMER
I was having some trouble getting Zina back up and running.  This is a program from 2010, and PHP has undergone three major versions since then ... so there were a few things broken.  I found that by commenting out those lines that were complaining the most, I was able to get Zina to stream music again.  However, Zina didn't know where the CSS files were, so it looked horrible.

Functional, but ugly.  So I decided to try some alternatives:  AirSonic, Navidrome, mStream, and Ampache.  The problem with all these programs is that they don't allow you to manage your collection from a top-level Genres view.  In the case of Navidrome, the "top-level" is Albums, which would be tens of thousands in our case.

It was going to have to be Zina.  I dug into the problem, and it turned out to be a borked variable, which was pointing to a nonexistent spot.  Corrected that variable, and my graphics problem went away.  All my album covers were back, and I was able to play music just fine.

STILL A FEW ITEMS LEFT TO CLEAN UP
I need to get the Zina/MSJ support scripts working from crontab again.  While I'm revisiting it, it might be a good idea to generate the reports in a cleaner fashion.  Downloading album art is still a time-consuming process, and make this easier would be very helpful.  Also, logging in from the main screen in the garage isn't working right now, so I'm being forced to run the iDrive backups from the command line.  Which works fine, but it's just inconvenient.

That's about it.  The system is finally working again, and hopefully it'll stay this way for a while.






No comments:

Post a Comment

Hidden Mickey Report #2 - Fall 2025

This isn't going to be a "monthly" thing after all -- the last post was August.  So it's going to be a quarterly post, wit...