You are not logged in.

#1 2023-11-26 16:11:10

Taughtimp2786
Member
Registered: 2021-11-03
Posts: 43

[Unresolved] BTRFS filesystem switching to read-only automatically.

I mount the device as read-write, and then do

sudo rm -rfv /mnt

, but it fails after a while saying that the filesystem is read-only.

Last edited by Taughtimp2786 (2023-11-26 22:47:03)

Offline

#2 2023-11-26 16:36:15

seth
Member
Registered: 2012-09-03
Posts: 52,594

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

filesystems typically get remounted read-only for IO errors - check the system journal or dmesg itr after the error.
Also, are you trying to remove a mountpoint? What is mounted there?
Is the concerned FS the root partition or mounted at /mnt ?

Offline

#3 2023-11-26 17:03:40

Taughtimp2786
Member
Registered: 2021-11-03
Posts: 43

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

I am booting arch linux from a usb drive. My aim is to install a new linux distribution onto it, but I want the backup of some files but I do not have another storage medium to copy it into. So I am trying to manually deleting all the folders in it except home, etc, and mnt. But it fails, as I said. After attempting to remove those files using the rm command, I get this error in the tty:

BTRFS: error (device sda3: state A) in btrfs_run_delays_refs:2177: errno=-5 IO failure

dmesg: https://pastebin.com/2vnxVsDh

Offline

#4 2023-11-26 17:08:07

Taughtimp2786
Member
Registered: 2021-11-03
Posts: 43

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

I can't believe this. This might just be the 6th hard drive that got corrupted in the past 2 years. What could I be doing wrong? I hope it's not corrupted.

Offline

#5 2023-11-26 17:29:42

seth
Member
Registered: 2012-09-03
Posts: 52,594

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

Please don't bump, edit your previous post if nobody has yet replied.
Also don't blog.

[  145.386186] BTRFS info (device sda3): using crc32c (crc32c-intel) checksum algorithm
[  145.386193] BTRFS info (device sda3): using free space tree
[  325.089217] BTRFS error (device sda3): tree first key mismatch detected, bytenr=107490050048 parent_transid=1411877 key expected=(831340544,169,4) has=(831340544,169,0)
[  325.093825] BTRFS error (device sda3): tree first key mismatch detected, bytenr=107490050048 parent_transid=1411877 key expected=(831340544,169,4) has=(831340544,169,0)
[  325.093952] BTRFS error (device sda3): failed to run delayed ref for logical 825114624 num_bytes 16384 type 176 action 1 ref_mod 1: -5
[  325.094010] BTRFS error (device sda3: state A): Transaction aborted (error -5)
[  325.094040] BTRFS: error (device sda3: state A) in btrfs_run_delayed_refs:2177: errno=-5 IO failure
[  325.094073] BTRFS info (device sda3: state EA): forced readonly

First of all you should check whether the drive is actually broken, https://wiki.archlinux.org/title/SMART
This might also be the bus.

Offline

#6 2023-11-26 20:25:56

Taughtimp2786
Member
Registered: 2021-11-03
Posts: 43

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

i won't do that again, sorry

smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.5.9-arch2-1] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Blue
Device Model:     WDC WD10EZEX-00BBHA0
Serial Number:    WD-WCC6Y2UHALC9
LU WWN Device Id: 5 0014ee 2bff60568
Firmware Version: 01.01A01
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database 7.3/5528
ATA Version is:   ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Nov 26 19:58:05 2023 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (10320) seconds.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        ( 108) minutes.
SCT capabilities:              (0x3035) SCT Status supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   186   178   021    Pre-fail  Always       -       1666
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       115
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   091   091   000    Old_age   Always       -       7088
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       114
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       71
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       98
194 Temperature_Celsius     0x0022   097   086   000    Old_age   Always       -       46
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   192   000    Old_age   Always       -       40
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      7088         -
# 2  Extended offline    Aborted by host               90%      7086         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

The above only provides legacy SMART information - try 'smartctl -x' for more

