Score:2

How to find out which disk is failing in a btrfs raid1 filesystem?

cn flag

A couple of days ago system SSD in my desktop failed completely. A week or two before some symptoms appeared: the system occasionally booted as read-only, some errors appeared. But after a reboot all worked well. SMART didn't show anything at all.

This is my main working computer and it is 10-year-old (with some upgrades). I have proper backups set up to a HDD and also important data is sent to a cloud in addition to the HDD.

So I thought: "Okay, I am too busy now, the system is failing but working. Maybe it is the SSD, maybe the motherboard or power supply is dying. I have backups. I'll keep working for some time and if it dyes completely, I replace the SSD or the whole system".

After it finally dyed completely (it was very inconvenient at that time), I found out that it was the SSD, bought another one very fast, restored a backup and was happy enough.

But still I lost some portion of my work (not a big one but still) between the backups.

I am using btrfs for a long time. I thought that there must be a better way of doing it with using raid1. So I bought another SSD and made a raid.

The plan was in case an SSD fails to mount the raid with degraded option, convert it to single, order a disk and keep working. If the other SSD doesn't fail right away, it should be good enough.

But there is a gotcha. Imagine the same failure case. How do I know which disk is guilty? The problem is that raid1 can be mounted as degraded only once, so it is hard to test it.

Does any have any ideas?

N0rbert avatar
zw flag
`sudo smartctl --scan` with relevant driver should show the info about harware RAID, including disk SMART. You can consult with [man-page](http://manpages.ubuntu.com/manpages/focal/en/man8/smartctl.8.html) for details.
Pilot6 avatar
cn flag
It is not a hardware raid. And smartctl didn't show anything even after the disk became unreadable :-)

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.