Questions tagged [trim]
An SSD command that tells the drive which blocks of memory are no longer in use, allowing it to erase blocks containing deleted data.
54
questions
0
votes
0
answers
29
views
Why is blkdiscard not erasing all data of the whole drive?
I have an old mSATA SSD (model name: Plextor PX-128M6M), which is installed to an mSATA-to-USB enclosure with ASM1153E controller.
I want to (just logically, at the SSD controller level) erase all of ...
0
votes
1
answer
50
views
Using a sed command to trim extra spaces,characters, and decimals stuck
Currently working on a command in AppleScript to trim weight data we receive from a scale. We receive the weight in the following format X.XXX. lb.
The Xs representing numbers. We're ...
0
votes
1
answer
145
views
FSTRIM for USB-SSD boot drive
I would put my Ubuntu 22.04 NVME disk into this USB 3.2 20Gbps M.2 NVMe SSD Enclosure and boot it from a USB 3.2x2 port.
I know that a SSD needs to be trimmed by FSTRIM, but I also read that ...
0
votes
0
answers
93
views
How do fstrim and BTRFS SSD optimizations work for both SSD's in a RAID1?
First apologies if this has been asked before, but I could not find any link with any combination of keywords.
My question is - How do SSD optimisations work in BTRFS in a RAID1 where both devices are ...
0
votes
1
answer
56
views
Trim and btrfs with raid1
I know that btrfs support trim/discard, as a mount option or manually (fstrim -A).
I want to made a raid1 of ssd, I will get any problem with trim?
2
votes
1
answer
305
views
Disable allow-discards on encrypted partition
I have the following partition table:
NAME
nvme0n1
├─nvme0n1p1 part /boot
└─nvme0n1p2 part
└─crypt crypt
├─crypt-swap lvm [SWAP]
├...
1
vote
0
answers
188
views
TRIM of ssd behind raid controller
I have nfs storage with many SSDs in raid controller, for my cluster of 10 linux machines,
I've used it for around 3 years, and now about 83% is used.(43T out of 55T)
I haven't done any kind of TRIM ...
1
vote
1
answer
1k
views
How to disable TRIM on SSD(s) under Linux Mint?
I rarely ever write anything (large) to SSDs on many machines of my own, an example could be the use of one laptop as a TV viewer only, another my mother's laptop, which she uses just for banking. (If ...
0
votes
2
answers
273
views
Are distribution installers harming SSDs?
According to Intel, it is important that blocks not be discarded when creating a Linux filesystem on a solid state drive. The document states that the default behaviour (of mke2fs, in March 2015) is ...
10
votes
3
answers
3k
views
How can I tell if a Linux block device is trimmable or not?
fstrim requires the Linux block device to be mounted, and it is not very verbose. blkdiscard could tell, but also that would require a write operation.
Can I somehow tell if a block device supports ...
0
votes
1
answer
356
views
Does LVM2 enable trimming of hard disks - does it really get zeroed?
I recently had to buy a new hard disk for my system. I'm running on a ssd, but for virtual machines i tend to use a hard disk. Since it had to be partitioned and formatted, i used LVM to add it to its ...
4
votes
1
answer
5k
views
Is mounting with "discard" needed for TRIM?
I was wondering whether mounting an SSD using the discard option (documented in man mount) is actually required for ATA TRIM to be sent to the SSD's controller.
The evidence is a bit circumstantial: ...
0
votes
1
answer
319
views
blkdiscard hangs on md raid 10 on PCIe SSDs
I have a running Linux 4.19 amd64 system with two PCIe SSDs that I'd like to clear, test, reformat and put in use again. All of the data has already been moved away. I've
tried to trim/discard blocks ...
-1
votes
1
answer
3k
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 | ...
7
votes
3
answers
4k
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. ...
3
votes
1
answer
2k
views
fstrim does not trim swap
I have set up an encrypted swap partition following this guide. My /etc/crypttab is set up like this (note the discard option on swap):
rootfs UUID=<UUID_root> none luks,discard
swap UUID=<...
4
votes
2
answers
6k
views
Trim an audio file into multiple segments using `ffmpeg` with a single command
So far I have been using the following command to split an audio file from S to E:
ffmpeg -i input.mp3 -ss S -to E -c copy output.mp3
Due to the fact that I need to split an audio file into multiple ...
0
votes
1
answer
80
views
Group items from column using awk
Trying to do the following,
I have txt file which as the data of the interfaces.
Eth1/15 desc01 1
Eth101/1/11 desc01 1
Eth101/1/16 desc01 1
Eth103/1/21 desc01 1
Eth1/2 ...
3
votes
1
answer
3k
views
How does the filesystem (ext4) "store" TRIM information?
It is recommended to enable a TRIM cron job which run once every week.
When the fstrim command is called the filesystem will sent TRIM information to the drive to discard deleted data (I hope I get it ...
0
votes
1
answer
576
views
Find physical block device of root filesystem on an encrypted filesystem?
I'm running Arch Linux (systemd) on several systems. Some have SSD storage, others have nvme storage devices and some use rotational HDD's. Some systems use dm-crypt to encrypt the filesystem. All ...
0
votes
1
answer
725
views
What FS can reclaim unused blocks to VirtualBox when dynamically allocated image is used?
I like to use dynamically allocated images in VirtualBox.
It is preferred way if you like to distribute you image (remember Vagrant?).
What Linux FS can reclaim unused blocks to VirtualBox when ...
2
votes
2
answers
6k
views
Boot Error -> ipmi:dmi : Invalid offset : 0
I'm having the following error when booting my OS (Linux mint19 - mate):
ipmi:dmi: Invalid offset : 0
I would appreciate if someone has more information about this.
There's a ubuntu user here on ...
3
votes
2
answers
3k
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 ...
6
votes
1
answer
4k
views
Do Linux swap partitions support trimming?
The question appears if we want to use a swap partition on an SSD drive. I think, it would be better (for the SSD) if the deallocated swap space could be trimmed, because trimming the not used blocks ...
13
votes
4
answers
4k
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/...
5
votes
1
answer
3k
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 ...
3
votes
1
answer
1k
views
SSD Encryption / dm-crypt
I have bought a Samsung 850 EVO 250GB yesterday and I am preparing to install Arch on it. But I have some questions before starting.
My SSD supports encryption (ENCRYPTION SUPPORT: AES 256-bit ...
7
votes
2
answers
7k
views
Should the 'discard' option be used for mounting a swap file?
The Arch Wiki says that defaults,discard can be used in the fstab file for a swap partition. However it is not clear about a swap file, nor is the man page.
If the swap file resides in a filesystem ...
20
votes
3
answers
19k
views
How do I trim bytes from the beginning and end of a file?
I have a file, that has trash (binary header and footer) at the beginning and end of the file. I would like to know how to nuke these bytes. For an example, let's assume 25 bytes from the beginning. ...
5
votes
2
answers
3k
views
trim and fade in/out video and audio with avconv (or different tool)
I'm using avconv for trimming and converting videos. Let's say I want to drop the first 7 and last 2.5 seconds of the video stream and one audio stream of an one-hour mts file:
avconv -i input.mts -...
2
votes
1
answer
1k
views
Is TRIM on Samsung 840 Pro with firmware version DXM06B0Q safe?
I updated the firmware of my Samsung 840 Pro to the newest version (DXM06B0Q). This SSD (along with many other Samsung SSDs) had a bug where it deletes arbitrary data if asynchronous TRIM is used. Can ...
4
votes
1
answer
1k
views
Enabling Synchronous TRIM Only
I have a Samsung PRO Series SSD. Linux deactivates Trim for this SSD because it deletes the wrong data when asynchronous Trim is used (firmware bug).
Is it possible to activate synchronous Trim for ...
2
votes
1
answer
2k
views
Using SSD on Qubes OS
Concerning SSD on Qubes OS, in /etc/fstab besides the auto enabled TRIM, where else should I add discard and say noatime? Example of my StandaloneVM in which I've commented out the swap and added ...
6
votes
2
answers
30k
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....
6
votes
2
answers
3k
views
jpegtran - losslessly crop left portion of image
I have a 1400x1400 image in which I want to trim 4 pixels to the left, 1 at the bottom and, to keep square proportions, 3 from the top. The problem is, whenever I perform a crop with jpegtran, pixels ...
6
votes
1
answer
1k
views
LVM cache and TRIM
I have set up LVM to cache a logical volume (located on an HDD) on a partition of an SSD (in writeback mode if this matters). As far as I can tell, this works correctly and the cache uses all ...
1
vote
1
answer
686
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 ...
6
votes
1
answer
4k
views
Configuring a mdadm RAID-1 on SSD and HDD
I need to configure a RAID-1 on one SSD and one HDD. Both SSD and HDD has some preinstalled software, which I don't need so both can be fully wiped if that is any advantage.
My research so far lead ...
2
votes
1
answer
266
views
Sed: replace text keeping digit occurrence
I have some text like:
Blablabla <b>[intlink id="</b>2204<b>" type="page"] Blalala
I want replace it for remove the </b> and <b>, keeping the id="number". So it should ...
35
votes
2
answers
35k
views
SSD: how often should I do fstrim?
There are different sources and different practices are suggested. I found the following proposals how often one should run fstrim.
run weekly by cron
run daily by cron
run at each boot
What is the ...
90
votes
2
answers
108k
views
Trim audio file using start and stop times
I have an FFmpeg command to trim audio:
ffmpeg -ss 01:43:46 -t 00:00:44.30 -i input.mp3 output.mp3
The problem I have with this command is that option -t requires a duration (in seconds) from 01:43:...
0
votes
0
answers
136
views
Should I use the discard flag when configuring the filesystem to be installed over the partitions on my SSHD?
I've recently bought a laptop with an SSHD. My guess is that most SSHDs are self-optimised, so the disk itself will handle wear-levelling issues, and I won't need to add the "discard" flag when ...
4
votes
1
answer
4k
views
How to run SSD trim fstrim on btrfs when mounted multiple subvolumes?
I am using btrfs and have mounted several subvolumes (but not btrfs root). It resides on SSD partition, so I would like to use fstrim. Should I call fstrim on each mountpoint (corresponding with ...
4
votes
1
answer
956
views
How to discard/TRIM a range in an open file ?
For an SSD, I can open the row device and discard a range of pages using ioctl() with BLKDISCARD command.
My question is
for an open file, how to discard a range of data? and Is that depends on the ...
3
votes
1
answer
3k
views
Why does fstrim trim all of the free space on my mdraid mirror after a reboot? [duplicate]
I have a server with 2 SSDs:
Model Family: Intel 520 Series SSDs
Device Model: INTEL SSDSC2BW240A3F
Firmware Version: 400i
User Capacity: 240,057,409,536 bytes [240 GB]
Sector Size: ...
4
votes
1
answer
2k
views
Can't enable TRIM on SSD
I can't enable TRIM on my newly-installed SSD.
Ubuntu Server 12.04, Linux 3.11.0-15-generic.
I turned TRIM on through discard setting in /etc/fstab.
Also TRIM doesn't work with fstrim command.
Here ...
3
votes
1
answer
392
views
fetch clipboard text and remove hyphens
I'm running Mac OS 10.9 and I use the Text to Speech feature which allows you to use a hotkey that reads selected text in any application. I use this feature for reading out-loud PDF documents in ...
9
votes
1
answer
10k
views
fstrim trims more than half of partition size even though partition mounted with discard
When I installed my SSD I just mounted with discard and didn't sweat it. However today I was reading about the pros and cons of using fstrim instead and decided to run the program to get an idea of ...
3
votes
0
answers
42
views
Determine whether TRIM commands are being sent [duplicate]
I've configured multiple SSDs in a RAID-0 array in AHCI mode. I'd like to determine whether TRIM commands are being sent to the disks. Is there a way to monitor these commands in the kernel somewhere? ...
17
votes
3
answers
13k
views
Utility to TRIM unallocated space on drive
I have a drive (SD card) with a few ext4 partitions but also some unallocated space. The fstrim utility can only work within a filesystem. Before I reinvent the wheel and write one, is there another ...