1 root@archiso ~ # smartctl -x /dev/sda3
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.5.9-arch2-1] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Blue
Device Model:     WDC WD10EZEX-00BBHA0
Serial Number:    WD-WCC6Y2UHALC9
LU WWN Device Id: 5 0014ee 2bff60568
Firmware Version: 01.01A01
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database 7.3/5528
ATA Version is:   ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sun Nov 26 19:58:47 2023 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM feature is:   Unavailable
Rd look-ahead is: Enabled
Write cache is:   Enabled
DSN feature is:   Unavailable
ATA Security is:  Disabled, frozen [SEC2]
Wt Cache Reorder: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (10320) seconds.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        ( 108) minutes.
SCT capabilities:              (0x3035) SCT Status supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR-K   200   200   051    -    0
  3 Spin_Up_Time            POS--K   186   178   021    -    1666
  4 Start_Stop_Count        -O--CK   100   100   000    -    115
  5 Reallocated_Sector_Ct   PO--CK   200   200   140    -    0
  7 Seek_Error_Rate         -OSR-K   200   200   000    -    0
  9 Power_On_Hours          -O--CK   091   091   000    -    7088
 10 Spin_Retry_Count        -O--CK   100   100   000    -    0
 11 Calibration_Retry_Count -O--CK   100   100   000    -    0
 12 Power_Cycle_Count       -O--CK   100   100   000    -    114
192 Power-Off_Retract_Count -O--CK   200   200   000    -    71
193 Load_Cycle_Count        -O--CK   200   200   000    -    98
194 Temperature_Celsius     -O---K   097   086   000    -    46
196 Reallocated_Event_Count -O--CK   200   200   000    -    0
197 Current_Pending_Sector  -O--CK   200   200   000    -    0
198 Offline_Uncorrectable   ----CK   200   200   000    -    0
199 UDMA_CRC_Error_Count    -O--CK   200   192   000    -    40
200 Multi_Zone_Error_Rate   ---R--   200   200   000    -    0
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

General Purpose Log Directory Version 1
SMART           Log Directory Version 1 [multi-sector log support]
Address    Access  R/W   Size  Description
0x00       GPL,SL  R/O      1  Log Directory
0x01           SL  R/O      1  Summary SMART error log
0x02           SL  R/O      5  Comprehensive SMART error log
0x03       GPL     R/O      6  Ext. Comprehensive SMART error log
0x06           SL  R/O      1  SMART self-test log
0x07       GPL     R/O      1  Extended self-test log
0x09           SL  R/W      1  Selective self-test log
0x10       GPL     R/O      1  NCQ Command Error log
0x11       GPL     R/O      1  SATA Phy Event Counters log
0x30       GPL,SL  R/O      9  IDENTIFY DEVICE data log
0x80-0x9f  GPL,SL  R/W     16  Host vendor specific log
0xa0-0xa7  GPL,SL  VS      16  Device vendor specific log
0xa8-0xb6  GPL,SL  VS       1  Device vendor specific log
0xb7       GPL,SL  VS      74  Device vendor specific log
0xbd       GPL,SL  VS       1  Device vendor specific log
0xc0       GPL,SL  VS       1  Device vendor specific log
0xc1       GPL     VS      93  Device vendor specific log
0xe0       GPL,SL  R/W      1  SCT Command/Status
0xe1       GPL,SL  R/W      1  SCT Data Transfer

SMART Extended Comprehensive Error Log Version: 1 (6 sectors)
No Errors Logged

SMART Extended Self-test Log Version: 1 (1 sectors)
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      7088         -
# 2  Extended offline    Aborted by host               90%      7086         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

SCT Status Version:                  3
SCT Version (vendor specific):       258 (0x0102)
Device State:                        Active (0)
Current Temperature:                    46 Celsius
Power Cycle Min/Max Temperature:     32/48 Celsius
Lifetime    Min/Max Temperature:     24/58 Celsius
Under/Over Temperature Limit Count:   0/0
Vendor specific:
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

