Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Linux / Centos 6.5 SSD Best Practice

Posted on 2014-04-07
8
Medium Priority
?
6,226 Views
Last Modified: 2016-11-23
Hi Guys,

I'm in the process of configuring a new laptop with Centos 6.5. The laptop has a SSD and I want to make sure that I have it configured correctly so as not to either damage, shorten lifespan, or degrade performance.

Based on what I read at:

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html-single/Storage_Administration_Guide/index.html#ch-ssd

and

http://www.bit-integrity.com/2011/11/ssd-performance-tips-for-rhel6-and.html

I added the discard option to my fstab but that caused it not to boot with the error invalid partition table. As per the RedHat documentation I checked the /sys/block/sda/queue/discard_granularity file which has a value of 512.

After a reinstall, I moved /tmp to ram and so far my /etc/fstab looks like this:

#
# /etc/fstab
# Created by anaconda on Mon Apr  7 14:52:42 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_micron-lv_root /                       ext4    defaults        1 1
UUID=**** /boot                   ext4    defaults        1 2
/dev/mapper/vg_micron-lv_home /home                   ext4    defaults        1 2
/dev/mapper/vg_micron-swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
none                  /tmp                  tmpfs      defaults      0 0

----

1) How should I configure fstab to use trim (if possible)
2) Are there are other performance measures that I should take with the ssd? (and any links to how + I decided to keep the swap)

My hardware is a Dell E7240 w/ 8Gb Ram
0
Comment
Question by:bimrock
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 35

Assisted Solution

by:Seth Simmons
Seth Simmons earned 375 total points
ID: 39985019
this should explain things a bit more:

Is there TRIM support for SSD in RHEL6?
https://access.redhat.com/site/solutions/44477

Chapter 21. Solid-State Disk Deployment Guidelines
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ch-ssd.html
0
 

Author Comment

by:bimrock
ID: 39986637
Hi Seth,

Thanks for the response but I don't have a RH subscription... so I could not view the info in the 1st link.

Cheers.
0
 
LVL 14

Accepted Solution

by:
ThomasMcA2 earned 375 total points
ID: 40035618
To enable TRIM suport, add the "discard" option to fstab, like this:

UUID=b4ff9316-e1dc-4492            /disk2                   ext4 discard,user,noatime,nodiratime,errors=remount-ro 0 1

The noatime and nodiratime options are optional, but they help reduce the I/O to the drive, so I use them on my SSD.

Also, I don't think ext2 or ext3 support TRIM. Since I use ext4 anyway, that was not an issue for my drive.
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:bimrock
ID: 40041244
Thanks ThomasMcA2,

I tried running similarly and it does not boot. I have the /, /boot, /home... all on that SSD. The only option that I was not using was errors=remount-ro. I'm not quite sure if there was something in particular that I missed. I actually had to reinstall and try twice both times I could not boot after adding the discard option.
0
 
LVL 14

Expert Comment

by:ThomasMcA2
ID: 40041253
Is the disk using ext4? I'm not sure how to find out from the console, but gparted will show you the file system type.
0
 

Author Comment

by:bimrock
ID: 40052663
Yes the file system is ext4
0
 
LVL 14

Expert Comment

by:ThomasMcA2
ID: 40054431
Have you tried a fresh install to the SSD using a LiveCD or LiveUSB stick? Maybe the fresh install will setup the SSD correctly.

My SSD is a 2nd drive that I don't boot from, so I'm not much help with boot-specific issues. Sorry.
0
 

Author Comment

by:bimrock
ID: 40085296
No worries... I can boot using a live stick... I am able to boot and use the disk just fine with Ext4 and Centos recognises that its a SSD...  it just that based on my reading I thought that using the DISCARD option was a good thing to do to reduce wear on the SSD. However, when I try using the options suggested and even those as per the RH documentation I cannot boot. I'm going to close out the question none the less and move on to other things.
0

Featured Post

Not sure which OpenStack Certification to get?

So you’ve realized you might want to get certified in OpenStack, but you’re not sure what the benefits might be or even which one you should take. You know there are several certification courses you can choose from, but how do you know which one is right for you?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

this article is a guided solution for most of the common server issues in server hardware tasks we are facing in our routine job works. the topics in the following article covered are, 1) dell hardware raidlevel (Perc) 2) adding HDD 3) how t…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question