You are not logged in.
fstrim command does not work as intended on my storage.
When running fstrim -av it will return (xx bytes) trimmed on /dev/xxx but after reboot, re-running fstrim -av will return the same amount of bytes trimmed on the device (as if the trim operation did not persist the reboot).
Details below.
This is what happens when running fstrim>reboot>fstrim:
$ sudo fstrim -av
/mnt/Games: 634.4 GiB (681181589504 bytes) trimmed on /dev/md0
/boot: 213.4 MiB (223723520 bytes) trimmed on /dev/sda1
/: 85.7 GiB (92067831808 bytes) trimmed on /dev/sda3
$ sudo fstrim -av
/mnt/Games: 1.6 GiB (1736323072 bytes) trimmed on /dev/md0
/boot: 213.4 MiB (223723520 bytes) trimmed on /dev/sda1
/: 271.3 MiB (284524544 bytes) trimmed on /dev/sda3
$ reboot
$ sudo fstrim -av
/mnt/Games: 634.4 GiB (681181589504 bytes) trimmed on /dev/md0
/boot: 213.4 MiB (223723520 bytes) trimmed on /dev/sda1
/: 85.7 GiB (92067831808 bytes) trimmed on /dev/sda3More info:
$ lsblk --discard
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
sda 0 512B 2G 0
├─sda1 0 512B 2G 0
├─sda2 0 512B 2G 0
└─sda3 0 512B 2G 0
sdb 0 0B 0B 0
└─sdb1 0 0B 0B 0
└─md1 0 0B 0B 0
sdc 0 512B 2G 0
└─md0 0 512B 2G 0
sdd 0 0B 0B 0
└─sdd1 0 0B 0B 0
└─md1 0 0B 0B 0
sde 0 512B 2G 0
└─md0 0 512B 2G 0$ cat /proc/mdstat
Personalities : [raid0] [raid1]
md1 : active raid1 sdd1[1] sdb1[0]
488251904 blocks super 1.2 [2/2] [UU]
bitmap: 0/4 pages [0KB], 65536KB chunk
md0 : active raid0 sde[1] sdc[0]
968694272 blocks super 1.2 512k chunks
unused devices: <none>$ cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# Swap
UUID=fe20320c-29c1-4906-a4a3-ee724a45f1a3 none swap defaults 0 0
# Boot/EFI
UUID=3B2A-57B7 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
# Computer
UUID=b4b8e732-c30f-480c-b597-2b497898c712 / ext4 rw,relatime 0 1
#Games
LABEL=Games /mnt/Games auto nosuid,nodev,nofail,x-gvfs-show 0 0
# Storage
LABEL=Storage /mnt/Storage auto nosuid,nodev,nofail,x-gvfs-show 0 0Last edited by jsaxx (2023-01-06 20:33:54)
Offline
Jin, Jîyan, Azadî
Offline
That explains it, thank you!
Offline