Skip to main content

Questions tagged [trim]

The trim command is only used on SSDs (Solid State Drives); it must be supported by the host OS as that informs the drive to perform safe 'garbage collection' on blocks of data that are unused and so can be wiped.

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

Gluster i/o wait system freeze

I'm running Ubuntu 22.04.2 LTS on a supermicro system with the following configuration: Intel Xeon Gold 6248R 256GB RAM Samsung PM1735 NVMe SSD (6,4TB) // (currentfirmware: EPK98B5Q) XFS filesystem ...
eftotheoh's user avatar
2 votes
1 answer
156 views

`fstrim` service reports strange values

I have two SSD disks on my system and three filesystems: $ lsblk | grep -v '^loop' NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 465.8G 0 disk /home sdb 8:16 0 238.5G 0 disk ...
FedKad's user avatar
  • 11.4k
8 votes
1 answer
3k views

How to know if my NVMe SSD needs TRIM

Running Ubuntu 22.04 on my main laptop. I am using 4TB TEAMGROUP MP34 NVMe as my main drive. The file system is ext4. Yesterday (Nov 16), while downloading some large files (about 300 files, 600GB ...
sotirov's user avatar
  • 3,711
4 votes
0 answers
936 views

System hangs/breaks when fstrim runs (dual boot on SSD setup)

I have a Windows 10 / Kubuntu 22.04 dual boot setup with both OS partitions on the same SSD drive. Every week fstrim.timer triggers fstrim.service to run in background and as a result my system "...
Ahmet Sait's user avatar
4 votes
1 answer
415 views

How to get on ubuntu terminal a progressbar for fstrim

Sometime if you run the follow on terminal, it can take some time, depend on the space which will be trimmed. sudo fstrim -v / How to get a progressbar for this. Result of my research: Progressbar ...
Alfred.37's user avatar
  • 109
5 votes
1 answer
3k views

Error message enabling fstrim.service

I have been running Ubuntu 20.04 desktop since last February. Today I issued sudo systemctl enable fstrim.service and I got this message: The unit files have no installation config (WantedBy=, ...
RTC222's user avatar
  • 257
1 vote
0 answers
549 views

Is it safe tu turn off fstrim service because of possible data loss due to fstrim

So, on one of our servers (and we have 154), we saw this log entry: Feb 21 00:00:03 vps-442 fstrim[3162507]: /boot/efi: 97.8 MiB (102542848 bytes) trimmed on /dev/sda15 Feb 21 00:00:03 vps-442 fstrim[...
Aleksandar Pavić's user avatar
1 vote
0 answers
966 views

Changing SATA Mode from RST to AHCI, impact on TRIM?

So, I've bought a laptop, and I have windows installed on the SSD and I wanna install Ubuntu 20.04 on the HDD. The Linux installer presented an error "This computer uses Intel RST (Rapid Storage ...
digolira2's user avatar
  • 153
9 votes
1 answer
9k views

No SSD TRIM script in Ubuntu 20.04 LTS

I figured out that there is no fstrim script in /etc/cron.weekly. I've read that TRIM is automatically enabled for SAMSUNG SSD. I'm using Ubuntu 20.04 LTS and there is no fstrim script in all cron ...
Johnnii360's user avatar
2 votes
1 answer
1k views

Is it normal to have HDD fstrimed?

I have heavy boot issues on my new setting (more than 10 min to boot). While investigating, I found that: $ journalctl -u fstrim -- Reboot -- déc. 05 10:31:09 orphu systemd[1]: Starting Discard unused ...
yota's user avatar
  • 153
10 votes
1 answer
10k views

How to run fstrim -a regularly automatically?

I noticed that manual seldom invocations of fstrim -av take a lot of time (over 10 minutes) and report a lot of free space to the SSD: # /usr/bin/time -p fstrim -av /boot/efi: 503,2 MiB (527671296 ...
user avatar
13 votes
1 answer
23k views

Should I turn on zfs-trim on my pools or should I trim on a schedule using systemd timers or cron?

I run Ubuntu 19.10 installed on ZFS through the new ZFS install option on 19.10. This is on a Thinkpad X1 Carbon 7th which is in heavy daily use. No dualboot so it's Ubuntu all the time. The laptop ...
Christian's user avatar
  • 1,749
7 votes
1 answer
534 views

What's the difference between '/sbin/fstrim' and '/sbin/zpool trim [pool]' which trim ZFS pools?

I'm running Ubuntu 19.10 on ZFS and all works good. I know that Ubuntu has fstrim scheduled on a weekly basis by default but ZFS also supports trim through '/sbin/zpool trim [pool]'. What's the ...
Christian's user avatar
  • 1,749
1 vote
1 answer
706 views

No trim necessary or possible on a Ubuntu 19.10 with ZFS?

I've installed 19.10 with ZFS on one of my laptops because I want to learn the file system and under the impression it's "the file system of the future" (let's not discuss that here). Since I'm new ...
Christian's user avatar
  • 1,749
3 votes
1 answer
3k views

TRIM on Samsung NVMe

Not sure if I properly unterstand they way TRIM on SSD is supposed to work. According to lspci I've got the following device: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981. It shows up as ...
Thomas's user avatar
  • 61
2 votes
1 answer
587 views

Enable TRIM on secondary, encrypted ssd

I have a smaller, LUKS-encrypted ssd. I want to help get longevity if I can. I'm not sure how TRIM comes into play for an encrypted drive. I've looked at this Q&A on TRIM, and my main drive is ...
listenlight's user avatar
1 vote
1 answer
5k views

Installing Ubuntu 18.04 on NVMe SSD and using SATA SSD for storage

I'm building a deep learning desktop and will be using Ubuntu 18.04. I currently have a Crucial MX500 2TB SATA SSD. I may get a Samsung 970 NVMe SSD to install the system on for faster loading (if ...
d84_n1nj4's user avatar
  • 111
3 votes
1 answer
7k views

How to properly TRIM an ssd (18.04)

I want to do what follows: set (via systemctl) a trim timer which would trim more than once a week but less than daily. Say every three days. I want to be sure that if the system is turned off or ...
MadHatter's user avatar
  • 481
4 votes
1 answer
14k views

fstrim fails with "thediscard operation is not supported"

I am running ubuntu 18.04. No lvm or encryption. I am attempting to run trim on a brand new external sdd, western digital wd green 120 gb in a usb external case ADATA ED600 that shows trim available ...
vidyadhara buddhiraju's user avatar
72 votes
2 answers
70k views

Is TRIM enabled on my Ubuntu 18.04 installation?

I know that weekly TRIM is enabled by default from 14.10 onwards. Source: How to enable TRIM? But running sudo nano /etc/cron.weekly/fstrim returns an empty file. Also tail -n1 /etc/cron.weekly/fstrim ...
m.umar's user avatar
  • 835
4 votes
1 answer
3k views

Why does Ubuntu enable TRIM for certain brands only?

So I've been reading that for SSDs, weekly TRIM is enabled by default only for some brands like Samsung and Intel,but not others like Hynix. What's the rationale for this? Should I not enable TRIM on ...
Sina Madani's user avatar
1 vote
0 answers
2k views

Trim supports for Kington SSD is in default or not? [duplicate]

I have just installed Ubuntu 17.10 on a Kington SSD. I heard that Ubuntu enables Trim by default, but it is only for some brands like Intel and Samsung while Sandisk and Kingston are not included in ...
joeubuntu's user avatar
  • 143
4 votes
1 answer
1k views

SSD features (rotational/discard) not detected properly via USB

I am using Ubuntu 16.04 on a Thinkpad W520, with kernel 4.10.0-20-generic (hwe-edge). I have two SSD drives: a flash USB 3.0 stick, and a SATA Samsung 850 EVO SSD. When I connect them to USB (the ...
Juraj Oršulić's user avatar
3 votes
1 answer
6k views

Are features like Trim for SSD's Included for 16.04?

I am new to Ubuntu and I am wondering what to do for Sandisk SSDs? Questions I have looked up are from many years ago and I am wondering if things like Trim are now included in 16.04 and I should not ...
Lenny's user avatar
  • 51
0 votes
1 answer
3k views

Can I use a Samsung 840 EVO with Ubuntu 16.04?

From some internet research, it looks like the TRIM command has bugs with the Samsung 8 series SSDs. I don't know if this info is still current or if it was specific to 14.04. Can I use the 840 as my ...
griest's user avatar
  • 103
0 votes
1 answer
587 views

Run e2fsck automatically to fix all errors during boot with Samsung SSD 850 EVO 500GB

Almost each time that I switch from Windows 10 to Ubuntu 16.10 which I installed on a dual boot laptop Ubuntu wants me to e2fsck -b 32768 /dev/sdb5 Can I automate this during startup? If yes, how? ...
Michael S.'s user avatar
5 votes
1 answer
8k views

On Ubuntu 16.04, with Samsung 850 EVO SSD, is any post configuration needed?

The Samsung Evo 850 http://www.samsung.com/semiconductor/minisite/ssd/product/consumer/850evo.html The following post suggests that with Ubuntu 16.04 and the 850 EVO, TRIM is enabled by default. ...
Jonathan Gallagher's user avatar
10 votes
1 answer
6k views

fstrim on external SSD drives don't work

I have two external USB 3.0 SSD drives from Samsung (one is Model T1, other T3). I would like to trim them with my Ubuntu 16.04.1 LTS. While doing that I receive a error message. Here an example: ...
Luckyrings's user avatar
21 votes
4 answers
28k views

Ubuntu SSD - Was fast, is now extremely slow

This is what I'm getting now, with a Crucial MX300 750GB SSD (with latest firmware [there are no firmware updates yet]). lptp [ blah ]: sudo hdparm -Tt /dev/sda /dev/sda: Timing cached reads: ...
d0c_s4vage's user avatar
1 vote
1 answer
244 views

How do I disable Trim so I may have a shot at recovering a doc on my SSD?

I had a libre document that autosaved when my computer shut off unexpectedly. Later someone exited from it and hit don't save. I checked the backup folder located in .config/libreoffice/4/user/backup ...
user588641's user avatar
0 votes
1 answer
83 views

Notebook with two hard disk (SSD and mechanical)

I have a Notebook with two hard disk (one SSD and other mechanical). How can I divide partition? I think swap could go on mechanical one. Will Ubuntu see that one is SSD and other no? I know SSD has ...
Teo's user avatar
  • 41
7 votes
1 answer
2k views

Why does fstrim not seem to be thorough?

I tried the command fstrim to manually TRIM my SSD drive, i.e. to discard unused blocks. I know this is done automatically by a weekly cronjob, but I wanted to try it myself once. However, running ...
Byte Commander's user avatar
  • 108k
0 votes
1 answer
949 views

LVM encrypted LUKS on SSD - issue reverting to snapshots

Ubuntu 14.04.4 LTS SSD is only drive (/dev/sda) /dev/sda1 is boot partition /dev/sda5 is encrypted LUKS partition logical volumes sit on top of the LUKS partition Reverting to snapshots seems to work ...
jub's user avatar
  • 141
1 vote
1 answer
904 views

How to use TRIM on encrypted home folder

I've installed Ubuntu 16.04 LTS. During the installation, I've checked 'encrypted home' but home folder is in the same partition as the root (i.e in '/'). I know that the usage of TRIM on LUKS devices ...
kmotoko's user avatar
  • 148
1 vote
1 answer
4k views

Can I enable TRIM for SD card as if it was a SSD?

I have two old laptops that run Ubuntu / Arch (I am not an expert linux user, just learning), and they have: 1) 1.8 inches hard drive with a (flat thin) ZIF connector. 2) 2.5 inches IDE hard drive. ...
AlexN's user avatar
  • 493
0 votes
1 answer
593 views

Very large TRIM amounts

Something is wrong with my system setup on SSD. During the installation of Ubuntu 14.04 I selected "use entire disc" for my 256 GB SSD. Now after reload fstrim shows 200 GB trimmed and just after ...
Gerolf's user avatar
  • 21
3 votes
1 answer
2k views

Large amount of data trimmed after running fstrim

Each time after I restart my computer I run fstrim. And each time this is the output I receive: emil@emil-Lenovo-G580 ~> sudo fstrim -v / [sudo] password for emil: /: 84.2 GiB (90372820992 bytes) ...
Emil Zahariev's user avatar
1 vote
0 answers
48 views

I Keep Getting DIfferent Large Numbers When Trimming SSD

Each time I type the command "sudo fstrim / -v", I keep getting large numbers like 9 digits. It should say 0, since I haven't deleted anything? Are my deleted files actually trimmed? Blossom
The Powerpuff Girls's user avatar
2 votes
0 answers
800 views

Ubuntu 14.04 installed on Samsung 850 Pro 512GB results in data corruption [duplicate]

In short: Does anybody know why running Ubuntu 14.04.3 LTS on Samsung 850 Pro 512GB drive results in corrupted file system and random files disappearing? Here is the long story: In 2013 I got ...
Svetoslav Trochev's user avatar
1 vote
0 answers
390 views

14.04 LTS Trim problem on an SSD

I own a Lenovo laptop with an M.2 NGFF slot. I put a 128 GB ZTC SSD card. This card is GPT partitioned and seen as sdb. I use it for the / which is EXT4 formated. Then I did a fresh install of Ubuntu ...
GeorgesGiralt's user avatar
3 votes
1 answer
2k views

What is so dangerous about --trim-sector-ranges?

I have an SSD that I want to TRIM before installing Ubuntu on it. It has been suggested to me, that I leave some unpartitioned space, such that the wear leveling will have free blocks to work with. ...
kasperd's user avatar
  • 1,749
1 vote
0 answers
311 views

SSD - Trim - trimmed a lot of data

I have a Xubuntu distribution and a new SSD (Plextor 128GB) Partitions scheme: 16GB / 52GB home rest free Every day Cron runs script: #!/bin/sh LOG=/var/log/trim.log echo "*** $(date -R) ***" >...
Jarek's user avatar
  • 11
0 votes
1 answer
2k views

How is trim enabled in Ubuntu 15.04? [duplicate]

Does it work once a week or does it continually trim the system? I have seen answers for this but they refer to Ubuntu 14.04 but not to Ubuntu 15.04
Ervin Dine's user avatar
4 votes
1 answer
7k views

Where can the last FSTrim be seen as successful or not? (log files)

I recently installed an SSD and AFAIK Ubuntu makes a weekly FSTrim on SSD's that support it. Is there a log file of this trims?
userDepth's user avatar
  • 2,020
0 votes
1 answer
672 views

TRIMming shared partition in dual-boot on SSD

In a couple of days, I'm going to buy a new notebook (Asus N551, should it matter), tending to replace the HDD with a Samsung EVO 500GB SSD. I'll set it up in a dual-boot configuration of Windows 8/...
haemi's user avatar
  • 187
2 votes
2 answers
6k views

Disable TRIM to avoid file system corruption

I read the following article on a problem with TRIM and Samsumg. I am running Ubuntu 14.04.1 and I have a Samsung PRO 850 of 250GB. I am worried to get my file system damaged due to same firmware ...
Simone Pernice's user avatar
3 votes
0 answers
3k views

Samsung SSD, TRIM and Ubuntu 15.04

In light of a recent issue raised in regards to Samsung SSD firmware relating to TRIM and the related launchpad bugs for Ubuntu.. Bug# 1465663 'libata Samsung SSD 8 series TRIM blacklist' and the ...
Parrameister's user avatar
0 votes
1 answer
269 views

About TRIM command execution

I have some question about TRIM command for SSDs. First of all, mounting partitions with discard option vs. trim in crontab. I'm aware discard option forces immediate trim after every single file ...
MadHatter's user avatar
  • 481
5 votes
0 answers
1k views

fstrim for SSD in Ubuntu 15.04, --no-model-check no longer necessary?

I have SSD on my computer. before when I use Ubuntu I always do : sudo nano /etc/cron.weekly/fstrim And add this command: exec fstrim-all --no-model-check The description in this file states that ...
joks's user avatar
  • 51
2 votes
1 answer
445 views

Is it possible to use a dedicated parity drive without striping?

I'm setting up a log server. I'd like to set them up so that each disk is independent of the next, but the last disk is parity of all the rest. The reason why I want this is because: You can't enable ...
Joseph Odell's user avatar