로그인할 때 btrfs /home/ 파티션이 계속 ro를 마운트하는 이유는 무엇입니까?

로그인할 때 btrfs /home/ 파티션이 계속 ro를 마운트하는 이유는 무엇입니까?

/home/dev/sdb1btrfs 파티션을 마운트하는 데 문제가 있습니다 . roUSB 스틱으로 부팅하여 검사를 실행하고 설치 가능한지 확인해도 계속 설치됩니다 rw. ro"실제" 시스템에서 부팅할 때 왜 여전히 설치됩니까? 내 fstab 라인은 다음과 같습니다

UUID=ba093e47-a5d2-4753-b39e-64413066d9c8 /home                   btrfs   defaults,subvol=/ 0 2

dmesg보여줘:

[   36.655791] BTRFS: error (device sdb1: state A) in __btrfs_free_extent:3053: errno=-117 Filesystem corrupted
[   36.655795] BTRFS info (device sdb1: state EA): forced readonly
[   36.655796] BTRFS error (device sdb1: state EA): failed to run delayed ref for logical 574194106368 num_bytes 16384 type 176 action 2 ref_mod 1: -117
[   36.655799] BTRFS: error (device sdb1: state EA) in btrfs_run_delayed_refs:2127: errno=-117 Filesystem corrupted
[   50.043538] BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
[   50.043553] BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 992, gen 0
[   50.058816] BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
[   50.058828] BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 993, gen 0
[   50.059196] BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
[   50.059199] BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 994, gen 0

나는 뛰고있어 Fedora 38.

고쳐 쓰다

라이브 시스템( Fedora 36)에서 실행하여 btrfs check /dev/sdb1다음을 얻습니다.

$ sudo btrfs check /dev/sdb1
Opening filesystem to check...
Checking filesystem on /dev/sdb1
UUID: ba093e47-a5d2-4753-b39e-64413066d9c8
[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)
found 890685730816 bytes used, no error found
total csum bytes: 865299716
total tree bytes: 3958702080
total fs tree bytes: 2745729024
total extent tree bytes: 193478656
btree space waste bytes: 706285981
file data blocks allocated: 2916973436928
 referenced 946788216832
# smartctl -a /dev/sdb1
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.17.5-300.fc36.x86_64] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Samsung based SSDs
Device Model:     Samsung SSD 860 EVO 1TB
Serial Number:    S599NE0M906370Y
LU WWN Device Id: 5 002538 e0990fd94
Firmware Version: RVT03B6Q
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Wed Aug  9 23:29:31 2023 EDT
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:  (0x00) Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
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:        (    0) seconds.
Offline data collection
capabilities:            (0x53) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    No 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:    (  85) 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: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       7874
 12 Power_Cycle_Count       0x0032   096   096   000    Old_age   Always       -       3676
177 Wear_Leveling_Count     0x0013   097   097   000    Pre-fail  Always       -       39
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always       -       0
187 Uncorrectable_Error_Cnt 0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0032   071   049   000    Old_age   Always       -       29
195 ECC_Error_Rate          0x001a   200   200   000    Old_age   Always       -       0
199 CRC_Error_Count         0x003e   100   100   000    Old_age   Always       -       0
235 POR_Recovery_Count      0x0012   099   099   000    Old_age   Always       -       199
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       82270594760

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

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
  256        0    65535  Read_scanning was never started
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.

업데이트 2

btrfs라이브 시스템에서 다른 파티션(실제로는 내 시스템의 루트 파티션)을 확인한 결과 다음과 같은 결과가 나왔습니다.

