Page 1 of 1

SSD: fstab for ext4 + multiple logical partitions

Posted: Thu May 10, 2012 1:54 pm
by Eucalyptus
Hi,

Using LM12 x64. Installed from scratch on a brand new SSD (Crucial M4, 128 GB). Laptop Acer Aspire One 722, AMD C60 & 4 GB RAM. I followed the advice on this LinuxMint forum post: (Help with SSD) BTW, this guide is really good, clearer and more complete than many I have found in various blogs. You shoulld consider to make it sticky.

However, it is still unclear as I have multiple partitions (/boot /home and /) on the same SSD. Here is how my fstab looks like:

Code: Select all

# / was on /dev/sda5 during installation
UUID=014d5839-5ddf-4044-a958-f53c67319ee9 /               ext4    errors=remount-ro,noatime,discard 0       1
# /boot was on /dev/sda1 during installation
UUID=a9c19f60-7e2e-4bea-824a-af117f874380 /boot           ext2    defaults        0       2
# /home was on /dev/sda6 during installation
UUID=f34268f6-c618-4c48-b03f-eb47459ef1f3 /home           ext4    defaults        0       2
# swap was on /dev/sda7 during installation
UUID=98f8f40f-048c-4caf-8fcd-fbfe29f731ee none            swap    sw              0       0

#force temporary files to be stored in memory instead of on disk
none /tmp     tmpfs nodev,nosuid,mode=1777 0 0
none /var/tmp tmpfs nodev,nosuid,mode=1777 0 0
Question 1: Do I need to add noatime,discard options to the /home partition? If yes, can you please suggest the exact wording to replace the current options defaults?

Question 2: can you please explain more about the lines regarding tmpfs? More exactly, what are the differences between:
none /tmp tmpfs nodev,nosuid,mode=1777 0 0
none /var/tmp tmpfs nodev,nosuid,mode=1777 0 0


compared to:
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
(that I saw on various blogs)

Question 3: Linux Disc Scheduler, noop or deadline?
in /etc/default/grub, the guide above suggests to set
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=noop"

In this blog How to set up an SSD on Linux the author suggests
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=deadline"

The author explained
The noop is a simple first in first out queue. The deadline is a biased noop queue that allows an application to get some access to the disc even if another application has already requested it. The deadline is the best scheduler because it has more features than the noop and doesn’t worry about a rotating disc like cfq.
I would prefer your opinion on this scheduler setting. Which setting is better?

Thanks very much in advance for any advice.

Re: SSD: fstab for ext4 + multiple logical partitions

Posted: Thu May 10, 2012 3:41 pm
by xenopeek
1: Yes, add noatime,discard to any non-swap Linux partitions on your SSD. Test that you have TRIM on your SSD though, before you add discard to any!

2: the first column (none vs. tmpfs) is the device to mount, but as there is no device to mount (it is in memory), you can use none or tmpfs as you want. I used "none" as that is what the command "mount" shows you the system uses for its tmpfs partitions (like /var/run).

The options nodev,nosuid,mode=1777 I've selected, but you can use the other. "noatime" isn't needed though, as it is writing to memory and not your SSD. "defaults" means rw, suid, dev, exec, auto, nouser, and async. And "defaults" is the default, so you don't need to name that. I've overruled suid an dev with nodev and nosuid as a security measure (there should be no suid or dev files on /tmp). See "man mount" for more information about the options.

3: Perhaps, but I'm sticking with noop for the reasons shared here: https://wiki.archlinux.org/index.php/So ... _Scheduler You can use noop or deadline. I let the SSD itself optimize my disk operations and tell the OS to mind its own business :wink:

Re: SSD: fstab for ext4 + multiple logical partitions

Posted: Thu May 10, 2012 9:46 pm
by Eucalyptus
Hi,

Thank you for taking the time to answer. It's fairly technically advanced for me the really grasp all the meaning. However, I now have enough information to complete the configuration. Thanks.