Skip to content

Instantly share code, notes, and snippets.

View jkwmoore's full-sized avatar

James Moore jkwmoore

View GitHub Profile
@jkwmoore
jkwmoore / test-zed-notifications.sh
Last active October 14, 2023 15:23
The script serves as a simple way to verify the ZED (ZFS Event Daemon) email notification system by simulating a scrub operation.
#!/bin/bash
# This script creates a sparse ZFS filesystem with a random pool name, scrubs it, and removes it to test ZED email notifications.
# Generate a random pool name
pool_name="test_$(date +%s | sha256sum | base64 | head -c 10)"
# Generate a random filename for the sparse file
sparse_file_path="/tmp/sparse_file_$(date +%s | sha256sum | base64 | head -c 10)"
# Create a sparse file with a size of 512MB