Impending home server hardware replacement
For a long time, my home server has been a Dell XPS 15 9530 I "borrowed" from the laptop graveyard at a previous job. My important data is stored on 2 mirrored disks that sit in a cheap USB bay attached to the laptop.
Fellow self hosters from data.coop laughed at me when I told them about this setup, but it has served me well for more than 5 years. And I think repurposing an old laptop for this has several benefits:
- Used laptops are everywhere. And easy to get your hands on, if you don't already have one in your drawer.
- It adds more years to the life of a laptop that might otherwise have been turned into a dust collector or e-waste.
- It's a small, self contained package with all you need (except an ethernet port, for which I use a dongle).
- If it even has a functioning battery (mine doesn't), it has built-in backup power in case of disruptions.
A few days ago when I got home from a concert, I was met with the surprise nobody likes as a server administrator: What looked like some sort of disk failure. at least the root file system had turned read-only. It was late, so I decided to make a copy of the syslog to another computer and turn the server off over the night. Knowing that solving this could easily take several hours and doing that kind of work during the night is no good.
Next morning I turned it on again and it booted into initramfs
. I looked at the syslog copy and found some lines indicating what the problem was:
Nov 25 22:15:23 longtail kernel: [1506099.480485] Aborting journal on device sda2-8.
Nov 25 22:15:23 longtail kernel: [1506099.484147] EXT4-fs error (device sda2): ext4_journal_check_start:83: comm rs:main Q:Reg: Detected aborted journal
Nov 25 22:15:23 longtail kernel: [1506099.484190] EXT4-fs error (device sda2): ext4_journal_check_start:83: comm systemd-journal: Detected aborted journal
Nov 25 22:15:23 longtail kernel: [1506099.486302] EXT4-fs (sda2): Remounting filesystem read-only
While I wasn't able to find out why this has happened, I learned that I could simply run fsck /dev/sda2
, let it fix my issues and then reboot back into Ubuntu. What a relief! What I worried would be a full day operation turned out to take less than half an hour.
But this laptop is more than 10 years old. I already started thinking it was about time to replace it, in order to not run into trouble with worn out hardware. This is probably the first warning that I should definitely do that.
Good thing is my previous laptop, a Dell XPS 15 9530 which is only 5 years old, has been sitting on a shelf for a long time, waiting to take over.