# btrfs check /dev/sda3
Opening filesystem to check...
Checking filesystem on /dev/sda3
UUID: c8ff2d36-e51d-410e-b4f5-64b0b0f4a331
[1/7] checking root items
[2/7] checking extents
data backref 2606956544 root 257 owner 607657 offset 0 num_refs 0 not found in extent tree
incorrect local backref count on 2606956544 root 257 owner 607657 offset 0 found 1 wanted 0 back 0x560968e1b9e0
incorrect local backref count on 2606956544 root 257 owner 615849 offset 0 found 0 wanted 1 back 0x560968134cf0
backref disk bytenr does not match extent record, bytenr=2606956544, ref bytenr=0
backpointer mismatch on [2606956544 8192]
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space tree
[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)
found 29946847232 bytes used, error(s) found
total csum bytes: 27541272
total tree bytes: 1149894656
total fs tree bytes: 1045790720
total extent tree bytes: 65536000
btree space waste bytes: 236775382
file data blocks allocated: 42231439360
 referenced 61500862464

어떤 이유로 이 파티션에 문제가 있어 /dev/sdb1올바르게 설치되지 못하는 것 같습니다. 이상하지만...

# smartctl -a /dev/sda
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.17.5-300.fc36.x86_64] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Samsung based SSDs
Device Model:     Samsung SSD 860 EVO 1TB
Serial Number:    S5B3NR0NB18446P
LU WWN Device Id: 5 002538 e30b15691
Firmware Version: RVT04B6Q
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database 7.3/5319
ATA Version is:   ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Wed Aug  9 23:42:26 2023 EDT
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:  (0x00) Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
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:        (    0) seconds.
Offline data collection
capabilities:            (0x53) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    No 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:    (  85) 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: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       5877
 12 Power_Cycle_Count       0x0032   097   097   000    Old_age   Always       -       2778
177 Wear_Leveling_Count     0x0013   099   099   000    Pre-fail  Always       -       11
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010    Pre-fail  Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   010    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   010    Old_age   Always       -       0
183 Runtime_Bad_Block       0x0013   100   100   010    Pre-fail  Always       -       0
187 Uncorrectable_Error_Cnt 0x0032   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0032   072   051   000    Old_age   Always       -       28
195 ECC_Error_Rate          0x001a   200   200   000    Old_age   Always       -       0
199 CRC_Error_Count         0x003e   100   100   000    Old_age   Always       -       0
235 POR_Recovery_Count      0x0012   099   099   000    Old_age   Always       -       211
241 Total_LBAs_Written      0x0032   099   099   000    Old_age   Always       -       17129640751

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

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.

내가 전화할까 btrfs check --repair /dev/sda?

업데이트 3

위 명령을 실행한 후 오류가 수정된 것 같습니다.

# btrfs check /dev/sda3
Opening filesystem to check...
Checking filesystem on /dev/sda3
UUID: c8ff2d36-e51d-410e-b4f5-64b0b0f4a331
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[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)
found 29946847232 bytes used, no error found
total csum bytes: 27541272
total tree bytes: 1149894656
total fs tree bytes: 1045790720
total extent tree bytes: 65536000
btree space waste bytes: 236775382
file data blocks allocated: 42231439360
 referenced 61500862464

