dmsetup remove_all
wipefs -a --force /dev/sdb1
mkfs -t ext4 -q -E lazy_itable_init=0,lazy_journal_init=0 -F /dev/sdb1
mkdir -p /fs/sdb1
modprobe ext4
mount -t ext4 /dev/sdb1 /fs/sdb1

for cpu_dir in /sys/devices/system/cpu/cpu[0-9]*
do
	online_file="$cpu_dir"/online
	[ -f "$online_file" ] && [ "$(cat "$online_file")" -eq 0 ] && continue

	file="$cpu_dir"/cpufreq/scaling_governor
	[ -f "$file" ] && echo "performance" > "$file"
done

mkdir -p /mnt/stress-ng
mount /dev/sdb1 /mnt/stress-ng
cd /mnt/stress-ng
stress-ng --timeout 60 --times --verify --metrics --no-rand-seed --pathological --bind-mount 64