Checksum errors when restoring from snapshot

I’m backing up my dbpath using LVM snapshots, roughly as described here:

When restoring a snapshot I get checksum errors after the oplog processing completes. example:

2020-06-04T16:40:18.770+0100 E STORAGE [initandlisten] WiredTiger error (0) [1591285218:770682][19606:0x7f45d9530b80], file:WiredTiger.wt, WT_CURSOR.next: __wt_block_read_off, 263: WiredTiger.wt: read checksum error for 20480B block at offset 565248: calculated block checksum doesn't match expected checksum Raw: [1591285218:770682][19606:0x7f45d9530b80]

Things to note:

  • The snapshot is taken from a running replica set, but I am attempting to restore it into a standalone instance.
  • I am removing the mongo.lock file before starting mongod
  • MongoDB 4.0.9, but get same errors restoring to MongoDB 4.0.18

What am I doing wrong? Do I need to set up a full replica set, or a single node set? I’m not doing a full system restore. I just want to read the data files.


Update: I established that I don’t need to delete mongod.lock (if I’ve understood correctly) because journaling is enabled and the journal is stored on the same volume. However, I have a new problem now - Starting MongoDB hangs after the oplog is processed. I’ve let this run for 30 minutes so far. Checking with lsof to see if thousands of WT file pointers are being opened, it seems they aren’t. Checking mongod.log nothing is being written.