LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   How Do You Handle SSD's (https://www.linuxquestions.org/questions/centos-111/how-do-you-handle-ssds-4175544122/)

cachedrive 05-31-2015 04:49 PM

How Do You Handle SSD's
 
I'm wondering how the CentOS 7 community handles SSD's? Do you just slam them in, load XFS on them and move along or do you do other things? Being that XFS is the new default FS for CentOS, I assume there's been some considerations for SSD performance support. I just don't know what those are.

Do I need to somehow specify TRIM support for my CentOS 7 installation? I know the kernel supports it however I assume there needs to be some configs set in /etc/fstab, no?

Head_on_a_Stick 05-31-2015 05:02 PM

Modern SSDs need no special treatment, their longevity is better than the average spinning rust drive.
http://techreport.com/review/27909/t...heyre-all-dead

You can enable TRIM automatically by adding "discard" to the "options" section in /etc/fstab but this will slow down your drive.

I use a systemd .timer to apply fstrim periodically; I don't use CentOS so I'm not sure how that would translate.

TobiSGD 06-01-2015 04:11 AM

Quote:

Originally Posted by Head_on_a_Stick (Post 5370331)
I use a systemd .timer to apply fstrim periodically; I don't use CentOS so I'm not sure how that would translate.

Since version 7 CentOS also uses systemd, so your .timer unit should be usable there. too.

Head_on_a_Stick 06-01-2015 04:25 AM

^ Thank you :)

Here it is:
Code:

# /usr/lib/systemd/system/fstrim.timer
[Unit]
Description=Discard unused blocks once a week
Documentation=man:fstrim

[Timer]
OnCalendar=weekly
AccuracySec=1h
Persistent=true

[Install]
WantedBy=multi-user.target

Enable it with:
Code:

# systemctl enable fstrim.timer
You will need fstrim (obviously):
Code:

# yum install fstrim
The .timer unit may be supplied with the package so check before making a new one.


All times are GMT -5. The time now is 02:20 AM.