All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Martin Raiber <martin@urbackup.org>, Skibbi <skibbi@gmail.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: My first attempt to use btrfs failed miserably
Date: Sun, 2 Feb 2020 21:36:45 +0800	[thread overview]
Message-ID: <a05e919d-ef3d-57ce-4d28-e4c543e60e40@gmx.com> (raw)
In-Reply-To: <010201700617f6d3-a19297d3-8722-4745-acde-7a740c5ee33f-000000@eu-west-1.amazonses.com>


[-- Attachment #1.1: Type: text/plain, Size: 4338 bytes --]



On 2020/2/2 下午9:29, Martin Raiber wrote:
> On 02.02.2020 13:56 Qu Wenruo wrote:
>>
>> On 2020/2/2 下午8:45, Skibbi wrote:
>>> Hello,
>>> So I decided to try btrfs on my new portable WD Password Drive
>>> attached to Raspberry Pi 4. I created GPT partition, created luks2
>>> volume and formatted it with btrfs. Then I created 3 subvolumes and
>>> started copying data from other disks to one of the subvolumes. After
>>> writing around 40GB of data my filesystem crashed. That was super fast
>>> and totally discouraged me from next attempts to use btrfs :(
>>> But I would like to help with development so before I reformat my
>>> drive I can help you identifying potential issues with this filesystem
>>> by providing some debugging info.
>>>
>>> Here are some details:
>>>
>>> root@rpi4b:~# uname -a
>>> Linux rpi4b 4.19.93-v7l+ #1290 SMP Fri Jan 10 16:45:11 GMT 2020 armv7l GNU/Linux
>> Pretty old kernel, nor recently enough backports.
>>
>> And since you're already using rpi4, no reason to use armv7 kernel.
>> You can go aarch64, Archlinux ARM has latest kernel for it.
>>
>>> root@rpi4b:~# btrfs --version
>>> btrfs-progs v4.20.1
>> Old progs too.
>>
>>> root@rpi4b:~# btrfs fi show
>>> Label: 'NAS'  uuid: b16b5b3f-ce5e-42e6-bccd-b48cc641bf96
>>>         Total devices 1 FS bytes used 42.48GiB
>>>         devid    1 size 4.55TiB used 45.02GiB path /dev/mapper/NAS
>>>
>>> root@rpi4b:~# dmesg |grep btrfs
>>> [223167.290255] BTRFS: error (device dm-0) in
>>> btrfs_run_delayed_refs:2935: errno=-5 IO failure
>>> [223167.389690] BTRFS: error (device dm-0) in
>>> btrfs_run_delayed_refs:2935: errno=-5 IO failure
>>> root@rpi4b:~# dmesg |grep BTRFS
>>> [201688.941552] BTRFS: device label NAS devid 1 transid 5 /dev/sda1
>>> [201729.894774] BTRFS info (device sda1): disk space caching is enabled
>>> [201729.894789] BTRFS info (device sda1): has skinny extents
>>> [201729.894801] BTRFS info (device sda1): flagging fs with big metadata feature
>>> [201729.902120] BTRFS info (device sda1): checking UUID tree
>>> [202297.695253] BTRFS info (device sda1): disk space caching is enabled
>>> [202297.695271] BTRFS info (device sda1): has skinny extents
>>> [202439.515956] BTRFS info (device sda1): disk space caching is enabled
>>> [202439.515976] BTRFS info (device sda1): has skinny extents
>>> [202928.275644] BTRFS error (device sda1): open_ctree failed
>>> [202934.389346] BTRFS info (device sda1): disk space caching is enabled
>>> [202934.389361] BTRFS info (device sda1): has skinny extents
>>> [203040.718845] BTRFS info (device sda1): disk space caching is enabled
>>> [203040.718863] BTRFS info (device sda1): has skinny extents
>>> [203285.351377] BTRFS error (device sda1): bad tree block start, want
>>> 31457280 have 0
>> This means some tree read failed miserably.
>> It looks like btrfs is trying to read something from trimmed range.
>>
>>> [203285.383180] BTRFS error (device sda1): bad tree block start, want
>>> 31506432 have 0
>>> [203285.466743] BTRFS info (device sda1): read error corrected: ino 0
>>> off 32735232 (dev /dev/sda1 sector 80320)
>> This means btrfs still can get one good copy.
>>
>> Something is not working properly, either from btrfs or the lower stack.
>>
>> Have you tried to do the same thing without LUKS? Just btrfs over raw
>> partition.
>>
>> And it's recommended to use newer kernel anyway.
> 
> I disagree. 4.19.y is an okay kernel to use w.r.t. btrfs, especially
> since all the newer stable versions currently have the statfs() is zero
> bug. The btrfs-tools version doesn't matter much, unless one has to use
> "btrfs check", which is (hopefully) not usually necessary. As you can
> see the kernel is also ~20 days old and 4.19.y is a LTS kernel, so it
> still gets (btrfs) updates/bugfixes.
> 
> I would suspect a hardware issue with the WD disk (run badblocks for a
> while to check). The USB can also cause problems (the USB 3.0 DMA was a
> hack in RPI4 that wasn't merged upstream last I looked), but you didn't
> list the whole dmesg...

You see, the support for RPI4 is not in LTS kernel branch either...

Thus I recommend to go latest or even latest rc just like archlinuxarm
is providing.

Thanks,
Qu

> 
>>
>> Thanks,
>> Qu
>>> --
>>> Best regards
>>>
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-02-02 13:37 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-02 12:45 My first attempt to use btrfs failed miserably Skibbi
2020-02-02 12:56 ` Qu Wenruo
2020-02-02 13:22   ` Stephan von Krawczynski
2020-02-02 20:04     ` Chris Murphy
2020-02-02 13:29   ` Martin Raiber
2020-02-02 13:36     ` Qu Wenruo [this message]
2020-02-02 14:14 ` Roman Mamedov
2020-02-02 14:45 ` Swâmi Petaramesh
2020-02-02 23:34   ` Zygo Blaxell
2020-02-03  6:28     ` Skibbi
2020-02-03 16:12       ` Chris Murphy
2020-02-03 19:01         ` Marc Joliet
2020-02-03  7:00     ` Swâmi Petaramesh
2020-02-02 19:56 ` Chris Murphy
2020-02-03  6:38   ` Skibbi
2020-02-03  6:51     ` Qu Wenruo
2020-02-03  8:42       ` Skibbi
2020-02-03 10:10         ` Qu Wenruo
2020-02-03 10:17           ` Qu Wenruo
2020-02-03 10:56           ` Skibbi
2020-02-03 11:09             ` Qu Wenruo
2020-02-03 16:17     ` Chris Murphy
2020-02-02 19:57 ` Chris Murphy
2020-02-03 19:14 ` Achim Gratz

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=a05e919d-ef3d-57ce-4d28-e4c543e60e40@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=martin@urbackup.org \
    --cc=skibbi@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.