1

I multiboot. Does one OS issuing TRIM to my SSD cover all partitions or not?

I have a MacBook Pro (Core2Duo version 2.1 - late 2007) with the HDD replaced with a SSD. I am multi-booting it with Windows 10, Linux, Lion (the last supported OS X version) and El Capitan (the last OS X version that will work with Core2Duo).

All of these run on the same SSD.

I have enabled TRIM support for my SSD in Windows and OS X Lion but I'm not sure how to in the other OS. That isn't my question though.

My question is do I have to enable TRIM support in all OS or will one OS issuing the TRIM command work for the other OS on the same SSD?

That is does TRIM work for the SSD device or the individual OS?

3

does TRIM work for the SSD device or the individual OS?

Neither. It works for an individual mounted filesystem. Your drive is unable to tell by itself which data can be discarded because it knows nothing about filesystems nor other structures (like swap partitions), so it needs support from an OS that understands them.

If two of your OS-es access the same filesystem (not at the same time, of course) and the first one didn't trim, a trim command from the second one will do the job for the entire filesystem because it perceives the whole filesystem including whatever changes the first OS did.

As it's not advisable (nor sometimes possible) to mount the root partition of another OS, each OS should trim at least its own root partition and not rely on another OS to do this instead (even though in some cases it may be technically possible).

Also note you cannot trim a filesystem your (current) OS doesn't understand. A possible exception to this may be a utility that understands a filesystem foreign to the OS and can send trimming commands manually, despite the filesystem not even being mounted. You will probably never need such utility; your first choice should be to trim from an OS that understands a given filesystem natively.

will one OS issuing the TRIM command work for the other OS on the same SSD?

In general: no. Your drive doesn't care which OS trims what part, but, to trim right, an OS needs to tell apart relevant data from expendable; so it needs to understand the filesystem you want to trim. For this reason trimming from one OS in a multiboot setup like yours is not enough. A sane approach is to let each OS trim filesystems it uses exclusively. For filesystems "shared" between OS-es at least one OS should trim it on a regular basis.

-1

The TRIM command is issued by disk driver, which is why you had to turn it on in Windows and OS X.

Therefore this is a function of the OS, or more specifically of the disk driver, which needs to support TRIM and use it to execute deletes.

As in Wikipedia Trim (computing):

A trim command (known as TRIM in the ATA command set, and UNMAP in the SCSI command set) allows an operating system to inform a solid-state drive (SSD) which blocks of data are no longer considered in use and can be wiped internally.

  • 1
    I know it is issued by an OS - that is the question - I have done it twice. I also know what TRIM is or I would not have asked. This doesn't answer the question at all so downvoted for ignoring my question. – lx07 Dec 2 '18 at 19:07
  • There is no other answer, or your question doesn't make sense. What does it mean "work for the SSD device or the individual OS" - of course it works by the OS on the SSD via its firmware. So what else? – harrymc Dec 2 '18 at 19:09
  • Sure there is. "Do all OS need to enable TRIM in a multiboot scenario? "YES" or "NO" – lx07 Dec 2 '18 at 19:11
  • Neither: The OS enables nothing. It only permits its driver to use the TRIM command, the driver that is part of the OS. This is enabled by default, but the disabling part is just in case the TRIM support of the SSD is faulty, a transitional measure that will surely disappear in a few years. The disk firmware is always capable of receiving TRIM commands, if issued, and doesn't need enabling, nor does it care which OS issued the commands. – harrymc Dec 2 '18 at 20:58

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.