Someone should really make a PSA for this. I purchased a brand new ssd in January, 163 TBW on it now. Like others have mentioned earlier, iotop shows loop2 is constantly writing to the disk. Using df -kh shows /var/lib/docker is mounted on loop2.
I have a 5 disk btrfs encrypted array with a non-encrypted btrfs cache disk (Samsung EVO 860 1TB). Running several dockers, mainly for web hosting (traefik, cloudflare, organizr, etc.) and data storage (ms SQL Server, influxdb). No VMs.
Below is a slightly modified/simplified version of a script to calculate drive TBW and health %. Source here
#!/bin/bash
### replace sdg below with label of drive you want TBW calculated for ###
device=/dev/sdg
sudo smartctl -A $device |awk '
$0 ~ /Power_On_Hours/ { poh=$10; printf "%s / %d hours / %d days / %.2f years\n", $2, $10, $10 / 24, $10 / 24 / 365.25 }
$0 ~ /Total_LBAs_Written/ {
lbas=$10;
bytes=$10 * 512;
mb= bytes / 1024^2;
gb= bytes / 1024^3;
tb= bytes / 1024^4;
#printf "%s / %s / %d mb / %.1f gb / %.3f tb\n", $2, $10, mb, gb, tb
printf "%s / %.2f gb / %.2f tb\n", $2, gb, tb
printf "mean writes per hour: / %.3f gb / %.3f tb", gb/poh, tb/poh
}
$0 ~ /Wear_Leveling_Count/ { printf "%s / %d (%% health)\n", $2, int($4) }
' |
sed -e 's:/:@:' |
sed -e "s\$^\$$device @ \$" |
column -ts@