Ceci est une ancienne révision du document !
Last month, I wrote about pressing my Raspberry Pi into service to start hosting some always-on tools that I use internally, now that I’ve replaced my NUC with a Dell XPS 15 7590. This month, I wanted to give a small update on things I’ve noticed while using the RPi for over a month now.
Concerns
In my last article, I mentioned that while avahi-daemon was running, the local domain didn’t always work (raspberrypi.local). Besides that, I also noticed the following issues: • My fstab entry didn’t work for the btrfs drive I was using. • I needed to mount a portable hard drive in the same location as my desktop-bound hard drive, so that Plex could still load/read the media structure without me having to manage two libraries. • Static IPs as configured on my RPi didn’t seem to be working in my last article.
Fstab
Turns out the fstab entry I wrote (based off an ext4 entry) had some options I couldn’t use for btrfs. The fix was fairly straightforward (looking up what options were supported by btrfs and removing any that weren’t). The tricky part was figuring out what the issue was - I expected the drive to be mounted on boot, but it wasn’t. Manually running sudo mount -a did yield error messages though (albeit not terribly detailed ones). A bit of googling later and I figured out an entry that works. As such, if anyone else needs to debug an fstab entry for a slightly less common filesystem, I recommend checking the options you’re using before moving on to more complicated debugging.
Mount point used for two drives (never simultaneously)
Point here is that I have a 3TB WD MyBook that sits on my desk and runs off an AC adapter and is connected via USB. Read/write speeds seem to be a bit faster for that drive compared to the 4TB portable drive I have (full size hard drive VS laptop size hard drive). However, it’s not a device I can reasonably pack up and take on vacation with me (especially as the AC adapter is for Germany and would require an adapter in Canada). What I did instead was to copy over the data from the 3TB drive to the 4TB drive, and create a new entry in the fstab (with a nofail option) so that I can boot the Pi regardless of whether or not one of the drives are connected. After the first slower boot, I can then uncomment/comment the corresponding lines. Both drives have the same folder structure and can therefore act as drop-in replacements for Plex. As the media is the same on both as well, I don’t need to rescan the library to adjust the selection.
I set this up at our cottage like I usually do (where the Pi acts as a print server for an old Brother printer and as a Plex server). I had no issues whatsoever once I had mounted the drive properly.
Static IPs
I also noticed that the static IP I set up for my cottage network was working just fine when the device connected to the wireless. As for the issues I had back home, I think it was caused by a few factors: • We have a Ubiquiti UniFi AC wireless access point that provides our wireless network. Turns out, the device had at some point taken the IP I originally assigned to the Pi for itself. • I also connected the Pi to my wired LAN, whereas I realized my static IP was only set up for the wireless interface.
As such, I think it's safe to assume that the static IP configuration I’m using actually works, and that I simply need to adjust the IP for my other wireless network. I’m not yet sure if it makes sense to configure a static IP for the LAN interface, as it will cause issues the moment a router uses a different subset or the IP is taken.
Avahi-daemon
I also believe the issues I had with the raspberrypi.local domain were coming from the fact that both the wireless and the LAN connection were active at the same time (and as such the interfaces weren’t sure which should receive traffic on that domain). Since I’ve been at our cottage and the Pi has been running solely on wireless, I’ve had no issues with the local domain.
That being said - Android does not seem to handle mDNS at all, so you’ll need to use IP addresses specifically when using an Android tablet or phone. My iPad connects to the local domain without issues, so it does seem to be only an Android issue. I don’t really mind this, so long as I have access to some device where I can use ping to discover the automatically assigned IP in those rare cases where the Pi is active somewhere I haven’t configured a static IP.
Hopefully this article can help anyone who might be using a Raspberry Pi in a similar environment. If you have any other tips you want to share, or if you have any article ideas you want to pass along to me, you can reach me at lswest34+fcm@gmail.com.