#SSD Trim Check

1 messages · Page 1 of 1 (latest)

molten fjord
#

Hi, I installed a new SSD for external data.
I ran the migration process from the GUI and everything went well.
Now I'd like to see if the trim on Home Assistant is working.
The disk trim is enabled.
I have a raspberry Pi400 with HAOS installed

steady current
#

Please share lsblk -Do+FSTYPE,MODEL.

molten fjord
molten fjord
#

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

steady current
#

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.

north rapidsBOT
#

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.

steady current
#

systemctl status fstrim.timer should tell you about the trim job.

#

Interesting choice of drive for a pi. I have some of those myself.

molten fjord
#

I used mmc for OS and external SSD for data

steady current
#

It's interesting because it's a datacenter SSD. Personally I'd just use the SSD for all if possible.

molten fjord
#

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?

steady current
#

Yeah that's what I linked.

#

That's just to get to the real OS' CLI to test things,

molten fjord
steady current
#

Yeah. Fstrim usually runs weekly.

molten fjord
#

because if i do docker ps on ssh i don't see alpine latest image

steady current
#

docker ps shows running containers, not images.

molten fjord
steady current
#

docker images.

#

But why?

molten fjord
#

ok

molten fjord
#

but where i can see the ftrim services?

steady current
#

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.

molten fjord
steady current
#

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.

steady current
#

DC drives like yours can usually deal fine with not being trimmed, by the way 🙂

molten fjord
#

so on 30th December i will check

molten fjord
#

Thank you for your help

steady current
#

No problem.