1

Environment

$ btrfs --version
btrfs-progs v4.2.1

$ uname -a
Linux [REDACTED] 4.2.1-040201-generic #201509211431 SMP Mon Sep 21 18:34:44 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Problem

Today the controller of one of my external drives died. The disk is alright though. I cracked open the case, got the drive out and connected it via a SATA-USB interface.

Now, mounting the filesystem is not possible. Here's the message:

$ btrfs fi show
warning devid 3 not found already
Label: none  uuid: bd6090df-5179-490e-a5f8-8fbad433657f
        Total devices 3 FS bytes used 3.02TiB
        devid    1 size 596.17GiB used 532.03GiB path /dev/sdd
        devid    2 size 931.51GiB used 867.03GiB path /dev/sde
        *** Some devices missing

Yes, I did bundle up three drives with very different sizes with the --single option on creating the file system. This absolutely works.

However, now:

$ mount /dev/sdd /mnt/btrfs/
mount: wrong fs type, bad option, bad superblock on /dev/sdd,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Even following the official recommendation to mount degraded does not work. Here's a dmesg excerpt:

[ 1849.938705] BTRFS info (device sdd): allowing degraded mounts
[ 1849.938716] BTRFS info (device sdd): disk space caching is enabled
[ 1849.938720] BTRFS: has skinny extents
[ 1850.345011] BTRFS: bdev (null) errs: wr 2033, rd 1074, flush 0, corrupt 0, gen 249
[ 1854.953599] BTRFS: too many missing devices, writeable mount is not allowed
[ 1854.992299] BTRFS: open_ctree failed

I'm left with what appears to be a completely broken filesystem, although all disks are in working order. It's kind of a catch 22:

  • The drive with the broken controller is recognized but will not join the btrfs filesystem.
  • I can mount read-only but that doesn't allow me to add or remove disks.

Is there any way to add the "missing" disk to the filesystem manually, ideally without removing it's data content?

I'm happy to hear any ideas.

1
  • So you have three drives but only two appear in the fi show. Where is the third one? Is it attached?
    – XTL
    Commented Nov 10, 2015 at 22:42

1 Answer 1

0

You'll need to use the following options to get filesystem mounted, while some (one?) device is missing:

mount -o degraded,ro /dev/sdd /mnt/btrfs/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .