From: Tomasz Chmielewski <tch@virtall.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>, chris@colorremedies.com
Subject: Re: btrfs device delete missing - Input/output error
Date: Sat, 06 Dec 2014 10:17:45 +0100 [thread overview]
Message-ID: <1225b43cd030194ef1ee3db419aa7a5e@admin.virtall.com> (raw)
In-Reply-To: <CAJCQCtSGy5MBVC4hQUgHBtSy+6kNOap_0Mfb7f9G4HJH9AmtUQ@mail.gmail.com>
On 2014-12-06 05:57, Chris Murphy wrote:
>> Right - so we're getting these:
>>
>> # parted /dev/sdb u s p
>> Model: ATA ST3000DM001-9YN1 (scsi)
>> Disk /dev/sdb: 5860533168s
>> Sector size (logical/physical): 512B/4096B
>
> OK it's a 4096 byte physical sector drive so you have to use the
> bs=4096 command with the proper seek value (which is based on the bs
> value).
Yep.
So here is what I did:
# echo 2262535088 / 8|bc # (512 * 8 = 4096)
282816886
* verify if it's this place
# dd if=/dev/sdb of=/dev/null bs=4096 count=1 skip=282816886
dd: reading `/dev/sdb': Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2.83002 s, 0.0 kB/s
* overwrite it:
dd if=/dev/zero of=/dev/sdb bs=4096 count=1 seek=282816886
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 3.0277e-05 s, 135 MB/s
* try to read it:
# dd if=/dev/sdb of=/dev/null bs=4096 count=1 skip=282816886
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 2.6204e-05 s, 156 MB/s
* try to read with the old skip value (repeat for 2262535088 -
2262535095, or use a different count value - this is where we were
getting the errors, it's also 8 * 512):
dd if=/dev/sdb of=/dev/null count=1 skip=2262535088
...
dd if=/dev/sdb of=/dev/null count=1 skip=2262535095
* Unfortunately this is still an error for btrfs, because the checksum
does not match:
# time btrfs device delete missing /home
ERROR: error removing the device 'missing' - Input/output error
# dmesg -c
[84200.109774] BTRFS info (device sda4): relocating block group
1375492636672 flags 17
[84203.635559] BTRFS info (device sda4): csum failed ino 261 off
384262144 csum 2566472073 expected csum 4193010590
[84203.650980] BTRFS info (device sda4): csum failed ino 261 off
384262144 csum 2566472073 expected csum 4193010590
[84203.651444] BTRFS info (device sda4): csum failed ino 261 off
384262144 csum 2566472073 expected csum 4193010590
* remounting with nodatacow (nodatasum) does not help (since it's for
new data)
* let's find the inode printing the error - turned out to be a directory
- so created a new one, moved the data from the "corrupt one", removed
the directory with that inode:
# find /home -mount -inum 261
/home/backup/ma-int/weekly
* repeat for any other found:
# dmesg -c
[85197.300494] BTRFS info (device sda4): relocating block group
1375492636672 flags 17
[85200.448713] BTRFS info (device sda4): csum failed ino 267 off
384262144 csum 2566472073 expected csum 4193010590
[85200.472581] BTRFS info (device sda4): csum failed ino 267 off
384262144 csum 2566472073 expected csum 4193010590
[85200.473551] BTRFS info (device sda4): csum failed ino 267 off
384262144 csum 2566472073 expected csum 4193010590
* unfortunately it never ends - let's say we have
/home/backup/ma-int/weekly, which we "fixed" with:
mkdir /home/backup/ma-int/weekly.tmp
mv /home/backup/ma-int/weekly/* /home/backup/ma-int/weekly.tmp
rmdir /home/backup/ma-int/weekly
After we run again btrfs device delete missing /home, the newly created
directory eventually (/home/backup/ma-int/weekly.tmp) is being detected
as "csum failed ino ...".
--
Tomasz Chmielewski
http://www.sslrack.com
next prev parent reply other threads:[~2014-12-06 9:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 10:03 btrfs device delete missing - Input/output error Tomasz Chmielewski
2014-12-05 16:49 ` Chris Murphy
[not found] ` <CAJCQCtRh7HU9yd-pxgXzXebVcjukQh6Lyhzfcd6bBJppyCxChQ@mail.gmail.com>
2014-12-05 17:28 ` Tomasz Chmielewski
2014-12-06 4:57 ` Chris Murphy
2014-12-06 9:17 ` Tomasz Chmielewski [this message]
2014-12-07 5:26 ` Chris Murphy
2014-12-07 8:56 ` Tomasz Chmielewski
-- strict thread matches above, loose matches on Subject: below --
2014-12-04 20:55 Tomasz Chmielewski
2014-12-04 22:25 ` Chris Murphy
2014-12-05 7:09 ` Duncan
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=1225b43cd030194ef1ee3db419aa7a5e@admin.virtall.com \
--to=tch@virtall.com \
--cc=chris@colorremedies.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
/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