OpenELEC Forum
SSD TRIM doesn't appear to be enabled - Printable Version

+- OpenELEC Forum (https://forum.openelec.tv)
+-- Forum: Generic Forum (https://forum.openelec.tv/forumdisplay.php?fid=5)
+--- Forum: STORAGE (https://forum.openelec.tv/forumdisplay.php?fid=60)
+--- Thread: SSD TRIM doesn't appear to be enabled (/showthread.php?tid=8509)

Pages: 1 2 3 4


Re: SSD TRIM doesn't appear to be enabled - amak79 - 07-20-2011

I actually don't even need to even pass 'noatime' as mount displays it even when I don't have it extlinux.conf.

Regarding the 'ext2' mount issue, it's a known kernel bug. It affects my desktop system as well. It's just a cosmetic issue. You can workaround it by passing 'rootfstype=ext4' to the kernel line in GRUB.


Re: SSD TRIM doesn't appear to be enabled - amak79 - 07-20-2011

Well I believe the 'noatime' and 'discard' options aren't being passed because they aren't valid kernel parameters. If you have the kernel source available you can see the full list of kernel parameters at 'Documentation/kernel-parameters.txt'.

The 'elevator=noop' option is valid and does work. However setting it via extlinux.conf will cause all drives to use that scheduler. If you have a mix of SSDs and HDDs then this is not a good idea. The ideal way would be set the option via sysfs. I don't see how we can do this with OpenELEC since the relevant parts of the filesystem are read-only.

In any case thank you for the help. I'm now certain that TRIM isn't enabled unless the drive is mounted with the 'discard' option. I believe the devs would need to enable this explicitly as I see no way of setting this option at boot.


Re: SSD TRIM doesn't appear to be enabled - sraue - 07-20-2011

whats happen if i add the discard mount option in general, will mounting other filesystems (we are supporting ext2/ext3/ext4/vfat/hfsplus per default) work? can anyone test this if this filesystems will be mounted?

Stephan


Re: SSD TRIM doesn't appear to be enabled - josh4trunks - 07-20-2011

I bet you it just ignores it which would be fine.

If you make a kernel that mounts all partitions with discard I could test it but my openelec system only has a ssd with ext4, and also mount a nfs share... You might want to try with someone with multiple harddrives on their system with multiple filesystems.


Re: SSD TRIM doesn't appear to be enabled - amak79 - 07-20-2011

I was only able to test OpenELEC with vfat and it mounted without error. The 'discard' option was displayed when running mount.

I also tested my desktop with ext2 and vfat. In both cases the filesystems mounted without error.


Re: SSD TRIM doesn't appear to be enabled - amak79 - 08-08-2011

Has there been any update on this issue?


Re: SSD TRIM doesn't appear to be enabled - josh4trunks - 08-18-2011

I don't think so. sraue is the head developer so he would know.


Re: SSD TRIM doesn't appear to be enabled - devkid - 08-20-2011

So it is currently not possible to pass "discard" as a mount option? I thought it had to go into /etc/fstab but that file is completely empty.


Re: SSD TRIM doesn't appear to be enabled - josh4trunks - 08-20-2011

devkid post=10215 Wrote:So it is currently not possible to pass "discard" as a mount option? I thought it had to go into /etc/fstab but that file is completely empty.

/etc in openelec isn't even writable and I believe it's not read. only /storage and I believe /flash are writable.

Discard can be passed but only with a remount so if you rebooted you'd need to manually run the remount command again... Hopefully we can get this as a kernel parameter somehow but I'm not smart enough to know how to do this


Re: SSD TRIM doesn't appear to be enabled - amak79 - 10-20-2011

I was able to get the 'discard' option to be persistent across reboots by running:

Code:
tune2fs -o discard /dev/sda2

This sets the 'discard' option for '/storage'. I don't believe I need to set it for '/dev/sda1' as it's read-only.

Update: Well this doesn't seem to work anymore. In my initial testing, 'discard' was persistent across reboots. Now I've noticed that it's no longer being set. Worse still, I'm unable to even set 'discard' via tune2fs.