#SSD Trim Check
1 messages · Page 1 of 1 (latest)
Please share lsblk -Do+FSTYPE,MODEL.
Also get a proper shell and run fstrim -av: https://gist.github.com/Impact123/e9a4a07b184eb393d2ff762e3b1b0a05#get-a-os-level-shell
Hi @steady current on ssh or gui terminal i don't have lsblk command and fstrim -av returned anything
these are the results:
'''
/ # lsblk -Do+FSTYPE,MODEL
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO FSTYPE MODEL
sda 0 4K 4G 0 Micron_5300_MTFDDAK240TDS
-sda1 0 4K 4G 0 ext4 mmcblk0 0 4M 10.5G 0 |-mmcblk0p1 3145728 4M 10.5G 0 vfat |-mmcblk0p2 3145728 4M 10.5G 0 squashfs |-mmcblk0p3 3145728 4M 10.5G 0 erofs |-mmcblk0p4 3145728 4M 10.5G 0 squashfs |-mmcblk0p5 3145728 4M 10.5G 0 erofs |-mmcblk0p6 3145728 4M 10.5G 0 |-mmcblk0p7 3145728 4M 10.5G 0 ext4 -mmcblk0p8 3145728 4M 10.5G 0 ext4
zram0 0 4K 2T 0
zram1 0 4K 2T 0
zram2 0 4K 2T 0
/ # fstrim -av
/tmp: 10.9 MiB (11476992 bytes) trimmed on /dev/zram2
/mnt/data: 198.1 GiB (212683567104 bytes) trimmed on /dev/sda1
/mnt/overlay: 80.5 MiB (84400128 bytes) trimmed on /dev/mmcblk0p7
/mnt/boot: 24.1 MiB (25255936 bytes) trimmed on /dev/mmcblk0p1
'''
i think, reading online, that i am ok and from now there is a scheduler for trim
Ah, try apk add lsblk first then.
Seems like it works. Please use three backticks to format the text so the formatting is preserved and it's readable.
To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
systemctl status fstrim.timer should tell you about the trim job.
Interesting choice of drive for a pi. I have some of those myself.
I used mmc for OS and external SSD for data
It's interesting because it's a datacenter SSD. Personally I'd just use the SSD for all if possible.
yes i had an old san with ssd cache and i dismissed it
one question.
to use the trim command i did this command
docker run --rm --privileged --pid=host -it alpine:latest nsenter -t 1 -m -u -n -i sh
it's right?
Yeah that's what I linked.
That's just to get to the real OS' CLI to test things,
ok, so the fstrim services remain active, so tomorrow i will see the log about fstrim service
Yeah. Fstrim usually runs weekly.
because if i do docker ps on ssh i don't see alpine latest image
docker ps shows running containers, not images.
ok, which is the command for images?
ok
i would like to see if aplpine images is running
but where i can see the ftrim services?
I told you, run systemctl status fstrim.timer after getting into the OS' CLI.
This docker container you start does not really run anything. It's just a way to get into the OS' CLI. It will stop and be removed once you exit.
Ok, as I thought, i always run the command:
docker run --rm --privileged --pid=host -it alpine:latest nsenter -t 1 -m -u -n -i sh
and give systemclt status fstrim.timer and fstrim.service
No. This is just so you can see that this timer exists and works. You don't affect anything by doing this.
Well, if you run fstrim -av you do, but this was just to test. The timer does this weekly as mentioned.
my timer will start tomorrow
DC drives like yours can usually deal fine with not being trimmed, by the way 🙂
so on 30th December i will check
a trim is never refused 
Thank you for your help
No problem.