Would this be a valid script for fstrim in rc.6?
Hi,
Anyone care to venture an opinion on the following? I recently put an msata solid state drive in my laptop. As far as I am aware, Slackware does nothing out of the box to manage TRIM etc on this type of drive. I came across the following script: "The following script can be used to automatically detect and fstrim all filesystems that have TRIM support enabled." Code:
#!/bin/sh For reasons explained here: http://blog.neutrino.es/2013/howto-p...m-and-dmcrypt/ it seems a better option than the discard parameter in fstab. regards, tobyl |
I ran the script (except the fstrim program) on the machine I'm at now and it produced.
Code:
/boot I'm not a fan of your idea. I prefer configuring the machine manually as appropriate (discard option) rather than hoping a script understands the configuration correctly. You probably don't want the programs being run (lsblk, fstrim) to change with the environment ($PATH). /bin/lsblk and /sbin/fstrim would be better. Just my thoughts. It's good to think up and try new items that "may" improve the system whether they are successful/accepted or not. |
Thanks for replying Tracytiger
You raise fair points. I think the script could be adjusted to fix the path to point direct to the binaries, on reflection this does seem to be the normal way of doing stuff in rc files. If it couldn't be improved to take care of special cases such as raid arrays (which I doubt is beyond the wit of man), it could just be an optional section commented out unless the user decided to activate it, in a similar way to the S.M.A.R.T disk monitoring in rc.M I just thought in these days where ssd drives are commonplace, it might be worthy of consideration. tobyl |
All times are GMT -5. The time now is 12:50 AM. |