invalid record length at 1A2/8F240298: wanted 24, got 0
You are looking at the wrong message.  The "invalid record length" is an ordinary way for WAL to end.  It does not necessarily indicate that there is a problem.  The  "FATAL: could not fsync" however definitely should not be happening.  You have a hardware problem, or a corrupt file system, and those need to be dealt with outside the database.

It is possible you can fix it with something like fsck, and then repeat the automatic recovery.  But you can never really be sure you don't already have permanent corruption that crash recovery can't fix.  So your best bet may be to restore from a backup, if you have one, onto different hardware.