From: Ferry Toth <fntoth@gmail.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, Qu Wenruo <wqu@suse.com>,
Tyler Richmond <t.d.richmond@gmail.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Fwd: Read time tree block corruption detected
Date: Sat, 7 Nov 2020 14:19:50 +0100 [thread overview]
Message-ID: <a26dc3fa-f68a-31fd-dbf8-692892df6019@gmail.com> (raw)
In-Reply-To: <fcd272a5-a437-e918-8102-3813a608574c@gmx.com>
Hi
Op 07-11-2020 om 12:35 schreef Qu Wenruo:
>
> On 2020/11/7 下午7:18, Ferry Toth wrote:
>> Op 06-11-2020 om 11:32 schreef Qu Wenruo:
>>>
>>> On 2020/11/6 下午6:30, Ferry Toth wrote:
>>>> Hi
>>>>
>>>> Op 06-11-2020 om 11:24 schreef Qu Wenruo:
>>>>> On 2020/11/6 下午6:09, Ferry Toth wrote:
>>>>>> Hi Qu
>>>>>>
>>>>>> Op 06-11-2020 om 00:40 schreef Qu Wenruo:
>>>>>>> On 2020/11/6 上午7:37, Ferry Toth wrote:
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> Op 06-11-2020 om 00:32 schreef Qu Wenruo:
>>>>>>>>> On 2020/11/6 上午7:12, Ferry Toth wrote:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> Op 06-11-2020 om 00:00 schreef Qu Wenruo:
>>>>>>>>>>> On 2020/11/6 上午4:08, Ferry Toth wrote:
>>>>>>>>>>>> I am in a similar spot, during updating my distro (Kubuntu),
>>>>>>>>>>>> I am
>>>>>>>>>>>> unable
>>>>>>>>>>>> to update a certain package. I know which file it is:
>>>>>>>>>>>>
>>>>>>>>>>>> ~$ ls -l /usr/share/doc/libatk1.0-data
>>>>>>>>>>>> ls: kan geen toegang krijgen tot
>>>>>>>>>>>> '/usr/share/doc/libatk1.0-data':
>>>>>>>>>>>> Invoer-/uitvoerfout
>>>>>>>>>>>>
>>>>>>>>>>>> This creates the following in journal:
>>>>>>>>>>>>
>>>>>>>>>>>> kernel: BTRFS critical (device sda2): corrupt leaf: root=294
>>>>>>>>>>>> block=1169152675840 slot=1 ino=915987, invalid inode
>>>>>>>>>>>> generation: has
>>>>>>>>>>>> 18446744073709551492 expect [0, 5851353]
>>>>>>>>>>>> kernel: BTRFS error (device sda2): block=1169152675840 read time
>>>>>>>>>>>> tree
>>>>>>>>>>>> block corruption detected
>>>>>>>>>>>>
>>>>>>>>>>>> Now, the problem: this file is on my rootfs, which is
>>>>>>>>>>>> mounted. apt
>>>>>>>>>>>> (distribution updated) installed all packages but can't continue
>>>>>>>>>>>> configuring, because libatk is a dependancy. I can't delete the
>>>>>>>>>>>> file
>>>>>>>>>>>> because of the I/O error. And btrfs check complains (I tried
>>>>>>>>>>>> running RO)
>>>>>>>>>>>> because the file system is mounted.
>>>>>>>>>>>>
>>>>>>>>>>>> But, on the sunny side, the file system is not RO.
>>>>>>>>>>>>
>>>>>>>>>>>> Is there any way to forcefully remove the file? Or do you have a
>>>>>>>>>>>> recommendation how to proceed?
>>>>>>>>>>> Newer kernel will reject to even read the item, thus will not be
>>>>>>>>>>> able to
>>>>>>>>>>> remove it.
>>>>>>>>>> That's already the case. (input / output error)
>>>>>>>>>>> I guess you have to use some distro ISO to fix the fs.
>>>>>>>>>> And then? btrfs check --repair the disk offline?
>>>>>>>>> Yep.
>>>>>>>>>
>>>>>>>>> You would want the latest btrfs-progs though.
>>>>>>>> Groovy has 5.7. Would that be good enough? Otherwise will be
>>>>>>>> difficult
>>>>>>>> to build on/for live usb image.
>>>>>>> For your particular case, the fix are already in btrfs-progs v5.4.
>>>>>>>
>>>>>>> Although newer is always better, just in case you have extent item
>>>>>>> generation corruption, you may want v5.4.1.
>>>>>>>
>>>>>>> So your v5.7 should be good enough.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Qu
>>>>>> I made a live usb and performed:
>>>>>>
>>>>>> btrfs check --repair /dev/sda2
>>>>>>
>>>>>> It found errors and fixed them. However, it did not fix the corrupt
>>>>>> leaf. The file is actually a directory:
>>>>>>
>>>>>> ~$ stat /usr/share/doc/libatk1.0-data
>>>>>> stat: cannot statx '/usr/share/doc/libatk1.0-data':
>>>>>> Invoer-/uitvoerfout
>>>>>>
>>>>>> in journal:
>>>>>>
>>>>>> BTRFS critical (device sda2): corrupt leaf: root=294
>>>>>> block=1169152675840
>>>>>> slot=1 ino=915987, invalid inode generation: has 18446744073709551492
>>>>>> expect [0, 5852829]
>>>>>> BTRFS error (device sda2): block=1169152675840 read time tree block
>>>>>> corruption detected
>>>>>>
>>>>>> So how do I repair this? Am I doing something wrong?
>>>>> Please provide the following dump:
>>>>> btrfs ins dump-tree -b 1169152675840 /dev/sda2
>>>>>
>>>>> Feel free to remove the filenames in the dump.
>>>> sudo btrfs ins dump-tree -b 1169152675840 /dev/sda2
>>>> btrfs-progs v5.3-rc1
>>>> leaf 1169152675840 items 36 free space 966 generation 5431733 owner 294
>>>> leaf 1169152675840 flags 0x1(WRITTEN) backref revision 1
>>>> fs uuid 27155120-9ef8-47fb-b248-eaac2b7c8375
>>>> chunk uuid 5704f1ba-08fd-4f6b-9117-0e080b4e9ef0
>>>> item 0 key (915986 DIR_INDEX 2) itemoff 3957 itemsize 38
>>>> location key (915987 INODE_ITEM 0) type FILE
>>>> transid 7782235549259005952 data_len 0 name_len 8
>>>> name: smb.conf
>>>> item 1 key (915987 INODE_ITEM 0) itemoff 3797 itemsize 160
>>>> generation 1 transid 18446744073709551492 size 12464
>>>> nbytes 16384
>>> Yeah, corrupted transid.
>>>
>>> The v5.6 kernel doesn't get the fix backported...
>>>
>>> Now you have to use either the out-of-tree branch, or David's devel
>>> branch to build a btrfs-progs which is able to repair the transid error.
>>>
>>> Thanks,
>>> Qu
>>>
>> Just be to be clear, I tried to repair with the Kubuntu Groovy Live usb,
>> which has linux 5.8 and btrfs-progs 5.7.
>>
>> I didn't fix the above transid, above was taken after booting normally
>> again (linux 5.8), unfortunately with btrfs-progs v5.3-rc1 (that I built
>> a year ago). See the other post for the result with btrfs-progs 5.7.
>>
>>
> As I said already, you need either the devel branch to do the fix.
> Current release btrfs-progs hasn't the repair ability merged.
>
Ah, I understood wrong. I thought 5.7 was enough.
So, I need to build the latest and greatest and install on live usb. Or
I need to wait for a future live usb with this incorporated.
next prev parent reply other threads:[~2020-11-07 13:38 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAJheHN0FUe-ijMco1ZOc6iKF2zbPocOw+iiVNeTT1r-JuXOJww@mail.gmail.com>
2020-05-06 21:54 ` Fwd: Read time tree block corruption detected Tyler Richmond
2020-05-06 23:55 ` Chris Murphy
2020-05-07 0:51 ` Tyler Richmond
2020-05-07 1:06 ` Chris Murphy
2020-05-07 1:13 ` Fwd: " Qu Wenruo
2020-05-07 1:30 ` Tyler Richmond
2020-05-07 5:43 ` Tyler Richmond
2020-05-07 5:52 ` Qu Wenruo
2020-05-07 15:52 ` Tyler Richmond
2020-05-08 0:11 ` Qu Wenruo
2020-05-08 4:23 ` Tyler Richmond
2020-05-08 5:07 ` Qu Wenruo
2020-05-08 5:12 ` Tyler Richmond
2020-05-08 5:47 ` Qu Wenruo
2020-05-08 13:52 ` Tyler Richmond
2020-08-18 3:36 ` Tyler Richmond
[not found] ` <CAJheHN3qwDAGY=z14zfO4LBrxNJZZ_rvAMsWLwe-k+4+t3zLog@mail.gmail.com>
2020-08-18 6:07 ` Qu Wenruo
2020-08-18 12:18 ` Tyler Richmond
2020-08-23 1:15 ` Tyler Richmond
2020-08-23 1:51 ` Qu Wenruo
2020-08-23 2:31 ` Qu Wenruo
2020-08-23 2:49 ` Tyler Richmond
2020-08-23 4:28 ` Qu Wenruo
2020-08-24 2:47 ` Tyler Richmond
2020-08-24 8:26 ` Qu Wenruo
2020-08-25 5:25 ` Tyler Richmond
2020-08-25 6:37 ` Qu Wenruo
2020-08-25 13:30 ` Tyler Richmond
2020-08-25 13:38 ` Qu Wenruo
2020-08-25 13:43 ` Tyler Richmond
2020-11-05 7:01 ` Tyler Richmond
2020-11-05 7:19 ` Qu Wenruo
2020-11-05 20:08 ` Ferry Toth
2020-11-05 23:00 ` Qu Wenruo
2020-11-05 23:12 ` Ferry Toth
2020-11-05 23:32 ` Qu Wenruo
2020-11-05 23:37 ` Ferry Toth
2020-11-05 23:40 ` Qu Wenruo
2020-11-06 10:09 ` Ferry Toth
2020-11-06 10:24 ` Qu Wenruo
2020-11-06 10:27 ` Qu Wenruo
2020-11-06 10:32 ` Ferry Toth
2020-11-06 10:30 ` Ferry Toth
2020-11-06 10:32 ` Qu Wenruo
2020-11-07 11:18 ` Ferry Toth
2020-11-07 11:35 ` Qu Wenruo
2020-11-07 13:19 ` Ferry Toth [this message]
2020-11-07 13:28 ` Qu Wenruo
2020-11-07 19:50 ` Ferry Toth
2020-11-07 19:50 ` Ferry Toth
2020-11-16 10:41 ` Ferry Toth
2020-11-16 10:52 ` Andrei Borzenkov
2020-11-16 10:57 ` Ferry Toth
2020-11-16 16:35 ` Tyler Richmond
2020-11-06 11:28 ` Ferry Toth
2020-08-23 2:32 ` Tyler Richmond
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=a26dc3fa-f68a-31fd-dbf8-692892df6019@gmail.com \
--to=fntoth@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=t.d.richmond@gmail.com \
--cc=wqu@suse.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;
as well as URLs for NNTP newsgroup(s).