From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: "Nik." <btrfs@avgustinov.eu>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: interest in post-mortem examination of a BTRFS system and improving the btrfs-code?
Date: Sat, 6 Apr 2019 21:28:33 +0800 [thread overview]
Message-ID: <de37a79c-fe9e-dbd8-d4b7-397fbdd9b563@gmx.com> (raw)
In-Reply-To: <52b23bd7-108b-63f3-b958-2a5959c7ca6e@gmx.com>
[-- Attachment #1.1: Type: text/plain, Size: 6204 bytes --]
On 2019/4/6 下午9:22, Qu Wenruo wrote:
>
>
> On 2019/4/6 下午9:20, Nik. wrote:
>>
>>
>> 2019-04-06 11:06, Qu Wenruo:
>>>>>
>>>>> Please try again, and sorry for the inconvenience. Hopes this is the
>>>>> last try.
>>>>
>>>> #sudo ./btrfs-corrupt-block -X /dev/md0
>>>> old offset=131072 len=0
>>>> new offset=0 len=0
>>>
>>> My bad, the first fix is bad, leading the bad result.
>>>
>>> (And that's why we need to review patches)
>>>
>>> Fortunately we have everything we need to manually set the value, no
>>> magic any more.
>>
>> So I gues the next steps were git fetch, make and run again the above
>> two commands:
>>
>> #git fetch
>> From https://github.com/adam900710/btrfs-progs
>> + c7bfe8cc...a8c26abd dirty_fix_for_nik -> origin/dirty_fix_for_nik
>> (forced update)
>
> It looks like you haven't checked out to the correct branch.
>
> You could use command 'git checkout origin/dirty_fix_for_nik' to change
> to the latest branch.
BTW, you could combine the fetch + checkout to 'git pull' directly.
Thanks,
Qu
>
> Thanks,
> Qu
>
>> #make
>> [PY] libbtrfsutil
>>
>> #./btrfs-corrupt-block -X /dev/md0
>> old offset=0 len=0
>> new offset=0 len=0
>> Successfully repair tree block at 1894009225216
>>
>> # mount -t btrfs -o ro /dev/md0 /mnt/md0/
>> mount: /mnt/md0: wrong fs type, bad option, bad superblock on /dev/md0,
>> missing codepage or helper program, or other error.
>>
>> # dmesg|tail
>> ...
>> [56146.672395] BTRFS info (device md0): disk space caching is enabled
>> [56146.841632] BTRFS info (device md0): bdev /dev/md0 errs: wr 0, rd 0,
>> flush 0, corrupt 2181, gen 0
>> [56148.097242] BTRFS critical (device md0): corrupt leaf: root=1
>> block=1894009225216 slot=30, unexpected item end, have 0 expect 15003
>> [56148.097583] BTRFS error (device md0): failed to read block groups: -5
>> [56148.140137] BTRFS error (device md0): open_ctree failed
>>
>> If the above steps were wrong - please, correct!
>>
>>> The only uncertain part is the size.
>>> If mount still fails, dmesg will tell me the size I need.
>>>
>>>
>>>> Successfully repair tree block at 1894009225216
>>>> # mount -t btrfs -o ro /dev/md0 /mnt/md0/
>>>> mount: /mnt/md0: wrong fs type, bad option, bad superblock on /dev/md0,
>>>> missing codepage or helper program, or other error.
>>>> root@bach:~# dmesg|tail
>>>> ...
>>>> [39342.860715] BTRFS info (device md0): disk space caching is enabled
>>>> [39342.933380] BTRFS info (device md0): bdev /dev/md0 errs: wr 0, rd 0,
>>>> flush 0, corrupt 2181, gen 0
>>>> [39344.197411] BTRFS critical (device md0): corrupt leaf: root=1
>>>> block=1894009225216 slot=30, unexpected item end, have 0 expect 15003
>>>> [39344.197915] BTRFS error (device md0): failed to read block groups: -5
>>>> [39344.248137] BTRFS error (device md0): open_ctree failed
>>>>
>>>> Sorry, I forgot to tell: this and previous attempt were with kernel
>>>> 4.15.0-47-generic.
>>>
>>> As long as it can output above message, the kernel version doesn't make
>>> much difference.
>>>
>>>
>>>> My Ubuntu 18.04 LTS is having enormous problems with
>>>> Kernel 5.0.2 - very long boot; network, login and other services cycling
>>>> trough "start, timeout, fail, stop" again and again, etc. If kernel 5 is
>>>> important I will need time to get it right (maybe even assistance from
>>>> another(?) developer group).
>>>> Actually with 5.0.2 each boot sends me an email about an empty and not
>>>> automatically mounted btrfs filesystem with raid1 profile, consisting
>>>> from two devices (sdb and sdi):
>>>>
>>>> kernel: [ 9.625619] BTRFS: device fsid
>>>> 05bd214a-8961-4165-9205-a5089a65b59b devid 2 transid 832 /dev/sdi
>>>>
>>>> Scrubbing it finishes almost immediately (see below), but during next
>>>> boot the email comes again:
>>>>
>>>> #btrfs scrub status /mnt/b
>>>> scrub status for 05bd214a-8961-4165-9205-a5089a65b59b
>>>> scrub started at Sat Apr 6 10:42:15 2019 and finished after
>>>> 00:00:00
>>>> total bytes scrubbed: 1.51MiB with 0 errors
>>>>
>>>> Should I be worried about it?
>>>
>>> You could try btrfs check --readonly and see what's going on.
>>> If btrfs check --readonly is OK, then it should be mostly OK.
>>
>> Then it seems to be ok, thank you!
>>
>>
>>> Thanks,
>>> Qu
>>>
>>>
>>>>
>>>> Kind regards,
>>>> Nik.
>>>> --
>>>>
>>>>> Thanks,
>>>>> Qu
>>>>>>
>>>>>> Thank you.
>>>>>> Nik.
>>>>>> --
>>>>>>
>>>>>>> Thanks,
>>>>>>> Qu
>>>>>>>
>>>>>>>>
>>>>>>>> Actually there was one warning during make, I don't know of it is
>>>>>>>> relevant:
>>>>>>>> [CC] check/main.o
>>>>>>>> check/main.c: In function ‘try_repair_inode’:
>>>>>>>> check/main.c:2688:5: warning: ‘ret’ may be used uninitialized in
>>>>>>>> this
>>>>>>>> function [-Wmaybe-uninitialized]
>>>>>>>> if (!ret) {
>>>>>>>> ^
>>>>>>>> check/main.c:2666:6: note: ‘ret’ was declared here
>>>>>>>> int ret;
>>>>>>>> ^~~
>>>>>>>>
>>>>>>>> The previous steps were as follow (output ommited, since nothing
>>>>>>>> unexpected happened):
>>>>>>>> #git clone --single-branch -v -b dirty_fix_for_nik
>>>>>>>> https://github.com/adam900710/btrfs-progs.git
>>>>>>>> #cd btrfs-progs/
>>>>>>>> #./autogen.sh
>>>>>>>> #./configure --disable-documentation --disable-convert
>>>>>>>> #make
>>>>>>>>
>>>>>>>> Did I got the right branch? Or miss any step?
>>>>>>>>
>>>>>>>> Kind regards,
>>>>>>>> Nik.
>>>>>>>> --
>>>>>>>>
>>>>>>>>> If everything goes correctly, it should output something like:
>>>>>>>>> Successfully repaired tree block at 1894009225216
>>>>>>>>> (And please ignore any grammar error in my code)
>>>>>>>>>
>>>>>>>>> After that, please run a "btrfs check --readonly" to ensure no
>>>>>>>>> other
>>>>>>>>> bit
>>>>>>>>> flip in your fs.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Qu
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hope this is ok.
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Nik.
>>>>>>>>>> -
>>>>>>>>>
>>>>>>>
>>>>>
>>>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-04-06 13:28 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <aa81a49a-d5ca-0f1c-fa75-9ed3656cff55@avgustinov.eu>
2019-03-31 18:44 ` interest in post-mortem examination of a BTRFS system and improving the btrfs-code? btrfs
2019-04-02 0:24 ` Qu Wenruo
2019-04-02 13:06 ` Nik.
2019-04-02 13:24 ` Qu Wenruo
2019-04-02 13:29 ` Hugo Mills
2019-04-02 14:05 ` Nik.
2019-04-02 13:59 ` Nik.
2019-04-02 14:12 ` Qu Wenruo
2019-04-02 14:19 ` Hans van Kranenburg
2019-04-02 15:04 ` Nik.
2019-04-02 15:07 ` Hans van Kranenburg
2019-04-02 21:22 ` Nik.
2019-04-03 1:04 ` Qu Wenruo
2019-04-04 15:27 ` Nik.
2019-04-05 0:47 ` Qu Wenruo
2019-04-05 6:58 ` Nik.
2019-04-05 7:08 ` Qu Wenruo
[not found] ` <e9720559-eff2-e88b-12b4-81defb8c29c5@avgustinov.eu>
2019-04-05 8:15 ` Qu Wenruo
2019-04-05 19:38 ` Nik.
2019-04-06 0:03 ` Qu Wenruo
2019-04-06 7:16 ` Nik.
2019-04-06 7:45 ` Qu Wenruo
2019-04-06 8:44 ` Nik.
2019-04-06 9:06 ` Qu Wenruo
2019-04-06 13:20 ` Nik.
2019-04-06 13:22 ` Qu Wenruo
2019-04-06 13:28 ` Qu Wenruo [this message]
2019-04-06 14:19 ` Nik.
2019-04-06 23:18 ` Qu Wenruo
2019-04-07 7:41 ` Nik.
2019-04-07 18:45 ` Chris Murphy
2019-04-08 13:09 ` Qu Wenruo
2019-04-08 21:22 ` Nik.
2019-04-12 10:44 ` Nik.
2019-04-12 10:50 ` Qu Wenruo
2019-04-12 11:38 ` Nik.
2019-04-12 12:45 ` Qu Wenruo
2019-05-07 17:17 ` Nik.
2019-05-07 17:30 ` Chris Murphy
2019-05-13 12:19 ` Nik.
2019-04-10 21:03 ` Nik.
2019-04-11 0:45 ` Qu Wenruo
2019-04-02 18:28 ` Chris Murphy
2019-04-02 19:02 ` Hugo Mills
2019-04-04 2:48 ` Jeff Mahoney
2019-04-04 15:58 ` Nik.
2019-04-04 17:31 ` Chris Murphy
[not found] ` <beab578a-ccaf-1ec7-c7b6-1ba9cd3743ad@avgustinov.eu>
2019-04-05 7:07 ` Chris Murphy
2019-04-05 12:07 ` Nik.
2019-04-12 10:52 ` Nik.
2019-04-05 6:53 ` Chris Murphy
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=de37a79c-fe9e-dbd8-d4b7-397fbdd9b563@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=btrfs@avgustinov.eu \
--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).