在我的备用postgres数据库出现停电之后,我收到错误消息:
XFS: Internal error XFS_WANT_CORRUPTED_GOTO
系统重启后以及postgres错误日志显示:
ERROR: could not write block 1759002 in file "base/278425/1651445.13": Input/output error CONTEXT: writing block 1759002 of relation base/278425/1651445 ERROR: could not write block 339174 in file "base/278425/1651495.2": Input/output error CONTEXT: writing block 339174 of relation base/278425/1651495 PANIC: could not write to log segment 0000000100001423000000A9 at offset 149696, length 5952: Input/output error
几天前,在一个单独的相同系统上,我收到了一个postgres错误:
ERROR: could not write block 69511 in file "base/278425/539725": Structure needs cleaning CONTEXT: writing block 69511 of relation base/278425/539725 WARNING: could not write block 69511 of base/278425/539725 DETAIL: Multiple failures --- write error might be permanent.
2TB文件系统使用:
mount -t xfs -o rw,nobarrier,noatime,nodiratime / dev / md0 / postgres_data
由于这是一个AWS ELB(GP2)卷,即时通讯猜测,这是不是电池支持,是卷损坏,因为我select了nobarrier选项?
由于这个文件系统的大小是2TB,我应该添加选项inode64 ,这可能是问题吗? 文件系统包含1.2TB的数据。
inode64是默认的挂载值,所以你的系统应该已经使用它了。
这个问题很可能是由于nobarrier选项引起的,与主机端的非BBU写入caching耦合。
您必须使文件系统脱机并针对它运行xfs_repair 。