Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [trim]

The tag has no usage guidance.

0
votes
2answers
18 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 ...
1
vote
1answer
90 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
1answer
39 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
1answer
49 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 ...
1
vote
1answer
1k 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 ...
2
votes
2answers
425 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:...
3
votes
1answer
842 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
4answers
1k 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/...
2
votes
1answer
763 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
1answer
609 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 ...
4
votes
1answer
1k 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 ...
6
votes
3answers
3k 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. ...
3
votes
2answers
1k 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
1answer
626 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 ...
3
votes
1answer
748 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 ...
1
vote
1answer
1k 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 ...
3
votes
2answers
9k 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....
3
votes
1answer
1k 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
1answer
704 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
1answer
474 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
1answer
2k 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
1answer
178 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 ...
23
votes
2answers
23k 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 ...
22
votes
2answers
27k 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
0answers
96 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
1answer
2k 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
1answer
576 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 ...
2
votes
1answer
2k 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
1answer
1k 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
1answer
313 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 ...
7
votes
1answer
8k 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
0answers
37 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? ...
10
votes
2answers
7k 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 ...
5
votes
1answer
1k views

fstrim and iostat

I have a new samsung ssd in my new notebook. I tuned up everything to avoid writings in the disk (firefox profiles and /var/log in memory), I'm using a ext4 fs with relatime and I use fstrim once a ...
6
votes
2answers
7k views

Unix: how to read line's original content from file

I have a data file, the content is as follows: department: customer service section: A department: marketing section: A department: finance section: A When I read each line, I ...
21
votes
3answers
8k views

Trim with LVM and dm-crypt

I tried to setup TRIM with LVM and dm-crypt on ubuntu 13.04 following this tutorial: http://blog.neutrino.es/2013/howto-properly-activate-trim-for-your-ssd-on-linux-fstrim-lvm-and-dmcrypt/ See the ...
8
votes
3answers
4k views

Will formatting my drive TRIM my SSD?

Will a standard fresh linux (Ubuntu 11.10 to be exact) install and drive re-format (full) successfully TRIM my SSD, or do I need to do something extra? I know that ext4 will TRIM blocks on erase ...