openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.69k stars 1.76k forks source link

Tools to test ZFS fault tolerance #16180

Open woodholly opened 6 months ago

woodholly commented 6 months ago

How to properly test fault tolerance of ZFS and what utilities do you use for this? I want to test disk-failure / power failure tolerance of ZFS.

I tried standard "faulty" tool to emulate disk IO failures:

mdadm -B /dev/md666 -l faulty -n1 /dev/sda_ zpool create pool0 /dev/md666

zfs create test pool0 mdadm -G /dev/md0 --layout=wp10000 dd if=/dev/random of=/pool/test/trash bs=1M count=10 sync

This works, pool turns int SUSPENDED mode, BUT after that there is nothing I can do with it, I cant export/re-import this disk or destroy pool0 without system reboot. rmmod zfs no help too.

So how you guys test ZFS without reboot? If reboot is obligatory (this sucks) .. what tools do you use to test it, do you have some kind of manually setup linux images for that ?

tonyhutter commented 6 months ago

zinject