问题

问题

今天,运行 Ubuntu 的硬件上的根文件系统被设置为只读,因为文件系统出现了一些内部问题。

我发现这个dmesg

[18471.780031] sdhci: Timeout waiting for Buffer Read Ready interrupt during tuning procedure, falling back to fixed sampling clock
[18481.816797] mmc0: Timeout waiting for hardware interrupt.
[18481.818821] ------------[ cut here ]------------
[18481.818866] WARNING: CPU: 1 PID: 0 at /build/linux-W6HB68/linux-4.4.0/drivers/mmc/host/sdhci.c:1017 sdhci_send_command+0x714/0xc30 [sdhci]()
[18481.818877] Modules linked in: xhci_plat_hcd nls_iso8859_1 dwc3 udc_core ulpi intel_rapl intel_powerclamp coretemp kvm_intel kvm irqbypass punit_atom_debug crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd input_leds uas usb_storage lpc_ich shpchp snd_intel_sst_acpi snd_intel_sst_core snd_soc_sst_mfld_platform snd_soc_core mei_txe snd_compress ac97_bus snd_pcm_dmaengine mei snd_pcm dwc3_pci snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq dw_dmac snd_seq_device dw_dmac_core 8250_fintek snd_timer snd intel_hid sparse_keymap soundcore i2c_designware_platform i2c_designware_core tpm_crb spi_pxa2xx_platform pwm_lpss_platform 8250_dw pwm_lpss int3400_thermal int3403_thermal int340x_thermal_zone acpi_thermal_rel mac_hid acpi_pad parport_pc
[18481.819271]  ppdev lp parport autofs4 hid_generic usbhid hid mmc_block i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm r8169 mii fjes video sdhci_acpi sdhci pinctrl_cherryview
[18481.819423] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G        W       4.4.0-62-generic #83-Ubuntu
[18481.819435] Hardware name: AAEON UP-CHT01/UP-CHT01, BIOS UPC1BM0S 06/04/2016
[18481.819447]  0000000000000086 7f0cf1c4636dff29 ffff88017fc83d28 ffffffff813f7c63
[18481.819468]  0000000000000000 ffffffffc0047460 ffff88017fc83d60 ffffffff810812d2
[18481.819487]  ffff88017aa2f540 ffff880176779ad8 0000000000000010 0000000000000001
[18481.819506] Call Trace:
[18481.819521]  <IRQ>  [<ffffffff813f7c63>] dump_stack+0x63/0x90
[18481.819571]  [<ffffffff810812d2>] warn_slowpath_common+0x82/0xc0
[18481.819588]  [<ffffffff8108141a>] warn_slowpath_null+0x1a/0x20
[18481.819612]  [<ffffffffc0044914>] sdhci_send_command+0x714/0xc30 [sdhci]
[18481.819634]  [<ffffffff81404dbb>] ? __const_udelay+0x2b/0x30
[18481.819656]  [<ffffffffc0041d49>] ? sdhci_reset+0x59/0xc0 [sdhci]
[18481.819679]  [<ffffffffc0044f32>] sdhci_finish_data+0x102/0x350 [sdhci]
[18481.819702]  [<ffffffffc0045180>] ? sdhci_finish_data+0x350/0x350 [sdhci]
[18481.819724]  [<ffffffffc00451fb>] sdhci_timeout_timer+0x7b/0xc0 [sdhci]
[18481.819746]  [<ffffffff810ecd55>] call_timer_fn+0x35/0x120
[18481.819768]  [<ffffffffc0045180>] ? sdhci_finish_data+0x350/0x350 [sdhci]
[18481.819785]  [<ffffffff810ed70a>] run_timer_softirq+0x23a/0x2f0
[18481.819808]  [<ffffffff81085db1>] __do_softirq+0x101/0x290
[18481.819828]  [<ffffffff810860b3>] irq_exit+0xa3/0xb0
[18481.819847]  [<ffffffff8183b0a2>] smp_apic_timer_interrupt+0x42/0x50
[18481.819868]  [<ffffffff81839362>] apic_timer_interrupt+0x82/0x90
[18481.819876]  <EOI>  [<ffffffff816cb5d1>] ? cpuidle_enter_state+0x111/0x2b0
[18481.819913]  [<ffffffff816cb7a7>] cpuidle_enter+0x17/0x20
[18481.819934]  [<ffffffff810c4522>] call_cpuidle+0x32/0x60
[18481.819950]  [<ffffffff816cb783>] ? cpuidle_select+0x13/0x20
[18481.819969]  [<ffffffff810c47e0>] cpu_startup_entry+0x290/0x350
[18481.819989]  [<ffffffff81051784>] start_secondary+0x154/0x190
[18481.820005] ---[ end trace 3081f620d5ceb477 ]---
[18481.822972] mmcblk0: error -110 sending stop command, original cmd response 0x0, card status 0x400900
[18481.823076] mmcblk0: error -110 transferring data, sector 26544216, nr 136, cmd response 0x0, card status 0x0
[18481.823131] blk_update_request: I/O error, dev mmcblk0, sector 26544216
[18481.823156] blk_update_request: I/O error, dev mmcblk0, sector 26544224
[18481.823173] blk_update_request: I/O error, dev mmcblk0, sector 26544232
[18481.823202] blk_update_request: I/O error, dev mmcblk0, sector 26544240
[18481.823219] blk_update_request: I/O error, dev mmcblk0, sector 26544248
[18481.823234] blk_update_request: I/O error, dev mmcblk0, sector 26544256
[18481.823250] blk_update_request: I/O error, dev mmcblk0, sector 26544264
[18481.823291] blk_update_request: I/O error, dev mmcblk0, sector 26544272
[18481.823309] blk_update_request: I/O error, dev mmcblk0, sector 26544280
[18481.823336] blk_update_request: I/O error, dev mmcblk0, sector 26544288
[18481.823622] Aborting journal on device mmcblk0p2-8.
[18481.827415] EXT4-fs error (device mmcblk0p2): ext4_journal_check_start:56: Detected aborted journal
[18481.827446] EXT4-fs (mmcblk0p2): Remounting filesystem read-only
[18481.829542] EXT4-fs error (device mmcblk0p2): ext4_journal_check_start:56: Detected aborted journal

