Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: BTRFS filesystem read only with unkown error

  1. #1
    Join Date
    May 2018
    Location
    Québec city
    Posts
    38

    Unhappy BTRFS filesystem read only with unkown error

    I have an encrypted USB disk formatted with BTRFS with many subvolumes on it (and another linux distro).
    I mount it on my Tumbleweed to take backups. But I have a BTRFS error that set the disk drive read only.

    Here are the extract of the systemd log :


    May 03 10:55:28 linux-0rk5 kernel: BTRFS info (device dm-5): disk space caching is enabled
    May 03 10:55:28 linux-0rk5 kernel: BTRFS info (device dm-5): has skinny extents
    May 03 10:55:30 linux-0rk5 kernel: BTRFS info (device dm-5): checking UUID tree
    May 03 10:55:30 linux-0rk5 udisksd[2191]: Mounted /dev/dm-5 at /run/media/bt/b1377a2e-14fe-433a-b268-2fee065f1fc1 on behalf of uid 1000
    May 03 10:55:30 linux-0rk5 kernel: BTRFS info (device dm-5): devid 1 device path /dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b changed to /dev/dm-5 scanned by systemd-udevd (12774)
    May 03 10:55:30 linux-0rk5 kernel: BTRFS info (device dm-5): devid 1 device path /dev/dm-5 changed to /dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b scanned by systemd-udevd (12774)
    May 03 10:55:31 linux-0rk5 kernel: BTRFS info (device dm-5): balance: resume -dusage=5
    May 03 10:55:31 linux-0rk5 kernel: BTRFS info (device dm-5): relocating block group 7815036928 flags data
    May 03 10:55:34 linux-0rk5 kernel: BTRFS info (device dm-5): found 395 extents, stage: move data extents
    May 03 10:55:35 linux-0rk5 kernel: ------------[ cut here ]------------
    May 03 10:55:35 linux-0rk5 kernel: WARNING: CPU: 0 PID: 12794 at fs/btrfs/extent-tree.c:862 lookup_inline_extent_backref+0x65c/0x6a0 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: Modules linked in: uas usb_storage ccm rfcomm nft_objref nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_REJECT xt_geoip(O) nft_fib_inet nft_fib_ipv4 nf>
    May 03 10:55:35 linux-0rk5 kernel: snd_hda_codec irqbypass hp_wmi joydev wmi_bmof sparse_keymap snd_hda_core pcspkr rfkill libarc4 r8169 snd_hwdep thermal snd_pcm realtek mdio_devres snd_ti>
    May 03 10:55:35 linux-0rk5 kernel: CPU: 0 PID: 12794 Comm: btrfs-balance Tainted: G W O 5.12.0-1-default #1 openSUSE Tumbleweed
    May 03 10:55:35 linux-0rk5 kernel: Hardware name: Hewlett-Packard HP Pavilion g6 Notebook PC/169B, BIOS F.34 08/16/2011
    May 03 10:55:35 linux-0rk5 kernel: RIP: 0010:lookup_inline_extent_backref+0x65c/0x6a0 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: Code: e9 5c fe ff ff 48 83 c1 01 48 83 f9 08 0f 85 f3 fd ff ff e9 59 fe ff ff 49 89 ed 4c 8b 7c 24 10 4c 89 e5 31 db e9 37 fc ff ff <0f> 0b b8 fb ff ff ff >
    May 03 10:55:35 linux-0rk5 kernel: RSP: 0018:ffffaf7302403940 EFLAGS: 00010202
    May 03 10:55:35 linux-0rk5 kernel: RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000001
    May 03 10:55:35 linux-0rk5 kernel: RDX: 00000000000000f5 RSI: 0000000000000004 RDI: 0000000000000000
    May 03 10:55:35 linux-0rk5 kernel: RBP: ffff8ce40633f310 R08: 0000000000000000 R09: ffff8ce40633f310
    May 03 10:55:35 linux-0rk5 kernel: R10: 00015953ed6426d0 R11: 0000000000000000 R12: ffff8ce40633f310
    May 03 10:55:35 linux-0rk5 kernel: R13: ffff8ce3c04c0680 R14: ffff8ce2ce489000 R15: ffff8ce3e1d60000
    May 03 10:55:35 linux-0rk5 kernel: FS: 0000000000000000(0000) GS:ffff8ce459400000(0000) knlGS:0000000000000000
    May 03 10:55:35 linux-0rk5 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    May 03 10:55:35 linux-0rk5 kernel: CR2: 00007f53c1b37008 CR3: 00000000b5e10000 CR4: 00000000000006f0
    May 03 10:55:35 linux-0rk5 kernel: Call Trace:
    May 03 10:55:35 linux-0rk5 kernel: ? setup_inline_extent_backref.constprop.0+0x1df/0x260 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: insert_inline_extent_backref+0x5b/0xf0 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: __btrfs_inc_extent_ref.isra.0+0x81/0x260 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: ? kmem_cache_free+0x40a/0x440
    May 03 10:55:35 linux-0rk5 kernel: ? __btrfs_run_delayed_refs+0xfbd/0x1010 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: __btrfs_run_delayed_refs+0x598/0x1010 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: ? kmem_cache_free+0x103/0x440
    May 03 10:55:35 linux-0rk5 kernel: btrfs_run_delayed_refs+0x73/0x1f0 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: btrfs_commit_transaction+0x6f/0xaa0 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: ? btrfs_update_reloc_root+0x1ca/0x240 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: prepare_to_merge+0x21e/0x250 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: relocate_block_group+0x2d3/0x5e0 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: btrfs_relocate_block_group+0x15d/0x300 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: btrfs_relocate_chunk+0x27/0xc0 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: btrfs_balance+0x6f7/0xec0 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: ? btrfs_balance+0xec0/0xec0 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: balance_kthread+0x35/0x50 [btrfs]
    May 03 10:55:35 linux-0rk5 kernel: kthread+0x11b/0x140
    May 03 10:55:35 linux-0rk5 kernel: ? __kthread_bind_mask+0x60/0x60
    May 03 10:55:35 linux-0rk5 kernel: ret_from_fork+0x22/0x30
    May 03 10:55:35 linux-0rk5 kernel: ---[ end trace 8ec11e5725b0ca96 ]---
    May 03 10:55:35 linux-0rk5 kernel: BTRFS: error (device dm-5) in btrfs_run_delayed_refs:2159: errno=-5 IO failure
    May 03 10:55:35 linux-0rk5 kernel: BTRFS info (device dm-5): forced readonly
    May 03 10:55:35 linux-0rk5 kernel: BTRFS info (device dm-5): balance: ended with status: -30



    I have tried to btrfsck the disk but it abend with the same error message.

    I have a copy of everything from this disk on my laptop disk since its a backup.
    This is an almost new 1 Tb USB disk and it shouldn't be faulty.

    Any advices ? I'm not sure of what are my options to save the data.
    and this does make me have some doubts about BTRFS .
    I'm not an expert at BTRFS anybody here would have some clues ???

    regards,
    BT

    PS: It has a lot of free space on it and the device doesn't report any IO errors.

    linux-0rk5:/home/bt/bin # btrfs filesystem usage /run/media/bt/b1377a2e-14fe-433a-b268-2fee065f1fc1
    Overall:
    Device size: 922.51GiB
    Device allocated: 279.52GiB
    Device unallocated: 642.99GiB
    Device missing: 0.00B
    Used: 250.80GiB
    Free (estimated): 669.82GiB (min: 348.32GiB)
    Free (statfs, df): 669.82GiB
    Data ratio: 1.00
    Metadata ratio: 2.00
    Global reserve: 358.08MiB (used: 0.00B)
    Multiple profiles: no

    Data,single: Size:274.01GiB, Used:247.18GiB (90.21%)
    /dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b 274.01GiB

    Metadata,DUP: Size:2.75GiB, Used:1.81GiB (65.86%)
    /dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b 5.50GiB

    System,DUP: Size:8.00MiB, Used:48.00KiB (0.59%)
    /dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b 16.00MiB

    Unallocated:
    /dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b 642.99GiB

    linux-0rk5:/home/bt/bin # btrfs device stats /run/media/bt/b1377a2e-14fe-433a-b268-2fee065f1fc1
    [/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].write_io_errs 0
    [/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].read_io_errs 0
    [/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].flush_io_errs 0
    [/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].corruption_errs 0
    [/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].generation_errs 0






  2. #2
    Join Date
    Jun 2008
    Location
    USA
    Posts
    1,395

    Default Re: BTRFS filesystem read only with unkown error

    Sorry, I have nothing to contribute to solve your problem. But, I have a long thread going about read-only errors in btrfs. In my case, the disk is old and likely failing. But, this is the third thread reporting btrfs going read-only with no easy explanation.
    Any sufficiently advanced technology is indistinguishable from magic. - Arthur C. Clarke

  3. #3
    Join Date
    May 2018
    Location
    Québec city
    Posts
    38

    Default Re: BTRFS filesystem read only with unkown error

    Quote Originally Posted by Prexy View Post
    But, this is the third thread reporting btrfs going read-only with no easy explanation.
    It already happened to me before few years ago when BTRFS make its beginning after the bad history with the REISERFS guy.
    But I assumed that BTRFS would be more reliable now, may be I'm still wrong.

    Regards,
    BT

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,534
    Blog Entries
    15

    Default Re: BTRFS filesystem read only with unkown error

    Quote Originally Posted by PerfMonk View Post
    It already happened to me before few years ago when BTRFS make its beginning after the bad history with the REISERFS guy.
    But I assumed that BTRFS would be more reliable now, may be I'm still wrong.

    Regards,
    BT
    Hi
    Not in my experience for the actual operating system, never used it for encrypted backups. All backups to ext4 or xfs....
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    2,896

    Default Re: BTRFS filesystem read only with unkown error

    Quote Originally Posted by PerfMonk View Post
    It already happened to me before few years ago when BTRFS make its beginning after the bad history with the REISERFS guy. But I assumed that BTRFS would be more reliable now, may be I'm still wrong.
    Found btrfs on my machines to be reliable as can be. You make an extraordinary claim. Provide evidence by running all 3 commands and posting their output exactly as described here: https://forums.opensuse.org/showthre...05#post3024405


    • run 'btrfs check --force /dev/sda6 2>&1|grep -v boudnary' (this line is my copy and paste of a working command. No typos whatsoever. Don't make any changes)
    • post the output of the command as is by copy/paste. Don't make changes to the output
    • run a read-only foreground scrub using 'btrfs scrub start -rB /dev/sda6' (takes some time, be patient)
    • post the output of the command as is ...
    • run 'btrfs device stats /dev/sda6'
    • post the output of the command as is ...
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  6. #6
    Join Date
    May 2018
    Location
    Québec city
    Posts
    38

    Default Re: BTRFS filesystem read only with unkown error

    Quote Originally Posted by karlmistelberger View Post
    Found btrfs on my machines to be reliable as can be. You make an extraordinary claim. Provide evidence by running all 3 commands and posting their output exactly as described here: <a href="https://forums.opensuse.org/showthread.php/552966-read-only-file-system?p=3024405#post3024405" target="_blank">https://forums.opensuse.org/showthread.php/552966-read-only-file-system?p=3024405#post3024405</a><br>
    <br>
    <ul><li style="">run 'btrfs check --force /dev/sda6 2&gt;&amp;1|grep -v boudnary' (this line is my copy and paste of a working command. No typos whatsoever. Don't make any changes)</li>
    <li style="">post the output of the command as is by copy/paste. Don't make changes to the output</li>
    <li style="">run a read-only foreground scrub using 'btrfs scrub start -rB /dev/sda6' (takes some time, be patient)</li>
    <li style="">post the output of the command as is ...</li>
    <li style="">run 'btrfs device stats /dev/sda6'</li>
    <li style="">post the output of the command as is ... </li>
    </ul>
    <br>

    Sorry for the ****, it was added because I went to preview the post before going back to change some text.

    <br>I make no extraordinary claim.&nbsp; I'm just looking at results .&nbsp; BTRFS needs to be more reliable in my particular case with an USB disk, encryption and zstd compression.<br>I have nothing against BTRFS but I'm not having a good experience with it for a second time I try it.&nbsp; That's the result I could have been happy to avoid.<br><br>Here are the results of the commands you wanted to see&nbsp; &nbsp;(I had tried it before an knew it would abend ...) :<br><br>
    Code:
    <br><span style="font-family:monospace"><span style="font-weight: bold; color: rgb(255, 84, 84);">linux-0rk5:~ #</span><span style="color: rgb(0, 0, 0);"> btrfs check --force /dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b &nbsp;2&gt;&amp;1|grep -v boudnary
    </span><br>[1/7] checking root items
    <br>[2/7] checking extents
    <br>[3/7] checking free space cache
    <br>[4/7] checking fs roots
    <br>[5/7] checking only csums items (without verifying data)
    <br>[6/7] checking root refs
    <br>[7/7] checking quota groups
    <br>check/qgroup-verify.c:546: account_all_refs: BUG_ON `ref-&gt;num_bytes != num_bytes` triggered, value 1
    <br>btrfs(+0x1f7d0)[0x5649cbf887d0]
    <br>btrfs(qgroup_verify_all+0x643)[0x5649cbf8a483]
    <br>btrfs(+0x4a4ca)[0x5649cbfb34ca]
    <br>btrfs(main+0x90)[0x5649cbf80e00]
    <br>/lib64/libc.so.6(__libc_start_main+0xd5)[0x7f3be8628b25]
    <br>btrfs(_start+0x2e)[0x5649cbf8113e]<br></span>
    <br><br>The abend is the same that posted on the first message of this thread.<br><br>The scrub won't be done because the filesystem is made read-only by btrfs&nbsp; (error code 30)<br><br>
    Code:
    <span style="font-family:monospace"><span style="font-weight: bold; color: rgb(255, 84, 84);">linux-0rk5:~ #</span><span style="color: rgb(0, 0, 0);"> mount /dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b /mnt/racine
    </span><br><span style="font-weight: bold; color: rgb(255, 84, 84);">linux-0rk5:~ #</span><span style="color: rgb(0, 0, 0);"> btrfs scrub start -rB /mnt/racine
    </span><br>ERROR: scrubbing /mnt/racine failed for device id 1: ret=-1, errno=30 (Read-only file system)
    <br>scrub canceled for b1377a2e-14fe-433a-b268-2fee065f1fc1
    <br>Scrub started: &nbsp;&nbsp;&nbsp;Tue May &nbsp;4 16:42:15 2021
    <br>Status: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aborted
    <br>Duration: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0:00:00
    <br>Total to scrub: &nbsp;&nbsp;279.52GiB
    <br>Rate: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0.00B/s
    <br>Error summary: &nbsp;&nbsp;&nbsp;no errors found<br></span>
    <br><br>And the stats are going to show there is no errors ...<br><br>
    Code:
    <span style="font-family:monospace"><span style="font-weight: bold; color: rgb(255, 84, 84);">linux-0rk5:~ #</span><span style="color: rgb(0, 0, 0);"> btrfs device stats /mnt/racine
    </span><br>[/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].write_io_errs &nbsp;&nbsp;&nbsp;0
    <br>[/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].read_io_errs &nbsp;&nbsp;&nbsp;&nbsp;0
    <br>[/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].flush_io_errs &nbsp;&nbsp;&nbsp;0
    <br>[/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].corruption_errs &nbsp;0
    <br>[/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].generation_errs &nbsp;0<br></span>
    <br><br>It looks like it a problem with a back pointer on an extent.&nbsp; &nbsp; I'm considering reformatting the drive and getting rid of BTRFS for another 5 years.<br><br>Regards,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BT

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,534
    Blog Entries
    15

    Default Re: BTRFS filesystem read only with unkown error

    Hi
    I wouldn't use it on a USB device, ext4 or XFS is your best bet...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    2,896

    Default Re: BTRFS filesystem read only with unkown error

    Quote Originally Posted by PerfMonk View Post
    <br>

    Sorry for the ****, it was added because I went to preview the post before going back to change some text.

    <br>I make no extraordinary claim.&nbsp; I'm just looking at results .&nbsp; BTRFS needs to be more reliable in my particular case with an USB disk, encryption and zstd compression.<br>I have nothing against BTRFS but I'm not having a good experience with it for a second time I try it.&nbsp; That's the result I could have been happy to avoid.<br><br>Here are the results of the commands you wanted to see&nbsp; &nbsp;(I had tried it before an knew it would abend ...) :<br><br>
    Code:
    <br><span style="font-family:monospace"><span style="font-weight: bold; color: rgb(255, 84, 84);">linux-0rk5:~ #</span><span style="color: rgb(0, 0, 0);"> btrfs check --force /dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b &nbsp;2&gt;&amp;1|grep -v boudnary
    </span><br>[1/7] checking root items
    <br>[2/7] checking extents
    <br>[3/7] checking free space cache
    <br>[4/7] checking fs roots
    <br>[5/7] checking only csums items (without verifying data)
    <br>[6/7] checking root refs
    <br>[7/7] checking quota groups
    <br>check/qgroup-verify.c:546: account_all_refs: BUG_ON `ref-&gt;num_bytes != num_bytes` triggered, value 1
    <br>btrfs(+0x1f7d0)[0x5649cbf887d0]
    <br>btrfs(qgroup_verify_all+0x643)[0x5649cbf8a483]
    <br>btrfs(+0x4a4ca)[0x5649cbfb34ca]
    <br>btrfs(main+0x90)[0x5649cbf80e00]
    <br>/lib64/libc.so.6(__libc_start_main+0xd5)[0x7f3be8628b25]
    <br>btrfs(_start+0x2e)[0x5649cbf8113e]<br></span>
    <br><br>The abend is the same that posted on the first message of this thread.<br><br>The scrub won't be done because the filesystem is made read-only by btrfs&nbsp; (error code 30)<br><br>
    Code:
    <span style="font-family:monospace"><span style="font-weight: bold; color: rgb(255, 84, 84);">linux-0rk5:~ #</span><span style="color: rgb(0, 0, 0);"> mount /dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b /mnt/racine
    </span><br><span style="font-weight: bold; color: rgb(255, 84, 84);">linux-0rk5:~ #</span><span style="color: rgb(0, 0, 0);"> btrfs scrub start -rB /mnt/racine
    </span><br>ERROR: scrubbing /mnt/racine failed for device id 1: ret=-1, errno=30 (Read-only file system)
    <br>scrub canceled for b1377a2e-14fe-433a-b268-2fee065f1fc1
    <br>Scrub started: &nbsp;&nbsp;&nbsp;Tue May &nbsp;4 16:42:15 2021
    <br>Status: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aborted
    <br>Duration: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0:00:00
    <br>Total to scrub: &nbsp;&nbsp;279.52GiB
    <br>Rate: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0.00B/s
    <br>Error summary: &nbsp;&nbsp;&nbsp;no errors found<br></span>
    <br><br>And the stats are going to show there is no errors ...<br><br>
    Code:
    <span style="font-family:monospace"><span style="font-weight: bold; color: rgb(255, 84, 84);">linux-0rk5:~ #</span><span style="color: rgb(0, 0, 0);"> btrfs device stats /mnt/racine
    </span><br>[/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].write_io_errs &nbsp;&nbsp;&nbsp;0
    <br>[/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].read_io_errs &nbsp;&nbsp;&nbsp;&nbsp;0
    <br>[/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].flush_io_errs &nbsp;&nbsp;&nbsp;0
    <br>[/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].corruption_errs &nbsp;0
    <br>[/dev/mapper/luks-18c56783-809e-43cd-b687-7377c138a95b].generation_errs &nbsp;0<br></span>
    <br><br>It looks like it a problem with a back pointer on an extent.&nbsp; &nbsp; I'm considering reformatting the drive and getting rid of BTRFS for another 5 years.<br><br>Regards,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BT
    btrfs check found a problem with quota groups. Turn off quota and try again.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  9. #9
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    2,896

    Default Re: BTRFS filesystem read only with unkown error

    Quote Originally Posted by malcolmlewis View Post
    I wouldn't use it on a USB device, ext4 or XFS is your best bet...
    No issues with btrfs and USB here. Last week the front USB headers went bad on host erlangen. It sits in a Silent Base 600: https://www.youtube.com/watch?v=camyX5txmLA They sent a replacement USB and fan control panel at no cost.

    After replacement of the front panel I did some tests with the new hardware. During mirroring a large partition from internal SSD to a btrfs partition on an USB stick using rsync I several times removed the stick from the header and inserted it again. Upon rerunning rsync mirroring would resume smoothly until no space was left on device:

    Code:
    erlangen:~ # btrfs filesystem usage -T /run/media/karl/btrfs-stick 
    Overall: 
        Device size:                  97.66GiB 
        Device allocated:             97.66GiB 
        Device unallocated:            1.00MiB 
        Device missing:                  0.00B 
        Used:                         97.17GiB 
        Free (estimated):              8.05MiB      (min: 8.05MiB) 
        Free (statfs, df):             8.05MiB 
        Data ratio:                       1.00 
        Metadata ratio:                   2.00 
        Global reserve:              231.84MiB      (used: 0.00B) 
        Multiple profiles:                  no 
    
                 Data     Metadata System               
    Id Path      single   DUP      DUP      Unallocated 
    -- --------- -------- -------- -------- ----------- 
     1 /dev/sdd1 91.63GiB  6.01GiB 16.00MiB     1.00MiB 
    -- --------- -------- -------- -------- ----------- 
       Total     91.63GiB  3.01GiB  8.00MiB     1.00MiB 
       Used      91.62GiB  2.77GiB 16.00KiB             
    erlangen:~ #

    Code:
    erlangen:~ # btrfs check --force /dev/sdd1 2>&1|grep -v boudnary                      
    WARNING: filesystem mounted, continuing because of --force 
    [1/7] checking root items 
    [2/7] checking extents 
    [3/7] checking free space cache 
    [4/7] checking fs roots 
    [5/7] checking only csums items (without verifying data) 
    [6/7] checking root refs 
    [7/7] checking quota groups skipped (not enabled on this FS) 
    Opening filesystem to check... 
    Checking filesystem on /dev/sdd1 
    UUID: 39e0955c-ea0e-44c7-9402-d7f3f2e3fd0e 
    found 101356404736 bytes used, no error found 
    total csum bytes: 96046800 
    total tree bytes: 2979708928 
    total fs tree bytes: 2735521792 
    total extent tree bytes: 123420672 
    btree space waste bytes: 454688664 
    file data blocks allocated: 98376695808 
     referenced 98376695808 
    erlangen:~ #
    Code:
    erlangen:~ # btrfs scrub start -rB /dev/sdd1 
    scrub done for 39e0955c-ea0e-44c7-9402-d7f3f2e3fd0e 
    Scrub started:    Wed May  5 09:12:23 2021 
    Status:           finished 
    Duration:         0:12:18 
    Total to scrub:   97.66GiB 
    Rate:             134.83MiB/s 
    Error summary:    no errors found 
    erlangen:~ #
    Code:
    erlangen:~ # btrfs device stats /dev/sdd1 
    [/dev/sdd1].write_io_errs    0 
    [/dev/sdd1].read_io_errs     0 
    [/dev/sdd1].flush_io_errs    0 
    [/dev/sdd1].corruption_errs  0 
    [/dev/sdd1].generation_errs  0 
    erlangen:~ #
    To my experience btrfs is pretty unbreakable. I am trying hard to break it, but failed so far. Suggestions are welcome.
    AMD Athlon 4850e (2009), openSUSE 13.1, KDE 4, Intel i3-4130 (2014), i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), openSUSE Tumbleweed, KDE Plasma 5

  10. #10
    Join Date
    May 2018
    Location
    Québec city
    Posts
    38

    Default Re: BTRFS filesystem read only with unkown error

    Quote Originally Posted by karlmistelberger View Post
    To my experience btrfs is pretty unbreakable. I am trying hard to break it, but failed so far. Suggestions are welcome.
    After a week of search for a solution. My conclusions are rather the opposite of yours : BTRFS is doomed to fail your data. Don't use BTRFS for any data you want to keep. It is not mature and does cause irreparable errors that you can't fix because this filesystem and its tools are not stable. I like a lot the BTRFS design but I won't use it for another 5 years before to check again if it is reliable.

    Thank for all who tried to help.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •