Hello,
I’ve installed DietPi on my Atom miniPC. Now I have bought a Kingston A400 SSD and I have cloned using clonezilla DietPi on it: I get speeds of about Write = 120 MB/s | Read = 310 MB/s.
The question: Do I need to trim?
I’ve found this answer by Fourdee in a post related to SSD+XU4: https://dietpi.com/forum/t/cloudshell-xu4-ssd-and-trim/414/8 (year 2016).
This is the script he created then:
#TRIM drives (all mount points)
df -P | awk '{print $6}' | tail -n +2 > /tmp/.dietpi-cron-daily_trim
echo -e "$(date)\nDietPi Cron Daily | Filesystem trim"
while read -r line
do
fstrim -v "$line" >> /var/log/dietpi_cron_daily_trim.log
done < /tmp/.dietpi-cron-daily_trim
rm /tmp/.dietpi-cron-daily_trim
cat /var/log/dietpi_cron_daily_trim.log
Can I use it with my Atom miniPC? Is it OK? Or is there another version of the script implemented on DietPi now?
I have created and executed the script once: this is what I’ve got:
Wed 20 Mar 18:22:11 CET 2019
DietPi Cron Daily | Filesystem trim
fstrim: /dev: the discard operation is not supported
fstrim: /run: the discard operation is not supported
fstrim: /: the discard operation is not supported
fstrim: /dev/shm: the discard operation is not supported
fstrim: /run/lock: the discard operation is not supported
fstrim: /sys/fs/cgroup: the discard operation is not supported
fstrim: /mnt/4062566C625666A6: the discard operation is not supported
fstrim: /boot/efi: the discard operation is not supported
fstrim: /mnt/0286573B86572E83: the discard operation is not supported
fstrim: /mnt/DE4C-9FB9: the discard operation is not supported
fstrim: /tmp: the discard operation is not supported
fstrim: /var/log: the discard operation is not supported
fstrim: /DietPi: the discard operation is not supported
Thank you very much for your help,
EDIT-SOLUTION:
1- FALSE -->It seems Kingston’s firmware does “trim” by default: it’s called Garbage Collection https://www.kingston.com/es/ssd/enterprise/technical_brief/garbage_collection.
NEW EDIT E-mail received from eu_technical@kingston.eu: “Garbage Collection is the actual activity of the SSD to clean up the cells. In order to use Garbage Collection the SSD needs a command from the operating system (TRIM). Without this command, Garbage Collection will not be applied.”
2- fstrim doesn’t support Kingston SSD drives.
3- The typical SSD recomendations are done by DietPi out-of-the-box: ramdisks, noatime option in /etc/fstab…
DietPi is great!