Cannot start node after crash

System: Debian
Ver 3.0.1
Error is "Couldn’t initialize the node: OpenLedger.openLedgerDB A single ledger database file ‘/var/lib/algorand/mainnet-v1.0/ledger.sqlite’ was detected. This is no longer supported by current binaries.

This was after a system crash where I had to restart the VM running algo node.

start is by systemctl

When I tried to delete mainnet and start again it did start but then when I tried to copy my participation keys I get error"cannot load account at 6L… attempt to write a readonly database

What can I do?

There seems to be two different problems.

Fix the impossibility to initialize the node

(It looks like you already did that)

The simplest solution may be to clean up and restart.
WARNING: This will remove all your accounts and participation keys. If you use kmd (or goal account ... / goal wallet ...) and did not backup mnemonic, you may lose Algos).

To clean up and restart:

  1. Stop the node
  2. Remove all files/folders from /var/lib/algorand EXCEPT genesis.json, config.json (if present), system.json (if present)
  3. Start again the node

If the node is non-archival, you can then re-use fast catchup.
If your node was archival, you will need to do normal catchup which takes currently around a week.

Fix the participation key issue

Most likely the reason is that you have some permission issues and you generated the key with the wrong user (either your user or root).
With the Debian/Ubuntu package, you need everything in /var/lib/algorand to be owned by the user algorand and the group algorand.
You can stop the node and do:

sudo chown -R algorand:algorand /var/lib/algorand

In the future, always run any goal command (that modifies data) using the algorand user:

sudo -u algorand -E goal ...

See Install a node - Algorand Developer Portal