我在硬件上运行带有 PostgreSQL 的 owncloud。

这个问题的根源是什么?

这已经是两天内第三次发生了……

如果您需要更多信息,请告诉我(cat /proc/???)

该分区/dev/mmcblk0p2是根文件系统(eMMC)。

我想我太天真了。看来在 eMMC 上运行 Linux 需要一些特殊考虑:https://unix.stackexchange.com/questions/136269/corruption-proof-sd-card-filesystem-for-embedded-linux

我猜测 PostgreSQL 对文件系统进行了太多的操作,导致 eMMC 上的文件系统“疯狂”。

这是我的硬件:Intel Cherry Trail x5-Z8350,板载 DDR3L 4GB 内存,板载 32GB eMMC 存储http://up-shop.org/home/81-up-gws01w4g-memory32g-emmc-boardwo-vesa-plate.html

问题

我怎么知道硬件是否坏了?

或者说在 eMMC 上运行带有 postgres 的 Linux 总体来说是一个坏主意吗?

更新

按照以下提示操作后这个答案,我可以通过 owncloud 同步几个小时,并且没有发生文件系统错误。这并不奇怪,因为现在 eMMC 上只发生很少的 io 操作。以下是我所做的:

  • 连接外部传统硬盘
  • 将 postgres 和 /var/log 放在外部磁盘上
  • 禁用交换
  • 使用 ramfs 作为 /tmp

但上述问题仍然存在。

答案1

您的 SD 可能已损坏或更糟的是出现故障。打开终端(应用程序-附件-终端)并输入命令 sudo fsck -a /dev/mmcblk0p1(将 /dev/mmcblk0p1 替换为 micro sd 卡的实际分区设备)。fsck = 文件系统检查器。

如果 fsck 成功,它将不会返回任何输出。在这种情况下,我会尝试再次格式化它。

我的看法

相关内容