SSD: fstab for ext4 + multiple logical partitions

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

SSD: fstab for ext4 + multiple logical partitions

Postby Eucalyptus on Thu May 10, 2012 1:54 pm

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.
User avatar
Eucalyptus
Level 3
Level 3
 
Posts: 114
Joined: Thu May 14, 2009 9:50 am
Location: Canada

Linux Mint is funded by ads and donations.
 

Re: SSD: fstab for ext4 + multiple logical partitions

Postby xenopeek on Thu May 10, 2012 3:41 pm

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:
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15439
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: SSD: fstab for ext4 + multiple logical partitions

Postby Eucalyptus on Thu May 10, 2012 9:46 pm

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.
User avatar
Eucalyptus
Level 3
Level 3
 
Posts: 114
Joined: Thu May 14, 2009 9:50 am
Location: Canada


Return to Newbie Questions

Who is online

Users browsing this forum: Google [Bot], Ian Johnson, karlchen and 38 guests