Jump to content

Failure to mount btrfs partition


Recommended Posts

I think things started after the latest update of OMV that is running on Armbian/Odroid HC4. dmesg shows lots of SATA problems:

[59383.614395] ata2: hard resetting link
[59384.326300] ata2: SATA link down (SStatus 0 SControl 310)
[59389.382069] ata2: hard resetting link
[59389.696318] ata2: SATA link down (SStatus 0 SControl 310)
[59390.934277] ata2: hard resetting link
[59396.289764] ata2: found unknown device (class 0)
[59400.829565] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[59400.839695] ata2.00: configured for UDMA/33
[59400.839735] ata2: EH complete
[59401.005566] ata2.00: exception Emask 0x10 SAct 0x0 SErr 0x10002 action 0xe frozen
[59401.005585] ata2.00: irq_stat 0x00400000, PHY RDY changed
[59401.005589] ata2: SError: { RecovComm PHYRdyChg }
[59401.005598] ata2.00: failed command: READ DMA EXT
[59401.005601] ata2.00: cmd 25/00:20:60:5d:34/00:00:44:03:00/e0 tag 8 dma 16384 in
                        res 50/00:00:87:79:a4/00:00:34:00:00/e0 Emask 0x10 (ATA bus error)
[59401.005613] ata2.00: status: { DRDY }
[59401.005622] ata2: hard resetting link
[59401.717522] ata2: SATA link down (SStatus 0 SControl 310)
[59406.789313] ata2: hard resetting link
[59407.103560] ata2: SATA link down (SStatus 0 SControl 310)
[59408.321468] ata2: hard resetting link
[59413.672986] ata2: found unknown device (class 0)
[59418.152796] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[59418.162929] ata2.00: configured for UDMA/33
[59418.162971] ata2: EH complete
[59418.320795] ata2.00: exception Emask 0x10 SAct 0x0 SErr 0x10002 action 0xe frozen
[59418.320809] ata2.00: irq_stat 0x00400000, PHY RDY changed
[59418.320813] ata2: SError: { RecovComm PHYRdyChg }
[59418.320822] ata2.00: failed command: READ DMA EXT
[59418.320826] ata2.00: cmd 25/00:20:c0:44:33/00:00:44:03:00/e0 tag 2 dma 16384 in
                        res 50/00:00:27:fe:c0/00:00:34:00:00/e0 Emask 0x10 (ATA bus error)
[59418.320838] ata2.00: status: { DRDY }

 

I then noticed that the partition is mounted read-only. I unmounted the file system and tried a btrfs check:

root@nas:/home/siegbert# btrfs check -p /dev/sdb1
Opening filesystem to check...
parent transid verify failed on 8604712763392 wanted 112885 found 109597
parent transid verify failed on 8604712763392 wanted 112885 found 109597
parent transid verify failed on 8604712763392 wanted 112885 found 109597
Ignoring transid failure
leaf parent key incorrect 8604712763392
ERROR: failed to read block groups: Operation not permitted
ERROR: cannot open file system

Mount read-only fails now:

root@nas:/home/siegbert# mount -t btrfs -o ro /dev/sdb1 /mnt/tmp/
mount: /mnt/tmp: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.

 

That's what dmesg says after this attempt:

[71070.589557] BTRFS info (device sdb1): using crc32c (crc32c-generic) checksum algorithm
[71070.589603] BTRFS warning (device sdb1): 'recovery' is deprecated, use 'rescue=usebackuproot' instead
[71070.589613] BTRFS info (device sdb1): trying to use backup root at mount time
[71070.589622] BTRFS info (device sdb1): using free space tree
[71070.972576] BTRFS info (device sdb1): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 2694, gen 0
[71072.173702] BTRFS error (device sdb1): parent transid verify failed on logical 8604712763392 mirror 1 wanted 112885 found 109597
[71072.183138] BTRFS error (device sdb1): parent transid verify failed on logical 8604712763392 mirror 2 wanted 112885 found 109597
[71072.183170] BTRFS error (device sdb1): failed to read block groups: -5
[71072.199104] BTRFS error (device sdb1): open_ctree failed

I am stuck. What to do now with this file system?

 

About the disk:

root@nas:/home/siegbert# smartctl -a /dev/sdb
smartctl 7.2 2020-12-30 r5155 [aarch64-linux-6.0.13-meson64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba MG08ACA... Enterprise Capacity HDD
Device Model:     TOSHIBA MG08ACA16TE
Serial Number:    61Q0A4CXF57H
LU WWN Device Id: 5 000039 af8dbb124
Firmware Version: 4002
User Capacity:    16.000.900.661.248 bytes [16,0 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 1.5 Gb/s)
Local Time is:    Sat Feb  4 16:48:34 2023 CET
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:                (  120) 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:        (1473) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control 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     0x000b   100   100   050    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0027   100   100   001    Pre-fail  Always       -       2789
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       1761
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   050    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   100   100   050    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   080   080   000    Old_age   Always       -       8087
 10 Spin_Retry_Count        0x0033   100   100   030    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1327
 23 Helium_Condition_Lower  0x0023   100   100   075    Pre-fail  Always       -       0
 24 Helium_Condition_Upper  0x0023   100   100   075    Pre-fail  Always       -       0
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       2
192 Power-Off_Retract_Count 0x0032   098   098   000    Old_age   Always       -       1318
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       2390
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       31 (Min/Max 17/46)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
220 Disk_Shift              0x0002   100   100   000    Old_age   Always       -       1703936
222 Loaded_Hours            0x0032   094   094   000    Old_age   Always       -       2528
223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
224 Load_Friction           0x0022   100   100   000    Old_age   Always       -       0
226 Load-in_Time            0x0026   100   100   000    Old_age   Always       -       526
240 Head_Flying_Hours       0x0001   100   100   001    Pre-fail  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  Short offline       Completed without error       00%      6626         -
# 2  Short offline       Completed without error       00%      6456         -
# 3  Short offline       Completed without error       00%      6286         -
# 4  Short offline       Completed without error       00%      6115         -
# 5  Short offline       Completed without error       00%      5985         -
# 6  Short offline       Completed without error       00%      5783         -
# 7  Short offline       Completed without error       00%      5613         -
# 8  Short offline       Completed without error       00%      5604         -
# 9  Short offline       Completed without error       00%      5444         -
#10  Short offline       Completed without error       00%      5274         -
#11  Short offline       Completed without error       00%      5148         -
#12  Short offline       Completed without error       00%      4978         -
#13  Short offline       Completed without error       00%      4828         -
#14  Short offline       Completed without error       00%      4628         -
#15  Short offline       Completed without error       00%      4449         -
#16  Short offline       Completed without error       00%      4300         -
#17  Short offline       Completed without error       00%      4109         -
#18  Short offline       Completed without error       00%      4055         -
#19  Short offline       Completed without error       00%      3992         -
#20  Short offline       Completed without error       00%      3932         -
#21  Short offline       Completed without error       00%      3662         -

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.

 

And the system/tools:

root@nas:/home/siegbert# uname -a
Linux nas 6.0.13-meson64 #22.11.2 SMP PREEMPT Sun Dec 18 16:52:19 CET 2022 aarch64 GNU/Linux
root@nas:/home/siegbert# btrfs --version
btrfs-progs v5.10.1 

 

Edited by coocooc
Added more information
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines