Fstab entry for SSD

I have a Samsung 840 Evo in my system that is my former Windows boot drive. But since I do no longer boot into Windows I have reformatted it to ext4 and wanted to use it as a high-speed scratchdisk or data transfer medium (Desktop has 2,5 inch hot swap bays, Laptop is a thinkpad with ultrabay). I do not want it to auto-mount with dolphin but to mount it at boot (to have working links to my home folder).

So my question is:
What would a fstab entry look like for a SSD?

Sadly I do not have the time to dump two or three hours into learning all the ins and outs of the fstab.

First, back-up your default fstab file

sudo cp /etc/fstab /etc/fstab.bak

UUID=x######x-XXXX-####-##xx-####xx####xxxx / (mount location) ext4 noatime,discard,errors=remount-ro 0 2

You can get the UUID of the drive running the command "blkid" in terminal

1 Like

Out of curiosity, what do the flags after noatime,discard,errors=remount-ro 0 2 do, and why are they SSD specific?

That is copied right out of my active Fstab file. There are dozens of online tutorials outlining how to optimize for an ssd in linux. I think its related to trim, and how it manages I/O, etc. I don't know of the top of my head. I would have to google it.

You wanted a quick and dirty, two-second answer, you got it. Any other question can be googled. Though if you want me to look at your fstab settings after you have googles things, throw it in a pastebin and I will look at it.

As noted in the Fstab file it's self:

# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works **even if disks are added and removed**. See fstab(5).



http://bernaerts.dyndns.org/linux/74-ubuntu/250-ubuntu-tweaks-ssd


1 Like

It might probably be easier to google on how the fstab file works and what options attribute to what feature. Just asking a question here won't help much as you're only going to get a quick answer that doesn't solve the question "how does this work?" But rather you are given a band-aid to apply on top of it.

EDIT: I did see the mention of not having two or three hours, but there isn't much information needed to known to work the fstab file. Just the basic line and the options you want after reading them.

First of all: Thanks to @kungr for the copy of a working line, that was just what I needed ;)

@Novasty Regarding your edit: Jup, exactly what I wanted. I'll get into the topic fstab in two weeks. Currently I'm too busy for that. As the great philosopher Mick Jagger said: "You can't always get what you want but if you try sometimes you might get what you need".