修复由于存储已满而崩溃的 mongodb 4

修复由于存储已满而崩溃的 mongodb 4

我在 mongod 上遇到了一个问题。一天前,我的硬盘存储已满,因此 mongodb 关闭了。我在硬盘上添加了 Go,现在当我想重新启动 mongo 时,它不起作用。

我在 unbutu 16 上,我尝试这样做:mongod --dbpath /var/lib/mongodb --repair 但是过了一段时间后,系统地出现了这个错误:

2019-05-31T14:13:25.375+0000 E STORAGE  [initandlisten] WiredTiger error (-31802) [1559312005:375886][8390:0x7fddddd90a40], file:collection-2818--1460086324816199596.wt, WT_CURSOR.insert: __wt_block_read_off, 302: collection-2818--1460086324816199596.wt: fatal read error: WT_ERROR: non-specific WiredTiger error Raw: [1559312005:375886][8390:0x7fddddd90a40], file:collection-2818--1460086324816199596.wt, WT_CURSOR.insert: __wt_block_read_off, 302: collection-2818--1460086324816199596.wt: fatal read error: WT_ERROR: non-specific WiredTiger error
2019-05-31T14:13:25.375+0000 E STORAGE  [initandlisten] WiredTiger error (-31804) [1559312005:375912][8390:0x7fddddd90a40], file:collection-2818--1460086324816199596.wt, WT_CURSOR.insert: __wt_panic, 523: the process must exit and restart: WT_PANIC: WiredTiger library panic Raw: [1559312005:375912][8390:0x7fddddd90a40], file:collection-2818--1460086324816199596.wt, WT_CURSOR.insert: __wt_panic, 523: the process must exit and restart: WT_PANIC: WiredTiger library panic
2019-05-31T14:13:25.375+0000 E STORAGE  [initandlisten] WiredTiger error (-31804) [1559312005:375939][8390:0x7fddddd90a40], file:collection-2818--1460086324816199596.wt, txn-recover: __txn_op_apply, 281: operation apply failed during recovery: operation type 4 at LSN 225/73807232: WT_PANIC: WiredTiger library panic Raw: [1559312005:375939][8390:0x7fddddd90a40], file:collection-2818--1460086324816199596.wt, txn-recover: __txn_op_apply, 281: operation apply failed during recovery: operation type 4 at LSN 225/73807232: WT_PANIC: WiredTiger library panic
2019-05-31T14:13:25.376+0000 E STORAGE  [initandlisten] WiredTiger error (-31804) [1559312005:375995][8390:0x7fddddd90a40], file:collection-2818--1460086324816199596.wt, txn-recover: __wt_txn_recover, 740: Recovery failed: WT_PANIC: WiredTiger library panic Raw: [1559312005:375995][8390:0x7fddddd90a40], file:collection-2818--1460086324816199596.wt, txn-recover: __wt_txn_recover, 740: Recovery failed: WT_PANIC: WiredTiger library panic
2019-05-31T14:13:25.383+0000 E STORAGE  [initandlisten] WiredTiger error (0) [1559312005:383068][8390:0x7fddddd90a40], connection: __wt_cache_destroy, 384: cache server: exiting with 7 pages in memory and 0 pages evicted Raw: [1559312005:383068][8390:0x7fddddd90a40], connection: __wt_cache_destroy, 384: cache server: exiting with 7 pages in memory and 0 pages evicted
2019-05-31T14:13:25.383+0000 E STORAGE  [initandlisten] WiredTiger error (0) [1559312005:383126][8390:0x7fddddd90a40], connection: __wt_cache_destroy, 389: cache server: exiting with 149858 image bytes in memory Raw: [1559312005:383126][8390:0x7fddddd90a40], connection: __wt_cache_destroy, 389: cache server: exiting with 149858 image bytes in memory
2019-05-31T14:13:25.383+0000 E STORAGE  [initandlisten] WiredTiger error (0) [1559312005:383146][8390:0x7fddddd90a40], connection: __wt_cache_destroy, 393: cache server: exiting with 154498 bytes in memory Raw: [1559312005:383146][8390:0x7fddddd90a40], connection: __wt_cache_destroy, 393: cache server: exiting with 154498 bytes in memory
2019-05-31T14:13:25.383+0000 E STORAGE  [initandlisten] WiredTiger error (0) [1559312005:383163][8390:0x7fddddd90a40], connection: __wt_cache_destroy, 400: cache server: exiting with 32496 bytes dirty and 1 pages dirty Raw: [1559312005:383163][8390:0x7fddddd90a40], connection: __wt_cache_destroy, 400: cache server: exiting with 32496 bytes dirty and 1 pages dirty
2019-05-31T14:13:25.388+0000 E -        [initandlisten] Assertion: Location28718: -31809: WT_TRY_SALVAGE: database corruption detected src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 504
2019-05-31T14:13:25.396+0000 I STORAGE  [initandlisten] exception in initAndListen: Location28718: -31809: WT_TRY_SALVAGE: database corruption detected, terminating
2019-05-31T14:13:25.406+0000 I CONTROL  [initandlisten] now exiting
2019-05-31T14:13:25.406+0000 I CONTROL  [initandlisten] shutting down with code:100

我尝试过多次,但问题依然存在。即使我添加了 --nojournal 也不起作用,为此我删除了 mongod.lock。您有解决方案吗?

非常感谢 Thomas

相关内容