Re: Re: TRIM support for ext4
On Mon, Mar 12, 2012 at 12:04:52AM +, Miguel Figueiredo wrote: Hi all, Hi Add the mount option 'discard' for ext4 filesystems so, during partitioning, TRIM can be activated for SSDs in the installed system. I enabled that on ext4 on my SSD, and had two lockups in 24 hours. No lockups since turning it off, so I don't consider it safe yet at all. The man page seems to indicate it is very much in the testing phase at this point. I guess it's got stabilised in the later kernels, could you try it again? Cheers Luk -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/5208096e.8070...@debian.org
Re: TRIM support for ext4
Miguel Figueiredo wrote: Add the mount option 'discard' for ext4 filesystems so, during partitioning, TRIM can be activated for SSDs in the installed system. I had the impression that there was going to be some sort of automatic detection in the kernel of appropriate devices and that trim would be automatically enabled for them. Is it not going to play out that way? -- see shy jo signature.asc Description: Digital signature
Re: TRIM support for ext4
Floris Bos / Maxnet wrote: In addition to that, it would also be nice if the -E discard option is passed to mkfs.ext4, so that it TRIMs the entire disk partition prior to creating the file system structures. -E discard is the default, according to mkfs.ext4(8) -- see shy jo signature.asc Description: Digital signature
Re: TRIM support for ext4
On 03/12/2012 07:51 AM, Joey Hess wrote: Floris Bos / Maxnet wrote: In addition to that, it would also be nice if the -E discard option is passed to mkfs.ext4, so that it TRIMs the entire disk partition prior to creating the file system structures. -E discard is the default, according to mkfs.ext4(8) Not the most clear man page... On the (Ubuntu) version I have on my desktop, it also says nodiscard is the default?! == discard Attempt to discard blocks at mkfs time (discarding blocks initially is useful on solid state devices and sparse / thin-provisioned storage). When the device advertises that dis‐ card also zeroes data (any subsequent read after the discard and before write returns zero), then mark all not-yet-zeroed inode tables as zeroed. This significantly speeds up filesystem initialization. This is set as default. nodiscard Do not attempt to discard blocks at mkfs time. This is the default. == -- Yours sincerely, Floris Bos -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4f5d9ead.1040...@je-eigen-domein.nl
Re: TRIM support for ext4
On 03/12/2012 07:58 AM, Floris Bos / Maxnet wrote: On 03/12/2012 07:51 AM, Joey Hess wrote: Floris Bos / Maxnet wrote: In addition to that, it would also be nice if the -E discard option is passed to mkfs.ext4, so that it TRIMs the entire disk partition prior to creating the file system structures. -E discard is the default, according to mkfs.ext4(8) Not the most clear man page... On the (Ubuntu) version I have on my desktop, it also says nodiscard is the default?! Hmm, and to make things more complicated. The RELEASE-NOTES that come with the e2fsprogs source say that the default is what you put in mke2fs.conf == Mke2fs now understands the extended option discard and nodiscard, and the older option -K is deprecated. The default of whether discards are enabled by default can be controled by the mke2fs.conf file. == Still does not explain what behaviour you get when neither discard nor nodiscard is listed in that file... *sigh* -- Yours sincerely, Floris Bos -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4f5da356.1040...@je-eigen-domein.nl
Re: TRIM support for ext4
Hi, On 12-03-2012 04:55, Joey Hess wrote: I had the impression that there was going to be some sort of automatic detection in the kernel of appropriate devices and that trim would be automatically enabled for them. Is it not going to play out that way? Just adds the mount option to partman. -- Melhores cumprimentos/Best regards, Miguel Figueiredo -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4f5db37d.4070...@debianpt.org
Re: TRIM support for ext4
Miguel Figueiredo wrote: On 12-03-2012 04:55, Joey Hess wrote: I had the impression that there was going to be some sort of automatic detection in the kernel of appropriate devices and that trim would be automatically enabled for them. Is it not going to play out that way? Just adds the mount option to partman. Obviously; that does not, however, answer my question, and providing an option is not going to do anything to help the majority of users. -- see shy jo signature.asc Description: Digital signature
Re: TRIM support for ext4
Floris Bos / Maxnet wrote: Hmm, and to make things more complicated. The RELEASE-NOTES that come with the e2fsprogs source say that the default is what you put in mke2fs.conf That's for an older version. int discard = 1;/* attempt to discard device before fs creation */ } else if (!strcmp(token, discard)) { discard = 1; } else if (!strcmp(token, nodiscard)) { discard = 0; discard = get_bool_from_profile(fs_types, discard , discard); -- see shy jo signature.asc Description: Digital signature
Re: TRIM support for ext4
On Mon, Mar 12, 2012 at 12:04:52AM +, Miguel Figueiredo wrote: Hi all, Add the mount option 'discard' for ext4 filesystems so, during partitioning, TRIM can be activated for SSDs in the installed system. I enabled that on ext4 on my SSD, and had two lockups in 24 hours. No lockups since turning it off, so I don't consider it safe yet at all. The man page seems to indicate it is very much in the testing phase at this point. -- Len Sorensen -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20120312181115.ga20...@caffeine.csclub.uwaterloo.ca
TRIM support for ext4
Hi all, Add the mount option 'discard' for ext4 filesystems so, during partitioning, TRIM can be activated for SSDs in the installed system. -- Melhores cumprimentos/Best regards, Miguel Figueiredo diff --git a/debian/partman-basicfilesystems.templates b/debian/partman-basicfilesystems.templates index f615c4b..877e03c 100644 --- a/debian/partman-basicfilesystems.templates +++ b/debian/partman-basicfilesystems.templates @@ -367,3 +367,10 @@ Type: text # a 65 columns limit (which means 65 characters in single-byte languages) _Description: shortnames - only use the old MS-DOS 8.3 style filenames +Template: partman-basicfilesystems/text/discard +Type: text +# :sl4: +# Note to translators: Please keep your translations of this string below +# a 65 columns limit (which means 65 characters in single-byte languages) +_Description: discard - provide discard/TRIM for SSDs. Use with caution. + diff --git a/mountoptions/ext4 b/mountoptions/ext4 index 25bc519..3215239 100644 --- a/mountoptions/ext4 +++ b/mountoptions/ext4 @@ -8,3 +8,4 @@ sync usrquota grpquota user_xattr +discard
Re: TRIM support for ext4
On 03/12/2012 01:04 AM, Miguel Figueiredo wrote: Add the mount option 'discard' for ext4 filesystems so, during partitioning, TRIM can be activated for SSDs in the installed system. I assume the patch only adds discard as mount option to /etc/fstab? In addition to that, it would also be nice if the -E discard option is passed to mkfs.ext4, so that it TRIMs the entire disk partition prior to creating the file system structures. -- Yours sincerely, Floris Bos -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4f5d8189.9040...@je-eigen-domein.nl