SCT Temperature History Version:     2
Temperature Sampling Period:         1 minute
Temperature Logging Interval:        1 minute
Min/Max recommended Temperature:      0/60 Celsius
Min/Max Temperature Limit:           -41/85 Celsius
Temperature History Size (Index):    478 (162)

Index    Estimated Time   Temperature Celsius
 163    2023-11-26 12:01    32  *************
 164    2023-11-26 12:02    33  **************
 165    2023-11-26 12:03    34  ***************
 166    2023-11-26 12:04    34  ***************
 167    2023-11-26 12:05     ?  -
 168    2023-11-26 12:06    35  ****************
 169    2023-11-26 12:07    34  ***************
 170    2023-11-26 12:08    35  ****************
 171    2023-11-26 12:09    35  ****************
 172    2023-11-26 12:10    36  *****************
 173    2023-11-26 12:11    36  *****************
 174    2023-11-26 12:12    36  *****************
 175    2023-11-26 12:13    37  ******************
 ...    ..(  2 skipped).    ..  ******************
 178    2023-11-26 12:16    37  ******************
 179    2023-11-26 12:17    38  *******************
 ...    ..(  3 skipped).    ..  *******************
 183    2023-11-26 12:21    38  *******************
 184    2023-11-26 12:22    39  ********************
 185    2023-11-26 12:23    40  *********************
 ...    ..(  4 skipped).    ..  *********************
 190    2023-11-26 12:28    40  *********************
 191    2023-11-26 12:29     ?  -
 192    2023-11-26 12:30    33  **************
 193    2023-11-26 12:31    33  **************
 194    2023-11-26 12:32    33  **************
 195    2023-11-26 12:33    34  ***************
 196    2023-11-26 12:34    34  ***************
 197    2023-11-26 12:35     ?  -
 198    2023-11-26 12:36    29  **********
 199    2023-11-26 12:37    29  **********
 200    2023-11-26 12:38    30  ***********
 201    2023-11-26 12:39    31  ************
 202    2023-11-26 12:40    31  ************
 203    2023-11-26 12:41    32  *************
 204    2023-11-26 12:42    33  **************
 205    2023-11-26 12:43    33  **************
 206    2023-11-26 12:44    33  **************
 207    2023-11-26 12:45    34  ***************
 208    2023-11-26 12:46    34  ***************
 209    2023-11-26 12:47    35  ****************
 210    2023-11-26 12:48    35  ****************
 211    2023-11-26 12:49    36  *****************
 212    2023-11-26 12:50    36  *****************
 213    2023-11-26 12:51    37  ******************
 214    2023-11-26 12:52    37  ******************
 215    2023-11-26 12:53    37  ******************
 216    2023-11-26 12:54    38  *******************
 217    2023-11-26 12:55    38  *******************
 218    2023-11-26 12:56    38  *******************
 219    2023-11-26 12:57    39  ********************
 ...    ..(  4 skipped).    ..  ********************
 224    2023-11-26 13:02    39  ********************
 225    2023-11-26 13:03    40  *********************
 226    2023-11-26 13:04    40  *********************
 227    2023-11-26 13:05     ?  -
 228    2023-11-26 13:06    40  *********************
 ...    ..(  2 skipped).    ..  *********************
 231    2023-11-26 13:09    40  *********************
 232    2023-11-26 13:10    41  **********************
 ...    ..( 12 skipped).    ..  **********************
 245    2023-11-26 13:23    41  **********************
 246    2023-11-26 13:24    42  ***********************
 ...    ..(  7 skipped).    ..  ***********************
 254    2023-11-26 13:32    42  ***********************
 255    2023-11-26 13:33    43  ************************
 ...    ..( 17 skipped).    ..  ************************
 273    2023-11-26 13:51    43  ************************
 274    2023-11-26 13:52     ?  -
 275    2023-11-26 13:53    31  ************
 276    2023-11-26 13:54     ?  -
 277    2023-11-26 13:55    32  *************
 278    2023-11-26 13:56    32  *************
 279    2023-11-26 13:57    33  **************
 280    2023-11-26 13:58    33  **************
 281    2023-11-26 13:59    34  ***************
 282    2023-11-26 14:00    34  ***************
 283    2023-11-26 14:01    34  ***************
 284    2023-11-26 14:02    35  ****************
 285    2023-11-26 14:03    35  ****************
 286    2023-11-26 14:04    35  ****************
 287    2023-11-26 14:05    36  *****************
 288    2023-11-26 14:06    36  *****************
 289    2023-11-26 14:07    36  *****************
 290    2023-11-26 14:08    37  ******************
 ...    ..(  2 skipped).    ..  ******************
 293    2023-11-26 14:11    37  ******************
 294    2023-11-26 14:12    38  *******************
 ...    ..( 15 skipped).    ..  *******************
 310    2023-11-26 14:28    38  *******************
 311    2023-11-26 14:29    39  ********************
 ...    ..(  5 skipped).    ..  ********************
 317    2023-11-26 14:35    39  ********************
 318    2023-11-26 14:36    40  *********************
 ...    ..(  6 skipped).    ..  *********************
 325    2023-11-26 14:43    40  *********************
 326    2023-11-26 14:44    41  **********************
 ...    ..( 11 skipped).    ..  **********************
 338    2023-11-26 14:56    41  **********************
 339    2023-11-26 14:57    42  ***********************
 ...    ..(  2 skipped).    ..  ***********************
 342    2023-11-26 15:00    42  ***********************
 343    2023-11-26 15:01    43  ************************
 ...    ..(  3 skipped).    ..  ************************
 347    2023-11-26 15:05    43  ************************
 348    2023-11-26 15:06    44  *************************
 ...    ..(  2 skipped).    ..  *************************
 351    2023-11-26 15:09    44  *************************
 352    2023-11-26 15:10    45  **************************
 ...    ..(  6 skipped).    ..  **************************
 359    2023-11-26 15:17    45  **************************
 360    2023-11-26 15:18    46  ***************************
 ...    ..( 12 skipped).    ..  ***************************
 373    2023-11-26 15:31    46  ***************************
 374    2023-11-26 15:32    47  ****************************
 ...    ..( 19 skipped).    ..  ****************************
 394    2023-11-26 15:52    47  ****************************
 395    2023-11-26 15:53    48  *****************************
 396    2023-11-26 15:54    47  ****************************
 ...    ..(  2 skipped).    ..  ****************************
 399    2023-11-26 15:57    47  ****************************
 400    2023-11-26 15:58    48  *****************************
 401    2023-11-26 15:59    47  ****************************
 402    2023-11-26 16:00    48  *****************************
 ...    ..( 17 skipped).    ..  *****************************
 420    2023-11-26 16:18    48  *****************************
 421    2023-11-26 16:19    47  ****************************
 ...    ..( 15 skipped).    ..  ****************************
 437    2023-11-26 16:35    47  ****************************
 438    2023-11-26 16:36    46  ***************************
 ...    ..( 16 skipped).    ..  ***************************
 455    2023-11-26 16:53    46  ***************************
 456    2023-11-26 16:54    47  ****************************
 457    2023-11-26 16:55    47  ****************************
 458    2023-11-26 16:56    47  ****************************
 459    2023-11-26 16:57    46  ***************************
 ...    ..(  2 skipped).    ..  ***************************
 462    2023-11-26 17:00    46  ***************************
 463    2023-11-26 17:01    37  ******************
 464    2023-11-26 17:02    36  *****************
 ...    ..(  6 skipped).    ..  *****************
 471    2023-11-26 17:09    36  *****************
 472    2023-11-26 17:10    37  ******************
 ...    ..( 26 skipped).    ..  ******************
  21    2023-11-26 17:37    37  ******************
  22    2023-11-26 17:38    36  *****************
 ...    ..(  3 skipped).    ..  *****************
  26    2023-11-26 17:42    36  *****************
  27    2023-11-26 17:43    37  ******************
 ...    ..(  2 skipped).    ..  ******************
  30    2023-11-26 17:46    37  ******************
  31    2023-11-26 17:47    38  *******************
 ...    ..(  4 skipped).    ..  *******************
  36    2023-11-26 17:52    38  *******************
  37    2023-11-26 17:53    39  ********************
 ...    ..(  6 skipped).    ..  ********************
  44    2023-11-26 18:00    39  ********************
  45    2023-11-26 18:01    40  *********************
 ...    ..( 18 skipped).    ..  *********************
  64    2023-11-26 18:20    40  *********************
  65    2023-11-26 18:21    41  **********************
 ...    ..( 14 skipped).    ..  **********************
  80    2023-11-26 18:36    41  **********************
  81    2023-11-26 18:37    42  ***********************
 ...    ..( 13 skipped).    ..  ***********************
  95    2023-11-26 18:51    42  ***********************
  96    2023-11-26 18:52    43  ************************
 ...    ..(  3 skipped).    ..  ************************
 100    2023-11-26 18:56    43  ************************
 101    2023-11-26 18:57    42  ***********************
 ...    ..( 11 skipped).    ..  ***********************
 113    2023-11-26 19:09    42  ***********************
 114    2023-11-26 19:10    43  ************************
 ...    ..(  6 skipped).    ..  ************************
 121    2023-11-26 19:17    43  ************************
 122    2023-11-26 19:18    42  ***********************
 ...    ..( 20 skipped).    ..  ***********************
 143    2023-11-26 19:39    42  ***********************
 144    2023-11-26 19:40    43  ************************
 ...    ..(  7 skipped).    ..  ************************
 152    2023-11-26 19:48    43  ************************
 153    2023-11-26 19:49     ?  -
 154    2023-11-26 19:50    27  ********
 155    2023-11-26 19:51     ?  -
 156    2023-11-26 19:52    27  ********
 157    2023-11-26 19:53    27  ********
 158    2023-11-26 19:54    29  **********
 159    2023-11-26 19:55    29  **********
 160    2023-11-26 19:56    31  ************
 161    2023-11-26 19:57     ?  -
 162    2023-11-26 19:58    32  *************

