On Nov 23, 2009, at 9:44 AM, sundeep dhall wrote:
All,

I have a test environment with 4 internal disks and RAIDZ option.

Q) How do I simulate a sudden 1-disk failure to validate that zfs / raidz handles things well without data errors

First, list the failure modes you expect to see.
Second, simulate them.

Options considered
1. suddenly pulling a disk out

Is this a failure mode you expect to see?

2. using zpool offline

This isn't a failure mode.

I think both these have issues in simulating a sudden failure

Some other ideas:
Depending on your hardware, you can turn off power to the disk
from the command line using luxadm.

You can partition (using format) the drive and set the slice size to zero.
This will cause all attempts to access the slice to fail.

You can intentionally corrupt the disk by overwriting.

You can use DTrace to inject faults.

IMHO, not touching the hardware is a good policy when testing.

Finally, you can take a look at ztest and see how it simulates
failures.  In fact, ztest may be what you really want to use.
 -- richard

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to