→ Applies to: SynetoOS 5.x
IMPORTANT
The following script creates 100 files simultaneously (each file will be 100MB) and it will write a total of 10GB per pool in one burst. Once finished, it logs the results in /tmp/dd_stress.log and deletes all the created files.
Step 1. Connect to SynetoOS appliance via SSH as admin
ssh admin@<your_ip_address_or_hostname>
Step 2. Get root privileges
sudo su -
Step 3. Edit /tmp/heavy-dd-zfs.sh file
vi /tmp/heavy-dd-zfs.shIMPORTANT
Make sure to copy and paste the exact lines below (replace <pool_name> with the correct pool name)#!/bin/bash POOL="<pool_name>/syn-volumes" NUM_FILES=100 FILE_SIZE_MB=100 # Each created file size BLOCK_SIZE=1M BASE_DIR="/" LOG="/tmp/dd_stress.log" echo "Starting stress test with dd - $(date)" > "$LOG" TARGET_DIR="${BASE_DIR}${POOL}/dd-stress" mkdir -p "$TARGET_DIR" echo "▶️ Write on $POOL ($TARGET_DIR)" | tee -a "$LOG" # High intensity writing in parralel for i in $(seq 1 $NUM_FILES); do FILE="$TARGET_DIR/file_$i.bin" dd if=/dev/urandom of="$FILE" bs=$BLOCK_SIZE count=$FILE_SIZE_MB > /dev/null 2>&1 & done # Waiting for all writing to be done wait echo "✅ Write completed on $POOL" | tee -a "$LOG" # Deletion of generated files echo "🧹 Cleanup files on $POOL" | tee -a "$LOG" rm -f "$TARGET_DIR"/*.bin echo "✅ Cleanup completed on $POOL" | tee -a "$LOG" echo "✔️ Stress test completed - $(date)" | tee -a "$LOG"Save and EXIT
:wq
Step 4. Give permissions to /tmp/heavy-dd-zfs.sh file
chmod +x /tmp/heavy-dd-zfs.sh
Step 5. Run the script
/tmp/heavy-dd-zfs.sh
Step 6 (optional). Schedule script periodically
crontab -eIMPORTANT
Make sure to add the line below as the last line in crontab file (replace <time> with how often to run in minutes, <path to script> with the path of the script and <path to log file> with the path to the log file)*/<time> * * * * /usr/bin/bash -lc '<path to script> >> <path to log file> 2>&1'EXAMPLE
*/5 * * * * /usr/bin/bash -lc '/tmp/heavy-dd-zfs.sh >> /tmp/dd_stress.log 2>&1'Save and Exit
Ctrl + X
Step 7 (optional). Delete the schedule
crontab -eIMPORTANT
Make sure to delete the previously added line in crontab file or add “#” at the start of the lineEXAMPLE
# */5 * * * * /usr/bin/bash -lc '/tmp/heavy-dd-zfs.sh >> /tmp/dd_stress.log 2>&1'Save and Exit
Ctrl + X