SCT Error Recovery Control command not supported

Device Statistics (GP/SMART Log 0x04) not supported

Pending Defects log (GP Log 0x0c) not supported

SATA Phy Event Counters (GP Log 0x11)
ID      Size     Value  Description
0x0001  2            0  Command failed due to ICRC error
0x0002  2            0  R_ERR response for data FIS
0x0003  2            0  R_ERR response for device-to-host data FIS
0x0004  2            0  R_ERR response for host-to-device data FIS
0x0005  2            0  R_ERR response for non-data FIS
0x0006  2            0  R_ERR response for device-to-host non-data FIS
0x0007  2            0  R_ERR response for host-to-device non-data FIS
0x0008  2            0  Device-to-host non-data FIS retries
0x0009  2            2  Transition from drive PhyRdy to drive PhyNRdy
0x000a  2            3  Device-to-host register FISes sent due to a COMRESET
0x000b  2            0  CRC errors within host-to-device FIS
0x000d  2            0  Non-CRC errors within host-to-device FIS
0x000f  2            0  R_ERR response for host-to-device data FIS, CRC
0x0012  2            0  R_ERR response for host-to-device non-data FIS, CRC
0x8000  4        11149  Vendor specific

Last edited by Taughtimp2786 (2023-11-26 20:28:37)

Offline

#7 2023-11-26 20:39:55

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,771
Website

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

Check your RAM health and run `btrfs check` on the (unmounted) filesystem.

Reference: https://lore.kernel.org/linux-btrfs/87d … gmx.com/T/

Offline

#8 2023-11-26 20:59:43

Taughtimp2786
Member
Registered: 2021-11-03
Posts: 43

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

Opening filesystem to check...
Checking filesystem on /dev/sda3
UUID: 9ad306e9-b097-4d67-b614-d5aea6a299cc
[1/7] checking root items
[2/7] checking extents
data extent[26080661504, 24576] referencer count mismatch (root 5 owner 7065689 offset 0) wanted 0 have 1
data extent[26080661504, 24576] bytenr mimsmatch, extent item bytenr 26080661504 file item bytenr 0
data extent[26080661504, 24576] referencer count mismatch (root 5 owner 7065689 offset 67108864) wanted 1 have 0
backpointer mismatch on [26080661504 24576]
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space tree
[4/7] checking fs roots
root 5 inode 14410118 errors 1000, some csum missing
ERROR: errors found in fs roots
found 848744206336 bytes used, error(s) found
total csum bytes: 824998152
total tree bytes: 3578642432
total fs tree bytes: 2319728640
total extent tree bytes: 197165056
btree space waste bytes: 659162772
file data blocks allocated: 1284472098816
 referenced 1265769848832
