From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Nikolaus Rath <Nikolaus@rath.org>, linux-btrfs@vger.kernel.org
Subject: Re: fsck: to repair or not to repair
Date: Fri, 10 Jun 2016 07:05:40 -0400 [thread overview]
Message-ID: <ec929c7d-079d-8ea5-87d7-fce0ed1c45b7@gmail.com> (raw)
In-Reply-To: <87fuslg19q.fsf@vostro.rath.org>
On 2016-06-09 23:40, Nikolaus Rath wrote:
> On May 11 2016, Nikolaus Rath <Nikolaus@rath.org> wrote:
>> Hello,
>>
>> I recently ran btrfsck on one of my file systems, and got the following
>> messages:
>>
>> checking extents
>> checking free space cache
>> checking fs roots
>> root 5 inode 3149867 errors 400, nbytes wrong
>> root 5 inode 3150237 errors 400, nbytes wrong
>> root 5 inode 3150238 errors 400, nbytes wrong
>> root 5 inode 3150242 errors 400, nbytes wrong
>> root 5 inode 3150260 errors 400, nbytes wrong
>> [ lots of similar message with different inode numbers ]
>> root 5 inode 15595011 errors 400, nbytes wrong
>> root 5 inode 15595016 errors 400, nbytes wrong
>> Checking filesystem on /dev/mapper/vg0-nikratio_crypt
>> UUID: 8742472d-a9b0-4ab6-b67a-5d21f14f7a38
>> found 263648960636 bytes used err is 1
>> total csum bytes: 395314372
>> total tree bytes: 908644352
>> total fs tree bytes: 352735232
>> total extent tree bytes: 95039488
>> btree space waste bytes: 156301160
>> file data blocks allocated: 675209801728
>> referenced 410351722496
>> Btrfs v3.17
>>
>>
>> Can someone explain to me the risk that I run by attempting a repair,
>> and (conversely) what I put at stake when continuing to use this file
>> system as-is?
>
> To follow-up on this: after finding out which files were affected (using
> btrfs inspect-internal), I was able to fix the problem without using
> btrfsck by simply copying the data, deleting the file, and restoring it:
>
> cat affected-files.txt | while read -r name; do
> rsync -a "${name}" "/backup/location/${name}"
> rm -f "${name}"
> cp -a "/backup/location/${name}" "${name}"
> done
>
> (I used rsync to avoid cp making use of reflinks). After this procedure,
> btrfschk reported no more problems.
JFYI, if you've using GNU cp, you can pass '--reflink=never' to avoid it
making reflinks.
next prev parent reply other threads:[~2016-06-10 11:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 21:10 fsck: to repair or not to repair Nikolaus Rath
2016-05-12 17:02 ` Henk Slager
2016-05-12 17:35 ` Nikolaus Rath
2016-05-12 17:55 ` Ashish Samant
2016-05-13 6:36 ` Duncan
2016-05-13 15:28 ` Nikolaus Rath
2016-05-13 21:35 ` Chris Murphy
2016-05-16 11:17 ` Austin S. Hemmelgarn
2016-05-16 11:34 ` Andrei Borzenkov
2016-05-16 11:48 ` Austin S. Hemmelgarn
2016-06-10 3:40 ` Nikolaus Rath
2016-06-10 11:05 ` Austin S. Hemmelgarn [this message]
2016-06-10 15:54 ` Nikolaus Rath
2016-06-10 16:50 ` Adam Borowski
2016-06-10 16:55 ` Nikolaus Rath
2016-06-10 17:12 ` Austin S. Hemmelgarn
2016-06-10 17:22 ` Adam Borowski
2016-06-10 17:39 ` Austin S. Hemmelgarn
2016-06-10 17:40 ` Henk Slager
2016-06-10 15:55 ` Nikolaus Rath
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=ec929c7d-079d-8ea5-87d7-fce0ed1c45b7@gmail.com \
--to=ahferroin7@gmail.com \
--cc=Nikolaus@rath.org \
--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).