Forgot your password?
typodupeerror
Data Storage Ubuntu Linux

Out-of-the-Box, Ubuntu 14.04 LTS To Support TRIM On SSDs 133

Posted by timothy
from the keep-it-snappy dept.
First time accepted submitter Maurits van der Schee writes "Where in older versions you had to add a cron job calling "fstrim" or mounting with the "discard" option in fstab, the new LTS (Long Term Stable) version of Ubuntu Linux will automatically enable TRIM for your SSD. Good news for hardware enthusiasts!"
This discussion has been archived. No new comments can be posted.

Out-of-the-Box, Ubuntu 14.04 LTS To Support TRIM On SSDs

Comments Filter:
  • Stable? (Score:5, Informative)

    by Anonymous Coward on Saturday December 21, 2013 @08:26PM (#45757087)

    "LTS is an abbreviation for "Long Term Support" [ubuntu.com]."

  • by Anonymous Coward

    Aside from this being old news, along with the typical comments about Windows 7 having the feature since introduction.

    • Re: (Score:2, Informative)

      by Anonymous Coward

      along with the typical comments about Windows 7 having the feature since introduction

      Well, let me be that guy... ;)

      Windows implements TRIM command for more than just file delete operations. The TRIM operation is fully integrated with partition- and volume-level commands like format and delete, with file system commands relating to truncate and compression, and with the Volume Snapshot feature.[1] [msdn.com]

      • by fisted (2295862)
        Cool, so they're only how many years behind?
  • by Twinbee (767046) on Saturday December 21, 2013 @08:33PM (#45757125) Homepage
    But surely this defeats the perceived satisfaction of tweaking and fixing it all up manually? Where's the fun in that?
  • Taking too long (Score:5, Insightful)

    by Anonymous Coward on Saturday December 21, 2013 @08:36PM (#45757139)

    This is way overdue.

    It's also taking too long for file systems that provide snapshot features to become mainstream and default as well. And no, LVM snapshots aren't good enough.

    No, I'm not going to write the patches. They wouldn't be accepted in any case. Fundamental features such as the IO stack and file systems are now the exclusive purview of well-heeled outfits like Red Hat, Oracle, Intel, OSDL, etc. and and their stable of full time developers.

    They just need to do their jobs and get it done.

    • by csirac (574795)
      I've been choosing btrfs through the debian installer for at least a couple of years now. Yes, I know it's not as awesome as ZFS, but it still beats mdraid and lvm.
      • by darkpixel2k (623900) <aaron@heyaaron.com> on Sunday December 22, 2013 @01:31AM (#45758203) Homepage

        I've been choosing btrfs through the debian installer for at least a couple of years now.

        Dude you so have to try ZFS. It's aweso--

        Yes, I know it's not as awesome as ZFS, but it still beats mdraid and lvm.

        Oh--sorry. Got ahead of myself there. Good thing you stopped me in time.

      • by joel48 (103238)

        For single drives yes it seems to work well and so I can give you some advantages over filesystem unaware LVM. However in my experience (last tested in September) it doesn't come anywhere close to mdraid for multiple device setups. The tools don't accurately show the kernel state (drive missing or not) and there are a number of inconsistencies just in hotplugging drives. Oh and that is the only option because you can't even forcibly fail a drive from a RAID1 to replace it.

    • by profplump (309017)

      I'm currently using LVM snapshots for upgrades and backups -- what am I missing compared file system snapshots?

    • Meh, all I can hear is "waaah waaah Give me my free stuff"

  • TRIM not always good (Score:5, Interesting)

    by girlintraining (1395911) on Saturday December 21, 2013 @08:41PM (#45757185)

    the new LTS (Long Term Stable) version of Ubuntu Linux will automatically enable TRIM for your SSD. Good news for hardware enthusiasts!"

    And terrible news for encryption experts. Enabling TRIM tells your adversary which sectors contain data and which don't. It's a great asset to cryptanalysis and also destroys plausible deniability that there's a filesystem present on the drive, and how much data is present in it -- thus eliminating the "shadow volume" option of Truecrypt and others.

    • by Anonymous Coward

      Hmm? trimmed-sectors return all zeroes. Non-written sectors also return all zeroes. SSDs are not exactly well-tailored for encripted volume usage, and that's it.

    • Oh please.

      Most users don't want their drives go down to 5 megs per second. Trying to justify your OS doesn't cut it.

    • Isn't this one of those situations though where if you are likely to be rubber-hosed, you probably would have compiled the kernel yourself with this type of thing disabled?

      I can't see someone downloading and installing a pre-compiled distro if they are that worried about security....

    • Isn't that a configuration that can be changed? That's a default, I assume the "experts" will have no problem to set up their desired behavior.

    • (1) [Easiest solution] Turn off TRIM usage on encrypted volumes - loss of peak performance, but now you've got your "plausable deniability" back

      (2) [Adequate solution] Fix the firmware so that reading a TRIMed block causes random data to be written to it. However, you had better make sure that exactly the same power usage and timing comes from this activity compared to reading a previously-written block. You had also better be sure that the data is really random, so it can't be distinguished from encrypted

    • by SlashRAH (1236462)
      By default, LUKS ignores (errors, actually) those discard/TRIM messages at the block device layer, preventing the SSD from processing them. You have to explicitly override this in order to TRIM a block device under an encrypted filesystem, in which case you're on your own.
    • by glassware (195317)

      This kind of automatic naysaying because of a rare use case is why awesome projects don't move forward. The most vocal objections to progress come from people who rely on an unintended side effect of the interaction between complex pieces of software.

      Oh, wait, I forgot. "Terrible news" means "I might actually have to remember to disable TRIM support if I A) buy an SSD, B) use TrueCrypt, and C) rely on shadow volume support."

      If you, or anyone, is relying on the plausible deniability feature of truecrypt en

  • by sshir (623215) on Saturday December 21, 2013 @08:52PM (#45757231)
    Well, if you don't do random writes, you don't need TRIM.

    How to get away from random writes you ask? Simple! Just use BTRFS.

    "But my database!" you say. Well, the answer is simple - time to move away from 50 year old technology and to a modern database engine, the kind that doesn't do random writes either (fractal tree based, for example).

    Disclaimer: All of the above is not written for stodgy "enterprise level" types.
    • by fnj (64210)

      How to get away from random writes you ask? Simple! Just use BTRFS.

      Or you could use ZFS, which is an actual mature and reliable system which uses COW.

    • Im not entirely sure you understand what TRIM does. Its not to get rid of random writes, its to deal with a scenario where you have written and deleted 120GB from a 120GB SSD. Your OS has marked 120GB as "deleted", but those blocks are still occupied and cannot be re-written until they are first erased. This incurs a penalty, particularly since the erase block size is typically larger than the FS cluster size.

      • That is not completely accurate either. The main purpose of TRIM is to inform the disk which areas are not used by the file system so that they can be safely overwritten by remapped data for wear leveling purposes.
        • That is not correct: its not about doing anything safely or even about wear-leveling. The filesystem is what handles writes, and it knows where is safe to write to, and wear-leveling is helped by TRIM but that is not what TRIM actually does.

          TRIM simply informs the drive that it can perform an erase on a particular block when the filesystem marks it as deleted. This is so that any erases or remapping that needs to happen can e done when the drive is idle-- basically, it triggers garbage collection. With

          • by Rockoon (1252108)
            sigh this isnt exactly right either

            The situation is thus:

            An SSD is a physical storage that presents a logical drive to the system. There is no 1:1 mapping between physical sectors and logical sectors. Logical sector 0 is always the boot sector, but can be located anywhere on the physical media.

            An SSD is also unaware of the file system that is present. Prior to TRIM the entire logical volume, including all of its free sectors, were always allocated to physical locations and the SSD was unaware of which
      • by sshir (623215)
        I tend to write a lot between the lines. Here's the one of the lines I skipped: in COW setups, in stable state you write at exactly same rate as you free blocks. I.e. by writing 1 gig, you're freeing 1 gig. And so on to the end of block space, then you wrap and repeat. Wear leveling is additional side effect.
  • And supports vectors of ranges to Trim. Does it support this spec yet?

    Come on.

  • Is it bad that my first thought when reading this was "cool, when will Mint get this"?
    • by fisted (2295862)
      this is about a default setting, you ignorant fuck.
      • Ah, the famously friendly linux community! Hahahaha seriously though, if someone doesn't know something and you do, it doesn't hurt to be friendly about it :)
        • by fisted (2295862)
          Huh? You would have obtained that knowledge from merely reading TFS, not even TFA, so all you're doing now is further demonstrating your stupidity.

          That being said, I run {Free,Net}BSD, so your point about the linux community is moot.

          Protip (even applies to both, linux and BSD communities): It's only you lazy fucks who we're not friendly with.
          • It amazes me that I'd get dinged with mod points over calling you out in a polite fashion. What awful butthurt to live with, that you feel the need to be so vulgar. Your pro-tip is one I happily ignore. I'm polite with people even to the extent of not automatically assuming laziness, or considering not knowing a given fact a sin.
            • by fisted (2295862)
              As said, you're being lazy for not having read TFS. That isn't a wild assumption, your post makes that clear
  • Out-of-the-box? (Score:5, Informative)

    by rossdee (243626) on Saturday December 21, 2013 @11:16PM (#45757737)

    Does Linux come in a box these days, I thought you just downloaded it, and didn't have to pay for it and the packaging...

Genius is ten percent inspiration and fifty percent capital gains.

Working...