# Previous Life
I have been running Raspberry OS + Aria2 on my Raspberry Pi 4B as a download machine.
Unexpectedly, the greatest enemy of electronic products is Mom. During an urgent air conditioning repair operation, my mom directly unplugged the power strip with the Raspberry Pi plugged in — causing damage to the system disk.
Thus, the past life of the Raspberry Pi came to an end.
# Current Life
Learning from the past, I immediately spent a huge sum of 120 yuan to purchase the Waveshare UPS-HAT on a certain e-commerce platform to prevent power outages from causing file system faults.
I thought I could rest easy now, but to my surprise, less than half a month later, the Raspberry Pi crashed again.
At 4 o’clock in the afternoon, I opened Aria2NG as usual, added a 70GB movie download link, and it failed. Staring at the failed download task for a few seconds, I was puzzled, but didn’t think too much of it. Trying to add the task again, it still showed a red cross. Growing suspicious, I ran df -h
and found that the partition where the download directory was located was no longer mounted.
Feeling a bit flustered, but with the confidence of a senior Linux user, I tried to remount the hard drive using sudo mount -a
to use fstab
. The system reported that it could not mount. Feeling determined, I shut down and restarted.
Little did I know, this would be the last time I would see my hard drive.
Plugging the Seagate hard drive that had worked with me for over two years into the ORICO hard drive enclosure, connecting it to the Raspberry Pi, and running lsblk
, it was nowhere to be found. After several attempts to access it using SATA on a desktop computer, I only read a 3.7GB partition, running fdisk
, xfs_repair
, and so on, all resulted in a bleak Input/Output Error
.
Thus, the current life of the Raspberry Pi came to an end.
# Successor
Feeling disheartened, I thought that maybe checking the logs could reveal whether the notorious ORICO hard drive enclosure had an issue or if Aria2’s falloc
file allocation method was the culprit.
To my surprise, running journalctl -b-1
threw an error.
Specifying boot ID or boot offset has no effect, no persistent journal was found.
It turned out that the default setting of journalctl
is Storage=auto
(/etc/systemd/journald.conf
), which means that the logs stored in /run/log/journal/<machine-id>/*.journal[~]
get deleted after a restart. To make journald store logs from the last boot, Storage
must be set to persistent
, or manually create /var/log/journal/
under the Storage=auto
condition.
Since the journald logs were lost, I had to manually check the log files under /var/log/
.
pi@dottypi:/var/log $ ls
alternatives.log daemon.log.2.gz kern.log.2.gz syslog.3.gz
...
The useful logs for me were the kernel logs kern
and the system logs syslog
. Checking the aria2c
logs in syslog.7.gz
, it appeared that an error occurred when I was downloading a movie in the afternoon:
Aug 26 16:01:14 dottypi aria2c[498]: 08/26 16:01:14 [#033[1;32mNOTICE#033[0m] Download completed: [MEMORY][METADATA]Almost.Famous.2000.EXTENDED.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.5.1-FGT
Aug 26 16:01:14 dottypi aria2c[498]: 08/26 16:01:14 [#033[1;31mERROR#033[0m] Captured an exception
Aug 26 16:01:14 dottypi aria2c[498]: Exception: [AbstractDiskWriter.cc:224] errNum=5 errorCode=15 Failed to open file /mnt/Videos/Downloads/Almost.Famous.2000.EXTENDED.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.5.1-FGT/Almost.Famous.2000.EXTENDED.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.5.1-FGT.mkv, reason: Input/output error
Aug 26 16:01:14 dottypi aria2c[498]: 08/26 16:01:14 [#033[1;32mNOTICE#033[0m] Item with GID 437ddbc0a6eb7f5a did not complete: /mnt/Videos/Downloads/Almost.Famous.2000.EXTENDED.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.5.1-FGT
However, there were no hard drive error messages around 4 o’clock. Checking syslog.1
, I found that the hard drive had already encountered problems around 9 o’clock in the morning.
According to the logs, it seemed that the sequence of events was as follows:
- The hard drive encountered bad blocks;
- The USB Attached SCSI system attempted a reset to solve the issue, but failed, leading to an immediate disconnection of the USB connection;
- The XFS system logged an error, attempted to forcibly close and unmount the hard drive through systemd, but also failed.
However, it was unknown which step ultimately rendered the hard drive unreadable.
# Fourth Life
If the Raspberry Pi’s journey was a convergence of the past, present, and successor, we can take our eyes off the object itself. Do things only involve my past self, present self, and future self? Perhaps not necessarily.
“I” am just “I”, the Raspberry Pi only knows what happened to itself, or perhaps it might know what happened in the world around it — through sensors. We won’t discuss omniscient beings here, but it can be foreseen that the Raspberry Pi cannot sense how others perceive it. The Raspberry Pi and the hard drive both suffered, and I would feel sad, shed tears, and fret over the lost data, and at times, when alone, reminisce about old photos that can no longer be seen. The biggest flaw of an ordinary person’s third life is the inability to empathize with others’ feelings, which is something the three lives cannot reconcile. Even if I feel like I understand someone else’s thoughts, what I gain is merely my perception of their emotions, not pure, original feelings.
Writing this, I don’t know what I’m saying.
As the “Visuddhimagga” says, “To know the past, find out its present results; to know the future, look at its present causes.” Since this loss spanned three lives, it must be compensated for in the fourth life. Purchasing two hard drives for mutual backup, that’s all.