I've written a script to wipe all disks on any machine that netboots. It works fairly well, but I'd like to add verification of the final "zeroing" pass, and only shutdown the machines if the drive reads all zeros successfully, and otherwise show the error. I'm also trying to both minimize dependencies on ports if possible (currently only using pv(1) to show status), and make the final "read" pass perform quickly (the write passes are already fast).
However, I can't figure out what the best way to do this is. It seems the easiest way is to use another port, security/bcwipe, and run it with
Any thoughts or suggestions?
However, I can't figure out what the best way to do this is. It seems the easiest way is to use another port, security/bcwipe, and run it with
bcwipe -bfmz /dev/adaX
, which both zeros the disks and verifies the write, but this requires another port. I've looked at other, simpler ways of doing using basic system utilities, like od(1), but then the disks read slowly (about 1/3rd of the speed dd(1) will do with bs=1m). I suspect this is because you can't specify a buffer size for od, and it's reading small chunks.Any thoughts or suggestions?