1 (edited by ikame 2012-02-22 16:58:52)

Topic: When does GParted trigger TRIM ?

Hello,

I've got a few questions regarding GParted and the TRIM command.

I may be wrong but for the TRIM command to be passed to an SSD I think 4 things need to support it : the file system, the OS, the SSD and the SATA controller driver.

I've got an SSD and a SATA controller that support TRIM, and I use ext4 as file system which I believe also supports TRIM.

Now I'm wondering if I use a recent version of GParted to format one of my system partitions, will it send the TRIM command to my SSD ?

I suppose that the answer is yes as I've read on Wikipedia that TRIM was added to the linux kernel from version 2.6.33 and recent versions of GParted use version 3.1.5-1. I just would like to know if my guess is correct.

My second question is this : Will GParted send the TRIM command even if the formatted partition use ntfs and not ext4 ?

And finally my last questions : Will GParted send the TRIM command if, instead of formatting a partition, I delete a partition ?
And what about if I just delete the whole table partition ?

I suspect that in those cases GParted won't send it because of what I read on Anandtech :

TRIM is triggered by two things it seems. Either deleting a file and emptying the recycle bin (to truly delete it) or formatting the drive. Simply deleting a partition doesn't TRIM the entire drive as I found out the hard way.

But again I'm not sure because Anand probably used Windows not GParted.

Thank you in advance for your time and your help.

2

Re: When does GParted trigger TRIM ?

ikame wrote:

I may be wrong but for the TRIM command to be passed to an SSD I think 4 things need to support it : the file system, the OS, the SSD and the SATA controller driver.

The GParted application does not contain any special code to send a "TRIM" command to SSDs.

If the kernel or file system issues this command, then it is entirely possible that it is supported on some GNU/Linux distributions, such as GParted Live.

3 (edited by ikame 2012-02-22 21:34:55)

Re: When does GParted trigger TRIM ?

Hello and thank you for your answer.

I was indeed talking about GParted Live (sorry I wasn't clear) which is what I usually use to format and create partitions.
Do you think that so long as I use a live-cd of GParted Live with a kernel greater than 2.6.33 then TRIM will be sent to the SSD when I format an ext4 or ntfs partition ?

I believe that latest versions of GParted Live use version 3.1.5-1 of the Linux kernel, at least that's what I read in the news :

15 December 2011: GParted Live 0.11.0-2 Stable Release

Thanks to Steven Shiau, a new stable GParted Live is available.

New in this release:

    Based on Debian Sid repository (as of 2011/Dec/14)
    Includes GParted 0.11.0 with volume label improvements, and XFS copy to new smaller partition
    Updated Linux kernel to 3.1.5-1
    Updated ntfs-3g to 2011.10.9AR.1-3
    Uses Grub 2 instead of grub 1 to align with many modern distributions

Curtis


Is there any documentation about GParted Live support of TRIM ? I didn't find anything with the search function of the forum.

Edit : I'm really sorry I just realised that I posted in the wrong section of the forum, I should have posted in the "Live Media" section. Should I repost my question in the correct section and ask a moderator to delete this topic ?

Edit 2: Thank you very much class413 and sorry for all the trouble.

4

Re: When does GParted trigger TRIM ?

(Topic moved to the Live Media section)

*** It is highly recommended to backup any important files before doing resize/move operations. ***

5

Re: When does GParted trigger TRIM ?

ikame wrote:

Do you think that so long as I use a live-cd of GParted Live with a kernel greater than 2.6.33 then TRIM will be sent to the SSD when I format an ext4 or ntfs partition ?

If this is something that the file system or Linux kernel does, then it is likely that it will occur with GParted Live.  As stated earlier, the GParted application does not contain any code to invoke a "TRIM" call on an SSD.

6

Re: When does GParted trigger TRIM ?

Ok thank you very much for your answer.