This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |