Hi 1- can fstrim work on read only mounted partitions? 2- can discard and ro options be mixed in fstab?
Thanks
On 17/08/14 03:16, Ali Alipoor.R wrote:
Hi 1- can fstrim work on read only mounted partitions?
[...]
2- can discard and ro options be mixed in fstab?
The upstream ext4 filesystem developer had posted[1] some time ago that using the "discard" mount option is not recommended for most SATA SSD drives.
[1]http://lkml.iu.edu//hypermail/linux/kernel/1302.2/03739.html
[...]
On 08/17/14 08:16, Ali Alipoor.R wrote:
1- can fstrim work on read only mounted partitions? 2- can discard and ro options be mixed in fstab?
I don't have any SSD in my systems. However, doing a bit of reading on "trim" it seems it addresses a need when files are being created/deleted/modified on a system. Since that isn't happening on a RO file system it seems to me to make little sense to enable/use "trim".
Also, FWIW, http://blog.neutrino.es/2013/howto-properly-activate-trim-for-your-ssd-on-li... seems like a knowledgeable article on the subject. Especially note the advice to not use discard in the fstab.
I don't have any SSD in my systems. However, doing a bit of reading on
"trim" it seems it addresses a need when files are being created/deleted/modified on a system. Since that isn't happening on a RO file system it seems to me to >make little sense to enable/use "trim". My goal is trimming a file system which need to be trimmed but not modified , i guess it works but i'm not *sure* ... (because all that trim need is a file system to examine which blocks of it is in use and a drive to send commands)
If you can afford to leave enough free un-partitioned space on the SSD,
then you don't need discard or fstrim as the un-partitioned space acts as extra over-provisioning. Have a look at this blog post[1] by Kent Smith from LSI (they make >the SandForce flash controller on Intel SSD's) and the comments on it, it was very informative (for me at least). Over provisioning has different purpose than trim; by over provisioning you make sure that SSD don't need to move data around and do unnecessary garbage collection (which increases SSD wear) to free some space as its scratch book but with trim you notify the SSD that which pages are not effectively in use
Thanks
On 17.08.2014, Ali Alipoor.R wrote:
1- can fstrim work on read only mounted partitions?
No. On partitions mounted "ro", nothing gets deleted, and thus there is no need for discard.
2- can discard and ro options be mixed in fstab?
Yes, but this makes no sense.
I've read the other answers you got in this thread. I've been using SSD drives nearly two years, all of its partitions are mounted with discard enabled, and didn't encounter any sideeffects. So despite some folks are advising against using the discard mount option, it depends on what's important for you and how your system behaves. In short: you have to try for yourself what fits your needs.
Btw: great that there's proof for at the discard mount option can result in lower performance. But, as always, this doesn't take into account if and to what degree this affects real life behaviour, which also varies between the respective real life situations...
On 17/08/14 10:44, Heinz Diehl wrote: [...]
I've read the other answers you got in this thread. I've been using SSD drives nearly two years, all of its partitions are mounted with discard enabled, and didn't encounter any sideeffects. So despite some folks are advising against using the discard mount option, it depends on what's important for you and how your system behaves. In short: you have to try for yourself what fits your needs.
Btw: great that there's proof for at the discard mount option can result in lower performance. But, as always, this doesn't take into account if and to what degree this affects real life behaviour, which also varies between the respective real life situations...
If you can afford to leave enough free un-partitioned space on the SSD, then you don't need discard or fstrim as the un-partitioned space acts as extra over-provisioning. Have a look at this blog post[1] by Kent Smith from LSI (they make the SandForce flash controller on Intel SSD's) and the comments on it, it was very informative (for me at least).
[1]http://blog.lsi.com/gassing-up-your-ssd