시스템을 부팅하면 내 /home partiution finally got mountedrw`가 다시 나타납니다. 예! 이상한 질문인데 무슨 일이 일어날지 궁금하네요...

이런, 시스템을 부팅한 지 1분 후에 파티션이 ro다시 모드로 전환되었습니다.

$ mount | grep home
/dev/sdb1 on /home type btrfs (ro,relatime,seclabel,ssd,discard=async,space_cache,subvolid=5,subvol=/)

라이브 USB에서 다시 부팅했는데 이제 두 파티션 모두 괜찮은 것 같습니다.

# btrfs check /dev/sdb1
Opening filesystem to check...
Checking filesystem on /dev/sdb1
UUID: ba093e47-a5d2-4753-b39e-64413066d9c8
[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)
found 890685755392 bytes used, no error found
total csum bytes: 865299740
total tree bytes: 3958702080
total fs tree bytes: 2745729024
total extent tree bytes: 193478656
btree space waste bytes: 706284856
file data blocks allocated: 2916973461504
 referenced 946788241408
[root@localhost-live liveuser]# btrfs check /dev/sda3
Opening filesystem to check...
Checking filesystem on /dev/sda3
UUID: c8ff2d36-e51d-410e-b4f5-64b0b0f4a331
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[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)
found 29930229760 bytes used, no error found
total csum bytes: 27525076
total tree bytes: 1149861888
total fs tree bytes: 1045872640
total extent tree bytes: 65437696
btree space waste bytes: 236752423
file data blocks allocated: 41929781248
 referenced 61485907968

내 홈 파티션은 로그인 화면에 있을 때 마운트되고 rwPlasma에 로그인되어 있는 동안에만 마운트되는 것 같습니다 ro. 실행하면 다음 $ journalctl | grep -i btrfs을 포함한 많은 메시지가 표시됩니다.

Aug 09 21:50:14 DesktopRon kernel: RIP: 0010:__btrfs_free_extent+0xb26/0x11a0
Aug 09 21:50:14 DesktopRon kernel:  ? __btrfs_free_extent+0xb26/0x11a0
Aug 09 21:50:14 DesktopRon kernel:  ? __btrfs_free_extent+0xb26/0x11a0
Aug 09 21:50:14 DesktopRon kernel:  ? __btrfs_free_extent+0xb26/0x11a0
Aug 09 21:50:14 DesktopRon kernel:  ? __btrfs_free_extent+0xb26/0x11a0
Aug 09 21:50:14 DesktopRon kernel:  __btrfs_run_delayed_refs+0x7a2/0x11d0
Aug 09 21:50:14 DesktopRon kernel:  btrfs_run_delayed_refs+0x59/0x200
Aug 09 21:50:14 DesktopRon kernel:  ? btrfs_reduce_alloc_profile+0x8c/0x180
Aug 09 21:50:14 DesktopRon kernel:  btrfs_preempt_reclaim_metadata_space+0x97/0x1c0
Aug 09 21:50:14 DesktopRon kernel: BTRFS: error (device sdb1: state A) in __btrfs_free_extent:3053: errno=-117 Filesystem corrupted
Aug 09 21:50:14 DesktopRon kernel: BTRFS info (device sdb1: state EA): forced readonly
Aug 09 21:50:14 DesktopRon kernel: BTRFS error (device sdb1: state EA): failed to run delayed ref for logical 574194106368 num_bytes 16384 type 176 action 2 ref_mod 1: -117
Aug 09 21:50:14 DesktopRon kernel: BTRFS: error (device sdb1: state EA) in btrfs_run_delayed_refs:2127: errno=-117 Filesystem corrupted
Aug 09 21:50:19 DesktopRon abrt-notification[3148]: System encountered a non-fatal error in __btrfs_free_extent()
Aug 09 21:50:20 DesktopRon kernel: BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
Aug 09 21:50:20 DesktopRon kernel: BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 992, gen 0
Aug 09 21:50:20 DesktopRon kernel: BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
Aug 09 21:50:20 DesktopRon kernel: BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 993, gen 0
Aug 09 21:50:20 DesktopRon kernel: BTRFS warning (device sdb1: state EA): csum failed root 1936 ino 7242 off 1142784 csum 0xa13863de expected csum 0xa13843de mirror 1
Aug 09 21:50:20 DesktopRon kernel: BTRFS error (device sdb1: state EA): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 994, gen 0

부팅 시 파티션 마운트 모드를 다시 설정하려면 어떻게 해야 합니까 rw?

답변1

btrfs check /dev/sdb1근본 원인을 밝히는 것이 좋습니다. 마운트 해제된 파일 시스템에서

답변2

좋아, 나는 내 문제가 내 직감 때문에 발생했다는 것을 알아낸 것 같다 syncthing. 그리고 내 손에는 분명히 방향을 가리킬 수 있는 어떤 논리적인 것도 없다. 문제의 자세한 원인이 무엇인지 알고 싶습니다. 누구든지 저를 도와주실 수 있다면 정말 좋을 것 같습니다!

비활성화하면 성능이 향상되었을 뿐 문제가 해결되지 않은 것으로 나타났습니다 syncthing. 즉, 아직 해결되지 않았습니다!

관련 정보