I know the best mitigation for ransomware is to maintain off-site backups. I cannot do this. It is a design requirement not to have offline storage.
What are some ways you have prepared for ransomware?
I've thought about:
1) udev rules that blacklist drives until the infrequent moments I do full backups
2) a "USB condom" of sorts that I can remotely disconnect (sever the 5V line), to make a USB spinning HD available as needed with an authentication scheme
3) running a program that tries to detect ransomware execution (antivirus or excessive cpu usage/encryption/etc)
4) mirror it to the cloud (unworkable, considering it's 16TB)
I don't think there's a solution as good as offsite backups. Most of these are ideas that add indirection or complexity that common ransomware wouldn't be coded for.
How do you disconnect a drive without disconnecting it? Especially nvme rather than a USB enclosure?
What is your creative solution?
The simplest solution would be to maintain "off-site" backups... where "off-site" is actually right next to it (in the same room), but in a physically separate computer. Then you can use on it something like borgbackup's append-only mode (https://borgbackup.readthedocs.io/en/stable/usage/notes.html...), so that ransomware running on other computers cannot overwrite old backups. Of course, this assumes that an attacker cannot access that computer other than through "borg serve" (it would be ideal if administration required physical console access to it), and that borgbackup doesn't have any bugs which allow bypassing the append-only restrictions in "borg serve".
(This has a drawback, explained on that page, that a periodic prune/compact on the server to free space from old backups could allow an attacker to delete data from the repository; but it can be easily worked around by taking a filesystem snapshot of the repository before doing the prune/compact. In case the attacker corrupted the backups, you just have to find a snapshot from before the corruption.)