Just after reboot:
Code: Select all
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 5.8G 1.8G 3.8G 33% /
devtmpfs 460M 0 460M 0% /dev
tmpfs 464M 32K 464M 1% /dev/shm
tmpfs 464M 6.3M 458M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
/dev/mmcblk0p3 8.1G 219M 7.4G 3% /srv
/dev/mmcblk0p1 44M 23M 22M 51% /boot
log2ram 40M 5.6M 35M 14% /var/log
tmpfs 93M 0 93M 0% /run/user/0
# fstrim -v -a
/srv: 7.8 GiB (8328622080 bytes) trimmed
# for i in $(mount | awk '{print $3}') ; do echo $i ; fstrim -v $i ; done
/
/: 3.6 GiB (3850960896 bytes) trimmed
/dev
fstrim: /dev: the discard operation is not supported
/sys
fstrim: /sys: the discard operation is not supported
/proc
fstrim: /proc: the discard operation is not supported
/dev/shm
fstrim: /dev/shm: the discard operation is not supported
[...]
/sys/kernel/config
fstrim: /sys/kernel/config: the discard operation is not supported
/srv
/srv: 0 B (0 bytes) trimmed
/boot
fstrim: /boot: the discard operation is not supported
/var/hdd.log
/var/hdd.log: 70 MiB (73351168 bytes) trimmed
/var/log
fstrim: /var/log: the discard operation is not supported
/run/user/0
fstrim: /run/user/0: the discard operation is not supported
2: Why does consecutive trim end up with freeing 0B, but, after reboot, it's freeing all of free space value ?
Code: Select all
# fstrim -v /
/: 170.5 MiB (178737152 bytes) trimmed
# fstrim -v /
/: 0 B (0 bytes) trimmed
# reboot
# fstrim -v /
/: 3.6 GiB (3839475712 bytes) trimmed
# fstrim -v /
/: 70 MiB (73351168 bytes) trimmed
# fstrim -v /
/: 0 B (0 bytes) trimmed
4: why can it trim /var/log but not /dev/shm ?
https://github.com/azlux/log2ram