This will cover several different areas including power control and networking. This is about my office setup and three systems. First the story. It's a bit long so feel free to move on to another thread...
I have a desktop PC running either KDEneon (for now) or Kubuntu 26.04, a media server running Ubuntu Server 24.04, and a Raspberry Pi running Raspbian 12 (bookworm). The Pi only runs a torrent server and uses NFSv4 to retrieve and store files on the media server. The desktop also has the servers NFS shares mounted.
The desktop has a large UPS and the server and Pi share a smaller one. The server and desktop both shut themselves down after a few minutes of power loss. The Pi is not configured to do that. Also, two routers are on the same UPS as the server and Pi. The modem has its own UPS.
This week there was a power outage at 4am and power was restored at 6:30am - I slept through it. My only indication that anything had happened was I sat down at my desk and discovered my PC was off. I normally leave it running unless I know I'm going to be gone for several days. At this point I still did not know the power had failed so I just assumed I shut it down the night before and had forgotten.
Issue #1:
When I powered up the desktop and logged in, it was lagging to the point of being barely usable but nothing in "top" looked out of place.. So first I rolled back to the previous days snapshot but the results were not different. Long story short: it was two NFS mounts causing the lag because the server was off and I hadn't noticed that yet. They were mounted with "hard" as one of the options and I assume systemd was continually re-attempting the mounts.
I never turn off the server so that was my first clue that something larger had happened. Restoring power to the server "fixed" the desktop lag.
Issue #2:
Once the server was back up, using a browser on the desktop I logged into Transmission (a torrent server) that runs on the Pi and the page was all errors. So I ssh'd into the Pi and transmission was running but the NFS mounts were not available - obviously because the server had been off. So I manually remounted them and restarted Transmission and everything was running normally.
Note that the Pi was still powered up and never shut down. I assume the UPS had more than enough battery to keep the Pi up and running for the 2.5 hours power was down.
The goal:
What I would like is to create a setup where these issues do not occur when a power outage happens. I believe it would require a sequential ending of some services and shutdown times for each of the devices, and I'm not sure where to start.
I guess somehow triggering a shutdown of the Pi, then the desktop, then finally the server. This would eliminate the failing of Transmission and the NFS mounts causing problems. Re. the NFS mounts I did change "hard" to "soft" but I haven't tested to see it that helps the lagging issue.
So I guess first thing is to figure out how to trigger the Pi to shutdown. I have ssh/rsh access from my desktop PC to the Pi so I can send a poweroff to the Pi with some trigger. Then power down the desktop before the server.
All the UPSs a Cyberpower so I'll start there...
Any suggestions are welcome.
I have a desktop PC running either KDEneon (for now) or Kubuntu 26.04, a media server running Ubuntu Server 24.04, and a Raspberry Pi running Raspbian 12 (bookworm). The Pi only runs a torrent server and uses NFSv4 to retrieve and store files on the media server. The desktop also has the servers NFS shares mounted.
The desktop has a large UPS and the server and Pi share a smaller one. The server and desktop both shut themselves down after a few minutes of power loss. The Pi is not configured to do that. Also, two routers are on the same UPS as the server and Pi. The modem has its own UPS.
This week there was a power outage at 4am and power was restored at 6:30am - I slept through it. My only indication that anything had happened was I sat down at my desk and discovered my PC was off. I normally leave it running unless I know I'm going to be gone for several days. At this point I still did not know the power had failed so I just assumed I shut it down the night before and had forgotten.
Issue #1:
When I powered up the desktop and logged in, it was lagging to the point of being barely usable but nothing in "top" looked out of place.. So first I rolled back to the previous days snapshot but the results were not different. Long story short: it was two NFS mounts causing the lag because the server was off and I hadn't noticed that yet. They were mounted with "hard" as one of the options and I assume systemd was continually re-attempting the mounts.
I never turn off the server so that was my first clue that something larger had happened. Restoring power to the server "fixed" the desktop lag.
Issue #2:
Once the server was back up, using a browser on the desktop I logged into Transmission (a torrent server) that runs on the Pi and the page was all errors. So I ssh'd into the Pi and transmission was running but the NFS mounts were not available - obviously because the server had been off. So I manually remounted them and restarted Transmission and everything was running normally.
Note that the Pi was still powered up and never shut down. I assume the UPS had more than enough battery to keep the Pi up and running for the 2.5 hours power was down.
The goal:
What I would like is to create a setup where these issues do not occur when a power outage happens. I believe it would require a sequential ending of some services and shutdown times for each of the devices, and I'm not sure where to start.
I guess somehow triggering a shutdown of the Pi, then the desktop, then finally the server. This would eliminate the failing of Transmission and the NFS mounts causing problems. Re. the NFS mounts I did change "hard" to "soft" but I haven't tested to see it that helps the lagging issue.
So I guess first thing is to figure out how to trigger the Pi to shutdown. I have ssh/rsh access from my desktop PC to the Pi so I can send a poweroff to the Pi with some trigger. Then power down the desktop before the server.
All the UPSs a Cyberpower so I'll start there...
Any suggestions are welcome.





).
Comment