linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: constantine <costas.magnuse@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Btrfs and LBA errors
Date: Fri, 11 Jul 2014 13:42:40 +0200	[thread overview]
Message-ID: <CANcfdL3ZUwOGPf2YQpyXYSd8ZoNntyaX8rdQXdciSADGCsb-Sg@mail.gmail.com> (raw)

Hi everybody!

Btrfs filesystem could not be mounted because /dev/sdc1 had unreadable sectors.
It is/was  a single filesystem (not raid1 or raid0) over /dev/sda1 and
/dev/sdc1.
I wrote the unreadable sectors with hdparm but filesystem still cannot
be mounted (sectors were too early perhaps).

What should be my next step  for recovering the btrfs filesystem?


#### Analytically:

After
# smartctl -t long /dev/sdc
I got
"Extended offline   Completed: read failure   90%   19662   2176"

So LBA_of_first_error: 2176

With
# hdparm --read-sector
I found out that 2176-2183 LBA sectors were unreadable.

I wrote them with
# hdparm --write-sector
and now smartctl does not report any error.

However when I run
# btrfs fi show
I get:

Label: 'partition'  uuid: c1eb1aaf-665a-4337-9d04-3c3921aa67e0
        Total devices 2 FS bytes used 1.53TiB
        devid    2 size 1.37TiB used 195.00GiB path /dev/sda1
        *** Some devices missing


#### Complementary Information
# uname -a
Linux hostname 3.15.5-031505-generic #201407091543 SMP Wed Jul 9
19:44:36 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

#   btrfs --version
Btrfs v3.12

#   btrfs fi show
Label: 'partition'  uuid: c1eb1aaf-665a-4337-9d04-3c3921aa67e0
        Total devices 2 FS bytes used 1.53TiB
        devid    2 size 1.37TiB used 195.00GiB path /dev/sda1
        *** Some devices missing

Btrfs v3.12

# btrfs fi df /mnt/partition
ERROR: couldn't get space info - Inappropriate ioctl for device
ERROR: get_df failed Inappropriate ioctl for device

             reply	other threads:[~2014-07-11 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11 11:42 constantine [this message]
2014-07-11 12:36 ` Btrfs and LBA errors Russell Coker
2014-07-11 19:29   ` constantine
2014-07-12  1:23     ` Russell Coker
2014-07-15  9:42       ` constantine
2014-07-15  9:51         ` Russell Coker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANcfdL3ZUwOGPf2YQpyXYSd8ZoNntyaX8rdQXdciSADGCsb-Sg@mail.gmail.com \
    --to=costas.magnuse@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).