btrfs check /dev/sda3  19.84s user 7.85s system 18% cpu 2:29.02 total

Offline

#9 2023-11-26 21:02:50

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,771
Website

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

So did you try the suggestions in the linked thread?

Thorsten listed what he tried here. It didn't work for him though.

Offline

#10 2023-11-26 21:23:22

Taughtimp2786
Member
Registered: 2021-11-03
Posts: 43

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

I will look into the thread and try the methods he listed but before:

All of my data is safe and alright but it will take a huge amount of ttime to transfer all of it via ssh. But to save everyone's time, I will format the drive after transfering all of my data. Hopefully it won't run into any problems again.

Last edited by Taughtimp2786 (2023-11-26 21:24:43)

Offline

#11 2023-11-26 21:40:04

seth
Member
Registered: 2012-09-03
Posts: 52,594

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

With

I am booting arch linux from a usb drive.

I'm way more suspicious about the  USB adapter/case and/or premature power losses, maybe through usb autosuspend.
(The lkml thread has an nvme and with that I'd worry about APST and ASPM)

The  disk is fine, but you're not getting around a backup on an a different medium.
You can either rescue the data you want to  keep and then flatten the filesystem and create a new one or try to use https://wiki.archlinux.org/title/Btrfs#btrfs_check in repair mode, but doing that without a backup IS VASTLY STUPID and you will hate yoursel either way - because it worked and you made a "pointless" (we'll put that in quotes because no such thing exists) backup … or because you don't have a backup and lost all data.

If you can't get a second drive and have a usable internet connection and it's not that much data you want to save and you don't care to put it there, you can maybe use a google drive?

Edit: F5.

Last edited by seth (2023-11-26 21:40:38)

Offline

#12 2023-11-26 22:17:54

Taughtimp2786
Member
Registered: 2021-11-03
Posts: 43

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

I backed up all my data and then ran btrfs check --repair. But it returned with a segmentation fault so I ran a memtest. The ram was fine and didn't have any errors. Am I doing something wrong?

Offline

#13 2023-11-26 22:34:49

seth
Member
Registered: 2012-09-03
Posts: 52,594

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

A useful memtest86+ cycle is measured in days - you'd at least run it over night (16h)
But I don't think that this is the issue, see the btrfs-check caveat in the wiki (though I'd not expect it to segfault, do you have the coredump?)

Offline

#14 2023-11-26 22:36:07

Taughtimp2786
Member
Registered: 2021-11-03
Posts: 43

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

Sorry. I already formatted and installed another distro.

Offline

#15 2023-11-26 22:43:30

seth
Member
Registered: 2012-09-03
Posts: 52,594

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

Why are you sorry, given the state of btrfs-check, this was a likely outcome anyway.
I hope you've seen https://wiki.archlinux.org/title/Instal … ble_medium and come to the conclusion that an immature filesystem is maybe not the best candidate for a fragile approach as using a usb driver as root?

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#16 2023-11-26 22:48:35

Taughtimp2786
Member
Registered: 2021-11-03
Posts: 43

Re: [Unresolved] BTRFS filesystem switching to read-only automatically.

Okie thanks, got it!

Offline

Board footer

Powered by FluxBB