1

When I run fstrim --all -v a few times in a row it doesn't seem to be working as expected. Every time it reports that it processes the same number of bytes:

root@pc:~# fstrim --all -v
/boot/efi: 503.2 MiB (527675392 bytes) trimmed on /dev/mmcblk0p1
/: 0 B (0 bytes) trimmed on /dev/mmcblk0p2

root@pc:~# fstrim --all -v
/boot/efi: 503.2 MiB (527675392 bytes) trimmed on /dev/mmcblk0p1
/: 0 B (0 bytes) trimmed on /dev/mmcblk0p2

root@pc:~# fstrim --all -v
/boot/efi: 503.2 MiB (527675392 bytes) trimmed on /dev/mmcblk0p1
/: 0 B (0 bytes) trimmed on /dev/mmcblk0p2

Both partitions are sitting on the same built in SSD and mounted in the fstab as follows

/dev/disk/by-uuid/UUID1 / ext4 defaults,noatime 0 0
/dev/disk/by-uuid/UUID2 /boot/efi vfat defaults 0 0

Is this a sign of an issue with the media? Is it something to do with vfat formatting?

I run Ubuntu 20.04 64bit server, 5.4.0-33-generic

EDIT:

$ lsblk -D
NAME         DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
mmcblk0             0        4M      74M         0
├─mmcblk0p1   3145728        4M      74M         0
└─mmcblk0p2   3145728        4M      74M         0
mmcblk0boot0        0        4M      74M         0
mmcblk0boot1        0        4M      74M         0

This is a motherboard embedded 64G SSD (not an SD card).

It seems to be unable to trim the whole partition (511M - 8M = 503M), I wonder if the small size makes the difference

df -h | grep dev/m
/dev/mmcblk0p2   49G  7.5G   40G  17% /
/dev/mmcblk0p1  511M  7.8M  504M   2% /boot/efi
oᴉɹǝɥɔ
  • 151
  • 6

0 Answers0