Preparing encrypted drives for ZFS snapshots

I have a few spare drives sitting around that I use to store ZFS snapshots. Here is how I prepare them for use.
First, connect the drive and identify it by serial number.
# camcontrol identify $newlyConnectedDrive | grep 'serial number'
Use glabel to label the drive. It makes things easier to keep track of.
# glabel label $driveSerialNumber /dev/$newlyConnectedDrive
Write random data to the entirety of the drive (time intensive).
# dd if=/dev/urandom of=/dev/label/$driveSerialNumber

Subscribe to Jonathan-Berg.com RSS