Re: Kernel option to disable TRIM/discard system-wide?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/27/2016 04:52 AM, Martin K. Petersen wrote:
"Peter" == Peter Rabbitson <rabbit+list@xxxxxxxxx> writes:

I want to disable trim on my system for good - yet there seems to be
no kernel boot parameter for this.

There's no global way to disable TRIM but you can disable it on a
per-device basis by setting /sys/block/sdN/queue/discard_max_bytes to
0.

That would be sufficient for me - I can enforce this with a udev rule.

However what you propose does not currently work:

root@Ahasver:~# cat /sys/block/sda/queue/discard_max_bytes
2147450880

root@Ahasver:~# echo 0 > /sys/block/sda/queue/discard_max_bytes
-bash: /sys/block/sda/queue/discard_max_bytes: Permission denied

root@Ahasver:~# uname -a
Linux Ahasver 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux

root@Ahasver:~# dpkg -l linux-image-3.16.0-4-amd64 | grep ii
ii linux-image-3.16.0-4-amd64 3.16.7-ckt20-1+deb8u4 amd64 Linux 3.16 for 64-bit PCs

What am I missing?
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux