Announcement

Collapse
No announcement yet.

SSD fstab issue

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SSD fstab issue

    I just remembered to enable trim on my ssd. I went to fstab and added "discard" to my ssd partitions.

    Code:
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sdb1 during installation
    UUID=cf946259-1bf4-48fc-8035-0de8469a2262 /               ext4    errors=remount-ro,discard 0       1
    # /home was on /dev/sdb2 during installation
    UUID=12d15494-5cf9-4042-937a-6d1df31ac1b7 /home           ext4    defaults,discard        0       2
    # /home/zachleigh/Downloads was on /dev/sda5 during installation
    UUID=b99dbd41-1e29-4359-b018-ff1813ebd36e /home/zachleigh/Downloads ext4    defaults        0       2
    # /home/zachleigh/Backup was on /dev/sda1 during installation
    UUID=63d30a64-dce6-4c8d-b608-c363a7f3664d /home/zachleigh/Backups ext4    defaults        0       2
    # /home/zachleigh/Music was on /dev/sdc1 during installation
    UUID=fd3e5b4d-2441-48ea-af3d-8a2250721041 /home/zachleigh/Music ext4    defaults        0       2
    # /tmp was on /dev/sda6 during installation
    UUID=9f4d4202-9ad4-49f7-8841-1260b7e270a7 /tmp            ext4    defaults        0       2
    # swap was on /dev/sda7 during installation
    UUID=a25216ef-b473-4018-81f2-8dee738e5628 none            swap    sw              0       0
    I rebooted and then used this guide to test if trim is enabled. Ive always used this guide and have never had trouble with it. When I run the sudo hdparm --fibmap testfile
    command, I should get a begin_LBA value and an end_LBA value but instead I get this:
    Code:
    testfile:
     filesystem blocksize 4096, begins at LBA 41945088; assuming 512 byte sectors.
     byte_offset  begin_LBA    end_LBA    sectors
               0       -          -          -
    Any idea what Im doing wrong? Everything mounts correctly and I have no visible problems...

    #2
    Did you remember to sync first?

    Comment


      #3
      This solved itself...dont know how. I ran the test again this morning and everything was fine.

      Comment


        #4
        IMO, enabling trim via fstab (aka "online trim") is not a good idea unless you're deleting/creating 1000's of files every day or running above 90% full on your SSD. You'll take a significant performance hit and require lots of unneeded R/W activity. There is no need for continuous garbage collection. You'll reduce wear and have better performance by running trim as a cron job: daily for heavy use or less for "normal" use. I run trim once monthly.

        Same goes for turning off atime ("noatime" option) unless you really need constant records of file access.

        For performance, you may also consider data=writeback, barrier=0, nobh options, but I suggest you research them for yourself first so you're clear on what they do.

        I used to suggest using the noop scheduler also, but I think cfq has been updated for SSDs so this may not have benefit any longer.

        Please Read Me

        Comment


          #5
          I concur with Oshun's remark about discard. When I stopped using that mount option, I noticed an overall improvement in day-to-day performance.

          I have flown with data=writeback for years now; never had a problem. The other options are too risky, IMHO. And I still use the noop scheduler.

          Comment

          Working...
          X