First off, I made a mistake & I acknowledge that, but now I'm stuck with a "broken" ZFS driver and want to restore it without rebooting my machine.
How I can say ZFS on Linux to just forget the existence of a pool (forcefully unmount & "export" it) while all drives are disconnected?
While I had a running ZFS pool with two drives (as mirror), I disconnected both of them (more specific: their power) at the same time without unmounting or exporting it beforehand. When replugging the power, the kernel recognized them as new drives (before they were called sdb & sdc, now they are called sdd & sde) hence ZFS is not able to "restart" the pool on its own. I do not want to call commands like zpool replace
as they seem to expect that the new drive is completely new & and can be overwritten, what is not the case (in fact, they are the same, just available under a new name/path). I tried some other commands (see below), but they didn't worked as well. So I disconnected them again but now I'm stuck with a ZFS driver not being able to forcefully unmount the pool, so I could just trying to reimport it. As during the power fail no writes should have happened, I just expect to be able to reimport it afterwards just fine.
What I tried so far while the drives were connected under the new name:
zpool offline pool1 sdb
: "cannot offline sdb: pool I/O is currently suspended"
zpool online pool1 sdd
: "cannot online /dev/sdd: pool I/O is currently suspended"
What I tried while the drives were disconnected:
zpool clear pool1
zpool export -f pool1
zpool destroy -f pool1
Just in case its important: Debian GNU/Linux bookworm, Linux 6.1.0-6-amd64