Questions tagged [fstrim]

A tool that "trims" (discards) the unused blocks in a filesystem. It is part of util-linux suite.

Filter by
Sorted by
Tagged with
0
votes
0answers
29 views

LVM SSD cachepool how to trim (Debian 10)

I was playing with LVM and I was setting up a volume with ext4 on an HDD and I want to use an SSD as a cache. What I first done was lvcreate --type cache-pool -l 100%FREE -n datacache SSD /dev/sda3 ...
1
vote
1answer
54 views

fstrim.service blocks trim of /home in Ubuntu/Mint v20, but not in v18

In troubleshooting why my /home partition (ext4, luks-encrypted) wasn't being trimmed by the weekly fstrim service, I discovered that Ubuntu made a major change in the service file: On Ubuntu/Mint 18 [...
-1
votes
1answer
490 views

“systemctl start fstrim.timer” for ssd optimization not working on Debian 10

i just installed a 1TB kingston SSD, i cloned my HDD (with Debian 10) so nothing changed besides the performance, i want to set up TRIM for this SSD. So i've done this: $ sudo hdparm -I /dev/sda | ...
2
votes
0answers
55 views

Does Linux fstrim.service conflict with Windows 10 optimization?

I have the following disk setup, a dual-boot with Windows 10 and Linux Mint 19.3: NAME LABEL SIZE FSTYPE MOUNTPOINT UUID sda 477G ...
4
votes
1answer
247 views

How does fstrim interact with dd

I'd like to understand the interaction between fstrim and a file system driver (such as ext4). More precisely I'd like to understand whether dd interfere with this. I've queried elsewhere about how ...
4
votes
3answers
540 views

How do I check if my ssd supports fstrim?

I'm working with a linux server and wanted to know if there is a way that I can find out that my SSD supports fstrim or not. I tried hdparm -I /dev/sda, but it's not available and I can't install it. ...
1
vote
1answer
1k views

How to enable discards on encrypted root

I have installed system on ext4 filesystem on lvm (vg name encrypted, root is called encrypted-root) on luks. When I'm trying to run fstrim /, I get fstrim: /: the discard operation is not supported. ...
1
vote
1answer
170 views

Does fstrim have the same effect as overwriting the disk space with zeros?

I create compressed backup images using dd and lzop on a regular basis. In the past I've created a large file beforehand with zeros using head -c xxG /dev/zero > zeros.tmp && rm zeros.tmp (...
0
votes
1answer
51 views

How/why did fstrim trim more space than I have free?

How/why did fstrim trim more space than I have free? $ df -h / Filesystem Size Used Avail Use% Mounted on /dev/mapper/drystone_2019-debian 93G 84G 4.6G 95% / $ sudo ...
6
votes
1answer
4k views

Does VirtIO storage support discard (fstrim)?

$ uname -r 5.0.9-301.fc30.x86_64 $ findmnt / TARGET SOURCE FSTYPE OPTIONS / /dev/vda3 ext4 rw,relatime,seclabel $ sudo fstrim -v / fstrim: /: the discard operation is not supported Same VM, ...
2
votes
0answers
117 views

Find all blocks on device not used by the filesystem

How can I list all blocks on a device that are currently not being used by the filesystem? The filesystem in question is a btrfs RAID1 with two LUKS encrypted harddrives an Arch Linux. I have tried ...
2
votes
2answers
2k views

nvme fstrim causing crash on linux, disabling with systemctl doesn't help

I have a Linux (Ubuntu 18, kernel 4.15) desktop booting from an M2 nvme disk. Once a week, it will crash around midnight. The relevant log file output from /var/log/syslog.* is below: Jul 16 00:00:00 ...
-1
votes
1answer
201 views

Fstrim version and usage [closed]

I have one fstrim executable file and need a way of finding that executable file version.
1
vote
0answers
454 views

How does fstrim keep finding bytes to trim on a Xen PV dom0?

I have a Xen PV node running RHEL6 on the 3.10 kernel. This node has mdadm RAID1 and the following partitions: [root@node ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/md1 ...
2
votes
1answer
2k views

Sensible mount options for SSD that does not support trim?

I've got an older SSD drive in a secondary computer (operating system is Void Linux, ext 4 file system, no swap) that doesn't see a whole lot of use. I want to take reasonable steps to extend the life ...
1
vote
1answer
311 views

SSD: trim on different filesystems

Some days ago I've bought an SSD: Samsung 850 EVO 250 GB; on this drive I made two 125 GB partitions: on the first partition I installed Windows 7 on NTFS; on the second partition I installed Haiku (...
13
votes
4answers
3k views

independently verify that TRIM indeed works on SSD

I have a LUKS partition /dev/sda1 which I luksOpen with --allow-discards: cryptsetup --allow-discards luksOpen /dev/sda1 root I then mount the ext4 filesystem with discard option: grep /dev/mapper/...
4
votes
1answer
1k views

Why fstrim appears not to trim data blocks on btrfs (+ecrypts)?

I have an SSD disk with several partitions. One of them is has a btrfs volume, mounted as /home, which holds an ecryptfs home directory. When I trim the volumes, it seems that fstrim doesn't trim ...
9
votes
1answer
4k views

fstrim doesn't seem to trim a partition that uses lvm and dm-crypt

I try to setup Fedora 25 with dm-crypt and LVM, but struggle to make TRIM work. $ sudo fstrim -av /boot: 28.6 MiB (30003200 ...
2
votes
1answer
564 views

How to perform fstrim on a loop device?

I have LVM with thin-provisioning enabled. I have two almost identical thin logical volumes with ext4 file systems that slightly differs. The first volume is used entirely for storing file system. On ...
5
votes
2answers
20k views

How do I check TRIM?

I have Linux installed on a Dell XPS 9343 with an Samsung PM851 SSD. I recently read that many SSDs don't support TRIM operations. So I'd like to check if discard option effectively works on my system....
1
vote
1answer
568 views

fstrim cronjob not working on Linux Mint 17.2

My /etc/cron.daily/fstrim looks like this: #!/bin/sh # call fstrim-all to trim all mounted file systems which support it set -e # This only runs on Intel and Samsung SSDs by default, as some SSDs ...
2
votes
1answer
5k views

fstrim “the discard operation is not supported” with ext4 on LVM

Attempting to run fstrim on my root partition (which is ext4 on a LVM logical volume, single physical volume—an SSD supporting TRIM) produces an error: fstrim -v / fstrim: /: the discard operation is ...