Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: BTRFS filesystem read only with unkown error

  1. #11
    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
    After a week of search for a solution.
    I am not sure whether you actually searched for a solution. You missed to check the suggestion made: https://forums.opensuse.org/showthre...70#post3027070

    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.
    That's not a conclusion but a rant, in my opinion of course.
    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

  2. #12
    Join Date
    Mar 2020
    Location
    São Leopoldo, RS, Brazil
    Posts
    329

    Default Re: BTRFS filesystem read only with unkown error

    Disk was unmounted while a balance operation was running:

    balance: resume -dusage=5
    Mounting again and it attempts to resume the operation, but fails for some reason.

    Find the thread by user "Prexy" where the recovery for this is documented.
    openSUSE Tumbleweed

  3. #13

    Default Re: BTRFS filesystem read only with unkown error

    I found this thread while searching for an error in my dmesg output:
    btrfs_run_delayed_refs:2159: errno=-5 IO failure
    In my case, it's a new but cheap SSD on a machine that recently had a disk failure. The Btrfs partition on the new disk started going read-only a few seconds or minutes after being mounted. So I can't claim that it's definitely a Btrfs bug, maybe I have another failing disk. But it seems suspicious that I'm seeing lots of balance errors in the dmesg output, and I had thousands of snapshots on this particular filesystem, and the problem started after a dirty shutdown. Additionally, I have another copy of openSUSE on a different Btrfs partition on the same disk, and it's still working fine. Here's the detailed bug report, if anybody can find any useful tidbits in the errors and logs I posted I'd appreciate it!
    https://bugzilla.opensuse.org/show_bug.cgi?id=1185922

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

    Default Re: BTRFS filesystem read only with unkown error

    Quote Originally Posted by sb56637 View Post
    I found this thread while searching for an error in my dmesg output:
    btrfs_run_delayed_refs:2159: errno=-5 IO failure
    In my case, it's a new but cheap SSD on a machine that recently had a disk failure. The Btrfs partition on the new disk started going read-only a few seconds or minutes after being mounted. So I can't claim that it's definitely a Btrfs bug, maybe I have another failing disk. But it seems suspicious that I'm seeing lots of balance errors in the dmesg output, and I had thousands of snapshots on this particular filesystem, and the problem started after a dirty shutdown. Additionally, I have another copy of openSUSE on a different Btrfs partition on the same disk, and it's still working fine. Here's the detailed bug report, if anybody can find any useful tidbits in the errors and logs I posted I'd appreciate it!
    https://bugzilla.opensuse.org/show_bug.cgi?id=1185922
    Did you ever try a raw read?
    Code:
    erlangen:~ # dd if=/dev/nvme0n1p3 of=/dev/null bs=4M 
    13232+1 records in 
    13232+1 records out 
    55501127680 bytes (56 GB, 52 GiB) copied, 24.9852 s, 2.2 GB/s 
    erlangen:~ #
    
    Check the log for messages:
    Code:
    erlangen:~ # journalctl -b 0 _KERNEL_SUBSYSTEM=scsi 
    -- Logs begin at Sun 2021-05-09 21:56:57 CEST, end at Sat 2021-05-15 21:24:50 CEST. -- 
    May 15 10:04:27 erlangen kernel: scsi host0: ahci 
    May 15 10:04:27 erlangen kernel: scsi host1: ahci 
    May 15 10:04:27 erlangen kernel: scsi host2: ahci 
    May 15 10:04:27 erlangen kernel: scsi host3: ahci 
    May 15 10:04:27 erlangen kernel: scsi host4: ahci 
    May 15 10:04:27 erlangen kernel: scsi host5: ahci 
    May 15 10:04:27 erlangen kernel: scsi 2:0:0:0: Direct-Access     ATA      CT2000BX500SSD1  030  PQ: 0 ANSI: 5
    May 15 10:04:27 erlangen kernel: sd 2:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
    May 15 10:04:27 erlangen kernel: sd 2:0:0:0: [sda] Write Protect is off
    May 15 10:04:27 erlangen kernel: sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
    May 15 10:04:27 erlangen kernel: sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    May 15 10:04:27 erlangen kernel: scsi 3:0:0:0: Direct-Access     ATA      WDC WD40EZRX-22S 0A80 PQ: 0 ANSI: 5
    May 15 10:04:27 erlangen kernel: sd 3:0:0:0: [sdb] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
    May 15 10:04:27 erlangen kernel: sd 3:0:0:0: [sdb] 4096-byte physical blocks
    May 15 10:04:27 erlangen kernel: sd 3:0:0:0: [sdb] Write Protect is off
    May 15 10:04:27 erlangen kernel: sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
    May 15 10:04:27 erlangen kernel: sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    May 15 10:04:27 erlangen kernel: scsi 4:0:0:0: Direct-Access     ATA      Samsung SSD 850  3B6Q PQ: 0 ANSI: 5
    May 15 10:04:27 erlangen kernel: sd 4:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/466 GiB)
    May 15 10:04:27 erlangen kernel: sd 4:0:0:0: [sdc] Write Protect is off
    May 15 10:04:27 erlangen kernel: sd 4:0:0:0: [sdc] Mode Sense: 00 3a 00 00
    May 15 10:04:27 erlangen kernel: sd 4:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    May 15 10:04:27 erlangen kernel: scsi 5:0:0:0: CD-ROM            PIONEER  DVD-RW  DVR-221  1.00 PQ: 0 ANSI: 5
    May 15 10:04:27 erlangen kernel: sd 4:0:0:0: [sdc] supports TCG Opal
    May 15 10:04:27 erlangen kernel: sd 4:0:0:0: [sdc] Attached SCSI disk
    May 15 10:04:27 erlangen kernel: sd 2:0:0:0: [sda] Attached SCSI disk
    May 15 10:04:27 erlangen kernel: sd 3:0:0:0: [sdb] Attached SCSI disk
    May 15 10:04:27 erlangen kernel: sd 2:0:0:0: Attached scsi generic sg0 type 0
    May 15 10:04:27 erlangen kernel: sd 3:0:0:0: Attached scsi generic sg1 type 0
    May 15 10:04:27 erlangen kernel: sd 4:0:0:0: Attached scsi generic sg2 type 0
    May 15 10:04:27 erlangen kernel: scsi 5:0:0:0: Attached scsi generic sg3 type 5
    May 15 10:04:28 erlangen kernel: sr 5:0:0:0: [sr0] scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray 
    May 15 10:04:28 erlangen kernel: sr 5:0:0:0: Attached scsi CD-ROM sr0
    erlangen:~ #
    
    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

  5. #15

    Default Re: BTRFS filesystem read only with unkown error

    Hi karlmistelberger, thanks for the reply. For me I guess the command would be this?
    dd if=/dev/sda3 of=/dev/null bs=4M

    And what can be determined with this command? If the disk is failing it will throw errors in dmesg?

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

    Default Re: BTRFS filesystem read only with unkown error

    Quote Originally Posted by sb56637 View Post
    Hi karlmistelberger, thanks for the reply. For me I guess the command would be this?
    dd if=/dev/sda3 of=/dev/null bs=4M

    And what can be determined with this command? If the disk is failing it will throw errors in dmesg?
    The command exercises all of kernel, interface, disk drive and file system. You want to filter messages as follows:
    Code:
    erlangen:~ # journalctl -b 0 _KERNEL_SUBSYSTEM=scsi              
    -- Logs begin at Sun 2021-05-09 21:56:57 CEST, end at Sun 2021-05-16 17:19:57 CEST. -- 
    May 16 14:46:54 erlangen kernel: scsi host0: ahci 
    May 16 14:46:54 erlangen kernel: scsi host1: ahci 
    May 16 14:46:54 erlangen kernel: scsi host2: ahci 
    May 16 14:46:54 erlangen kernel: scsi host3: ahci 
    May 16 14:46:54 erlangen kernel: scsi host4: ahci 
    May 16 14:46:54 erlangen kernel: scsi host5: ahci 
    May 16 14:46:54 erlangen kernel: scsi 2:0:0:0: Direct-Access     ATA      CT2000BX500SSD1  030  PQ: 0 ANSI: 5
    May 16 14:46:54 erlangen kernel: sd 2:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
    May 16 14:46:54 erlangen kernel: sd 2:0:0:0: [sda] Write Protect is off
    May 16 14:46:54 erlangen kernel: sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
    May 16 14:46:54 erlangen kernel: sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    May 16 14:46:54 erlangen kernel: scsi 3:0:0:0: Direct-Access     ATA      WDC WD40EZRX-22S 0A80 PQ: 0 ANSI: 5
    May 16 14:46:54 erlangen kernel: sd 3:0:0:0: [sdb] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
    May 16 14:46:54 erlangen kernel: sd 3:0:0:0: [sdb] 4096-byte physical blocks
    May 16 14:46:54 erlangen kernel: sd 3:0:0:0: [sdb] Write Protect is off
    May 16 14:46:54 erlangen kernel: sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
    May 16 14:46:54 erlangen kernel: sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    May 16 14:46:54 erlangen kernel: scsi 4:0:0:0: Direct-Access     ATA      Samsung SSD 850  3B6Q PQ: 0 ANSI: 5
    May 16 14:46:54 erlangen kernel: sd 4:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/466 GiB)
    May 16 14:46:54 erlangen kernel: sd 4:0:0:0: [sdc] Write Protect is off
    May 16 14:46:54 erlangen kernel: sd 4:0:0:0: [sdc] Mode Sense: 00 3a 00 00
    May 16 14:46:54 erlangen kernel: sd 4:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    May 16 14:46:54 erlangen kernel: scsi 5:0:0:0: CD-ROM            PIONEER  DVD-RW  DVR-221  1.00 PQ: 0 ANSI: 5
    May 16 14:46:54 erlangen kernel: sd 2:0:0:0: [sda] Attached SCSI disk
    May 16 14:46:54 erlangen kernel: sd 4:0:0:0: [sdc] supports TCG Opal
    May 16 14:46:54 erlangen kernel: sd 4:0:0:0: [sdc] Attached SCSI disk
    May 16 14:46:54 erlangen kernel: sd 3:0:0:0: [sdb] Attached SCSI disk
    May 16 14:46:54 erlangen kernel: sd 2:0:0:0: Attached scsi generic sg0 type 0
    May 16 14:46:54 erlangen kernel: sd 3:0:0:0: Attached scsi generic sg1 type 0
    May 16 14:46:54 erlangen kernel: sd 4:0:0:0: Attached scsi generic sg2 type 0
    May 16 14:46:54 erlangen kernel: scsi 5:0:0:0: Attached scsi generic sg3 type 5
    May 16 14:46:55 erlangen kernel: sr 5:0:0:0: [sr0] scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray 
    May 16 14:46:55 erlangen kernel: sr 5:0:0:0: Attached scsi CD-ROM sr0
    May 16 17:16:16 erlangen kernel: sd 2:0:0:0: [sda] Synchronizing SCSI cache
    May 16 17:16:16 erlangen kernel: sd 2:0:0:0: [sda] Stopping disk
    May 16 17:16:16 erlangen kernel: sd 4:0:0:0: [sdc] Synchronizing SCSI cache
    May 16 17:16:16 erlangen kernel: sd 3:0:0:0: [sdb] Synchronizing SCSI cache
    May 16 17:16:16 erlangen kernel: sd 3:0:0:0: [sdb] Stopping disk
    May 16 17:16:16 erlangen kernel: sd 4:0:0:0: [sdc] Stopping disk
    May 16 17:16:16 erlangen kernel: sd 3:0:0:0: [sdb] Starting disk
    May 16 17:16:16 erlangen kernel: sd 2:0:0:0: [sda] Starting disk
    May 16 17:16:16 erlangen kernel: sd 4:0:0:0: [sdc] Starting disk
    erlangen:~ #
    
    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

  7. #17

    Default Re: BTRFS filesystem read only with unkown error

    I see, thank you. So just to confirm, I would use
    if=/dev/sda3
    since I just have a regular SSD (not NVMe) right?

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

    Default Re: BTRFS filesystem read only with unkown error

    Quote Originally Posted by sb56637 View Post
    I see, thank you. So just to confirm, I would use
    if=/dev/sda3
    since I just have a regular SSD (not NVMe) right?
    I think so, 3400G has:
    Code:
    3400G:~ # df -h / 
    Filesystem      Size  Used Avail Use% Mounted on 
    /dev/sdc3        40G   25G   16G  63% / 
    3400G:~ #
    Thus I run:
    Code:
    3400G:~ # dd if=/dev/sdc3 of=/dev/null bs=4M 
    10240+0 records in 
    10240+0 records out 
    42949672960 bytes (43 GB, 40 GiB) copied, 77.6176 s, 553 MB/s 
    3400G:~ #
    Messages are:
    Code:
    3400G:~ # journalctl -b 0 _KERNEL_SUBSYSTEM=scsi 
    -- Logs begin at Thu 2021-04-29 05:00:44 CEST, end at Sun 2021-05-16 19:01:01 CEST. -- 
    May 16 15:49:37 3400G kernel: scsi host0: ahci 
    May 16 15:49:37 3400G kernel: scsi host1: ahci 
    May 16 15:49:37 3400G kernel: scsi host2: ahci 
    May 16 15:49:37 3400G kernel: scsi host3: ahci 
    May 16 15:49:37 3400G kernel: scsi host4: ahci 
    May 16 15:49:37 3400G kernel: scsi host5: ahci 
    May 16 15:49:37 3400G kernel: scsi host6: ahci 
    May 16 15:49:37 3400G kernel: scsi host7: ahci 
    May 16 15:49:37 3400G kernel: scsi 0:0:0:0: Direct-Access     ATA      ST2000DM001-1CH1 CC29 PQ: 0 ANSI: 5
    May 16 15:49:37 3400G kernel: sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
    May 16 15:49:37 3400G kernel: sd 0:0:0:0: [sda] 4096-byte physical blocks
    May 16 15:49:37 3400G kernel: sd 0:0:0:0: [sda] Write Protect is off
    May 16 15:49:37 3400G kernel: sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
    May 16 15:49:37 3400G kernel: sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    May 16 15:49:37 3400G kernel: sd 0:0:0:0: [sda] Attached SCSI disk
    May 16 15:49:37 3400G kernel: scsi 1:0:0:0: Direct-Access     ATA      Samsung SSD 850  3B6Q PQ: 0 ANSI: 5
    May 16 15:49:37 3400G kernel: sd 1:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/466 GiB)
    May 16 15:49:37 3400G kernel: sd 1:0:0:0: [sdb] Write Protect is off
    May 16 15:49:37 3400G kernel: sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
    May 16 15:49:37 3400G kernel: sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    May 16 15:49:37 3400G kernel: sd 1:0:0:0: [sdb] supports TCG Opal
    May 16 15:49:37 3400G kernel: sd 1:0:0:0: [sdb] Attached SCSI disk
    May 16 15:49:37 3400G kernel: scsi 4:0:0:0: Direct-Access     ATA      Samsung SSD 850  2B6Q PQ: 0 ANSI: 5
    May 16 15:49:37 3400G kernel: sd 4:0:0:0: [sdc] 488397168 512-byte logical blocks: (250 GB/233 GiB)
    May 16 15:49:37 3400G kernel: sd 4:0:0:0: [sdc] Write Protect is off
    May 16 15:49:37 3400G kernel: sd 4:0:0:0: [sdc] Mode Sense: 00 3a 00 00
    May 16 15:49:37 3400G kernel: sd 4:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
    May 16 15:49:37 3400G kernel: sd 4:0:0:0: [sdc] supports TCG Opal
    May 16 15:49:37 3400G kernel: sd 4:0:0:0: [sdc] Attached SCSI disk
    May 16 15:49:37 3400G kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
    May 16 15:49:37 3400G kernel: sd 1:0:0:0: Attached scsi generic sg1 type 0
    May 16 15:49:37 3400G kernel: sd 4:0:0:0: Attached scsi generic sg2 type 0
    May 16 18:58:22 3400G kernel: sd 4:0:0:0: [sdc] Synchronizing SCSI cache
    May 16 18:58:22 3400G kernel: sd 4:0:0:0: [sdc] Stopping disk
    May 16 18:58:22 3400G kernel: sd 1:0:0:0: [sdb] Synchronizing SCSI cache
    May 16 18:58:22 3400G kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
    May 16 18:58:22 3400G kernel: sd 1:0:0:0: [sdb] Stopping disk
    May 16 18:58:22 3400G kernel: sd 0:0:0:0: [sda] Stopping disk
    May 16 18:58:22 3400G kernel: sd 0:0:0:0: [sda] Starting disk
    May 16 18:58:22 3400G kernel: sd 1:0:0:0: [sdb] Starting disk
    May 16 18:58:22 3400G kernel: sd 4:0:0:0: [sdc] Starting disk
    3400G:~ #
    
    
    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

Page 2 of 2 FirstFirst 12

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
  •