Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set -e
- USER=$(whoami)
- POOL=sandisk
- DEV=/dev/disk/by-id/usb-SanDisk_Extreme_55AE_323131313633343032353232-0:0
- # full smartctl arg. leave empty if not on usb.
- TYPE="-d sntasmedia"
- sudo echo got a password
- sudo zpool trim ${POOL} -w
- sudo zfs create ${POOL}/lt
- sudo zfs create ${POOL}/tp
- sudo zfs set logbias=throughput ${POOL}/tp
- sudo chown ${USER}:${USER} /${POOL}/lt
- sudo chown ${USER}:${USER} /${POOL}/tp
- OLD=$(pwd)
- sudo zpool trim ${POOL} -w
- sudo smartctl -a ${TYPE} ${DEV} > ${OLD}/pre-lt.smart
- cd /${POOL}/lt
- fio --rw=randrw --fsync=1 --sync_file_range=write --name=latency --size=256m --output=${OLD}/latency.fio
- sudo smartctl -a ${TYPE} ${DEV} > ${OLD}/post-lt.smart
- sudo zpool trim ${POOL} -w
- sudo smartctl -a ${TYPE} ${DEV} > ${OLD}/pre-tp.smart
- cd /${POOL}/tp
- fio --rw=randrw --fsync=1 --sync_file_range=write --name=throughput --size=256m --output=${OLD}/throughput.fio
- sudo smartctl -a ${TYPE} ${DEV} > ${OLD}/post-tp.smart
- cd ${OLD}
Advertisement
Add Comment
Please, Sign In to add comment