AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / unix / Perguntas / 753595
Accepted
stdcerr
stdcerr
Asked: 2023-08-09 12:47:50 +0800 CST2023-08-09 12:47:50 +0800 CST 2023-08-09 12:47:50 +0800 CST

Por que a partição btrfs /home/ continua montando ro no login?

  • 772

Estou tendo um problema com minha /homemontagem /dev/sdb1em uma partição btrfs. Ele continua sendo montado romesmo depois que eu inicializei a partir de um pendrive, executei a verificação e confirmei que ele poderia ser montado rw. Por que ele ainda seria montado roao inicializar meu sistema "real"? Minha linha fstab parece

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

dmesgme mostra:

[   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

Estou correndo Fedora 38.

ATUALIZAR

No sistema live ( Fedora 36) executei btrfs check /dev/sdb1e obtive:

$ 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.

ATUALIZAÇÃO2

Executei a verificação em minha outra btrfspartição do sistema ativo (que na verdade é a partição raiz do meu sistema) e foi isso que obtive:

# 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

Por algum motivo, parece que esta partição tem um problema que pode fazer com /dev/sdb1que ela não seja montada corretamente. Estranho, mas...

# 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.

Eu ligo btrfs check --repair /dev/sda?

ATUALIZAÇÃO3

Depois de executar o comando acima, meu erro parece ter sido reparado:

# 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

e ao inicializar meu sistema, meu /home partiution finally got mountedrw` novamente, YAY! Esse foi um problema estranho e eu me pergunto o que pode ter acontecido...

Ai, apenas um minuto depois de inicializar meu sistema, minha partição entrou em romodo novamente:

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

Inicializei a partir do USB ativo novamente e agora parece que ambas as partições estão íntegras:

# 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

e parece que quando estou na tela de login, minha partição inicial está montada rwe somente durante o login no Plasma ela é montada ro. Quando corro, $ journalctl | grep -i btrfsrecebo muitas mensagens, incluindo:

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

Como posso montar a partição no rwmodo novamente na inicialização?

fedora
  • 2 2 respostas
  • 54 Views

2 respostas

  • Voted
  1. Aleksandr Pakhomov
    2023-08-10T03:15:17+08:002023-08-10T03:15:17+08:00

    btrfs check /dev/sdb1recomendado para expor a causa raiz. No sistema de arquivos desmontado

    • 1
  2. Best Answer
    stdcerr
    2023-08-11T13:08:41+08:002023-08-11T13:08:41+08:00

    ok, acho que descobri que meu problema foi causado por syncthingapenas um palpite que tive, não há nada lógico que tenho em mãos que obviamente me indique isso. Ainda estou me perguntando qual foi a causa do problema em detalhes - se alguém puder me ajudar, seria ótimo!

    Acontece que a desativação syncthingapenas melhorou o problema, mas não resolveu o problema, ou seja, ainda não foi resolvido!

    • 0

relate perguntas

  • Não é possível clonar URLs https com git

  • VirtualBox falhou ao instalar no Fedora 26

  • Como desativar o teclado na tela quando uso a tela sensível ao toque?

  • Como posso descobrir qual plugin está faltando no nmcli?

  • Como particionar corretamente um SSD para uma configuração de inicialização dupla

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Possível firmware ausente /lib/firmware/i915/* para o módulo i915

    • 3 respostas
  • Marko Smith

    Falha ao buscar o repositório de backports jessie

    • 4 respostas
  • Marko Smith

    Como exportar uma chave privada GPG e uma chave pública para um arquivo

    • 4 respostas
  • Marko Smith

    Como podemos executar um comando armazenado em uma variável?

    • 5 respostas
  • Marko Smith

    Como configurar o systemd-resolved e o systemd-networkd para usar o servidor DNS local para resolver domínios locais e o servidor DNS remoto para domínios remotos?

    • 3 respostas
  • Marko Smith

    apt-get update error no Kali Linux após a atualização do dist [duplicado]

    • 2 respostas
  • Marko Smith

    Como ver as últimas linhas x do log de serviço systemctl

    • 5 respostas
  • Marko Smith

    Nano - pule para o final do arquivo

    • 8 respostas
  • Marko Smith

    erro grub: você precisa carregar o kernel primeiro

    • 4 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Martin Hope
    user12345 Falha ao buscar o repositório de backports jessie 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl Por que a maioria dos exemplos do systemd contém WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky Como exportar uma chave privada GPG e uma chave pública para um arquivo 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll status systemctl mostra: "Estado: degradado" 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim Como podemos executar um comando armazenado em uma variável? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S Por que /dev/null é um arquivo? Por que sua função não é implementada como um programa simples? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 Como ver as últimas linhas x do log de serviço systemctl 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - pule para o final do arquivo 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla Por que verdadeiro e falso são tão grandes? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve