You are not logged in.

#1 2015-03-19 18:49:17

Quanttek
Member
Registered: 2015-01-10
Posts: 22

Btrfs RAID 1 corrupted, no write-access anymore on my personal data

Hey there,

my PC has a BTRFS Raid 1 consisting of two 2TB Hitachi HDDs (sdc and sdd). These are mounted to /home, while my SSD - also with Btrfs - is my boot partition.
Suddenly yesterday I was slowly unable to write to /home anymore. Logging failed everywhere and some important progress was unsaved when my RAID went into read-only mode. After restarting, there were some errors on startup and SystemD provided a fallback console (normal tty). Looking through the logs, It seemed like sdc has failed. After I restarted into an Ubuntu-Live-CD to retrieve one important file, I only could access my data over sdd1 - clicking on sdc1 prompted me with an error. Back in tty I tried mount -o degraded, but could only access my files read-only again. I also ran btrfsck and btrfsck --repair, because I was recomended to do so. Thus helped neither. Today I booted and was able to see LightDM with no errors on boot ( as in what is displayed on the screen. not logs), but couldn't log in because some files in /home would've been needed.
Interestingly now sdd1 is the drive I can't access my data with when using the Live-CD again.

When I now run mount /dev/drive /mnt, both emit the same error and I can't access my files:

[xxxx.yyyyyy] BTRFS error (device sdd1): unable to find ref byte nr 826736640 parent 0 root 2 owner 0 offset 0
[xxxx.yyyyyy] BTRFS: error (device sdd1) in __brtfs_free_extent:5r975 errno=-2 No such entry
[xxxx.yyyyyy] BTRFS: error (device sdd1) in btrfs_run_delayed_refs:2792: errno=-2 No such entry
[xxxx.yyyyyy] BTRFS critical (device sdd1): could not do orphan cleanup -30
[xxxx.yyyyyy] BTRFS error (device sdd1):  commit super ret -30
[xxxx.yyyyyy] BTRFS: open_ctree failed
mount: Falscher Dateitsystemtyp, ungültige Optionen, der Superblock von /dev/[i]drive[/i] ist beschädigt oder ein anderer Fehler

Manchmal liefert das Systemprotokoll wertvolle Informationen - versuchen Sie dmesg | tail oder ähnlich

But when I run either one with degraded I can access my files read-only

mount -o degraded /dev/sdc1 /mnt
[xxxx.yyyyyy] BTRFS error (device sdd1): unable to find ref byte nr 826736640 parent 0 root 2 owner 0 offset 0
[xxxx.yyyyyy] BTRFS: error (device sdd1) in __brtfs_free_extent:5r975 errno=-2 No such entry
[xxxx.yyyyyy] BTRFS: error (device sdd1) in btrfs_run_delayed_refs:2792: errno=-2 No such entry
[xxxx.yyyyyy] BTRFS critical (device sdd1): could not do orphan cleanup -30
[xxxx.yyyyyy] BTRFS error (device sdd1):  commit super ret -30
[xxxx.yyyyyy] BTRFS: open_ctree failed
mount: /dev/sdc1 ist schreibgeschützt, wird eingehängt im Nur-Lese-Modus
mount -o degraded /dev/sdd1 /mnt
[xxxx.yyyyyy] BTRFS error (device sdd1): unable to find ref byte nr 826736640 parent 0 root 2 owner 0 offset 0
[xxxx.yyyyyy] BTRFS: error (device sdd1) in __brtfs_free_extent:5r975 errno=-2 No such entry
[xxxx.yyyyyy] BTRFS: error (device sdd1) in btrfs_run_delayed_refs:2792: errno=-2 No such entry

In both cases I have to umount /dev/sdc1 to unmount them.

When running btrfsck, I get

 Errors found in extent allocation tree or chunk allocation 

How do I solve this?

Thanks for any help in advance

EDIT 1
The drive shown as failed is always the drive mentioned in /etc/fstab for the RAID.
So when  it says

 # /dev/sdd1 LABEL=Data 

in /etc/fstab, then sdc is also the drive shown in the errors

Last edited by Quanttek (2015-03-20 13:29:03)

Offline

#2 2015-03-20 14:36:33

nstgc
Member
Registered: 2014-03-17
Posts: 393

Re: Btrfs RAID 1 corrupted, no write-access anymore on my personal data

Could you post your kernel version? The new kernel (3.19.2) was just put into core yesterday.

If this was me, I would first get my data off. You should already have back ups, but make sure they are up-to-date. If you can manage to get the two devices to mount, run a scrub. If not, try btrfs-check.

[edit] Sorry, you already ran the check. Is that all that it output? Surely there was more.

[edit2] Also, you are better off using a Arch live cd instead. The Ubuntu DVD likely has older kernel, and the folks at btrfs advise only using the most recent version since btrfs is still under heavy developement.

Last edited by nstgc (2015-03-20 16:41:43)

Offline

Board footer

Powered by FluxBB