Jump to content



Photo

Linux and SSD


  • Please log in to reply
16 replies to this topic

#1 Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 16 January 2013 - 11:00

hey guys

I am getting an SSD in the next few weeks

now i know about no defrag etc but have some questions

after installing linux on it should i be setting anything else up on it to save writing all the time?

also i will have a normal drive in there too so was going to put

/home
/var

on the spinning drive is this ok to do?? should anything else go on the normal drive

and will this give me any problems?


#2 Aergan

Aergan

    Neowinian Senior

  • Tech Issues Solved: 6
  • Joined: 24-September 05
  • Location: Staffordshire, UK
  • OS: Windows 8.1 Pro | Xubuntu | OSX Yosemite| Server 2012 R2 | Ubuntu Server
  • Phone: Sony Xperia Z1

Posted 16 January 2013 - 11:20

I really wouldn't worry too much, they are not a fragile device that could die at any given moment.

On mine I have efi / boot / root on the SSD and /home to an SSD card. I don't run a swap partition.

Bare in mind that you will have to wait for the second drive on reads/writes/spinup.

#3 XerXis

XerXis

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 13-February 06
  • Location: Belgium

Posted 16 January 2013 - 11:22

by the time you've used up the write cycles on your ssd you will have bought a new disk anyway. Don't worry about it

Edit: but always buy SLC and not MLC ;)

#4 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 16 January 2013 - 11:31

getting a Vertex 4 :)

#5 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 16 January 2013 - 12:19

I really wouldn't worry too much, they are not a fragile device that could die at any given moment.

On mine I have efi / boot / root on the SSD and /home to an SSD card. I don't run a swap partition.

Bare in mind that you will have to wait for the second drive on reads/writes/spinup.



so would you just have it all on the SSD, then say if i am downloading Distro just move them from home onto the 2nd drive for storage?

#6 +Karl L.

Karl L.

    xorangekiller

  • Tech Issues Solved: 15
  • Joined: 24-January 09
  • Location: Virginia, USA
  • OS: Debian Testing

Posted 16 January 2013 - 16:34

I know I've posted this on Neowin somewhere before, but I can't seem to find it. I would recommend reading the Arch Wiki's article on Sold State Drives. Even if you're not running Arch, its an excellent resource. Here is my fstab, for reference:

proc		    /proc		   proc    nodev,noexec,nosuid 0	   0
UUID=7fd0430c-f487-4e11-847d-72face9a3cf0 /			   ext4    errors=remount-ro,noatime,discard 0	   1
UUID=1ba9f35b-a7c0-4e57-8ef8-7e7e3823f079 /boot		   ext4    defaults,noatime,discard		  0	   2
UUID=695f1604-6590-45cd-99a2-4d6638a01c6b /home		   ext4    defaults,noatime,discard		  0	   2
UUID=b0f33380-a805-4192-ae7b-8c8515a42497 none		    swap    sw			  0	   0


#7 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 16 January 2013 - 16:39

i seen aswell some recommend nodiratime

u dont have that

#8 f0rk_b0mb

f0rk_b0mb

    Neowinian Senior

  • Tech Issues Solved: 3
  • Joined: 02-June 12

Posted 16 January 2013 - 16:50

I could be wrong (and probobly am), but maybe someone could confirm if this would work on his Fedora rig? I don't see anything that ties it specificlly to Ubuntu so it should work.

http://www.webupd8.o...ate-drives.html

#9 +Karl L.

Karl L.

    xorangekiller

  • Tech Issues Solved: 15
  • Joined: 24-January 09
  • Location: Virginia, USA
  • OS: Debian Testing

Posted 16 January 2013 - 19:26

i seen aswell some recommend nodiratime

u dont have that


I didn't know that mount option existed before, but, honestly, noatime isn't really the most important switch for SSDs: discard is. noatime is merely a speed optimization to prevent file access times from being written to disk. (nodiratime does the same thing as noatime, but for directories instead of files.) You can use it on rotational hard disks as well (which, in fact, I do) to gain a slight advantage in that regard. discard is very important because it enables TRIM support, which will extend the life of your SSD by exploiting some of its technical characteristics.

Edit: I just read up on it and added nodiratime to my fstab. Thanks for the tip!

#10 Aergan

Aergan

    Neowinian Senior

  • Tech Issues Solved: 6
  • Joined: 24-September 05
  • Location: Staffordshire, UK
  • OS: Windows 8.1 Pro | Xubuntu | OSX Yosemite| Server 2012 R2 | Ubuntu Server
  • Phone: Sony Xperia Z1

Posted 16 January 2013 - 21:12

so would you just have it all on the SSD, then say if i am downloading Distro just move them from home onto the 2nd drive for storage?


Yeah pretty much. If you GPT/UEFI it, you can pretty much have as many partitions as you wish. Currently I have it split with Windows 8 Pro x64:

100MB Linux EFI Partition
12884MB EXT4 Partition for Ubuntu 12.10 x64 as /
100MB EFI partition for Windows Boot Loader
350MB NTFS System partition
*MB for Windows 8 OS

I also have an 8GB SDHC card for /home, 16GB SDHC card (Fat32) to shift stuff around from OS to OS and 2x500GB HDD's for Windows storage and games.

I might add fedora 18 onto the end depending on how I find it on a live test.

#11 +Karl L.

Karl L.

    xorangekiller

  • Tech Issues Solved: 15
  • Joined: 24-January 09
  • Location: Virginia, USA
  • OS: Debian Testing

Posted 16 January 2013 - 21:30

While it is fine to have your home and var partitions on a separate physical disk, don't just dd your current home partition - or really any partition - from your hard drive to your SSD; you will likely end up with alignment issues that will adversely affect performance and life expectancy. Format a partition on the new disk and use cp -a as root to copy everything from the old partition to the new one without losing file permissions and other extended attributes. (You can also use rsync -a --progress if you would like to see what is being copied instead of having no output.)

#12 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 17 January 2013 - 09:00

think i will prob just allow fedora to do its own partitions and use the 2nd drive for 2nd os testing and for sotrage

#13 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 17 January 2013 - 09:15

ok so looking online i have found this info so far

remove relatime and add in discard, noatime, nodiratime

update grub file to use deadline as a scheduler


Worked out i dont really want to put any partition on the HDD such as var etc as if it fails or i remove it the whole system goes lol

#14 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 15
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 26 January 2013 - 21:14

Ok set Deadline as the scheduler


and does this look good to you guys?

guys does this look good to you
Code:
UUID=e5b30aa2-a4b6-41a3-9e0a-6688252d36ee /					   ext4    defaults,discard,noatime,nodiratime	    1 1
UUID=8351a5aa-4bfd-4c45-872c-2ae6dc431e37 /boot				   ext4    defaults,discard,noatime,nodiratime	    1 2
UUID=5757507b-3c10-4495-89f9-a2b1eeaccaea /home				   ext4    defaults,discard,noatime,nodiratime	    1 2
UUID=1794135c-6075-4f17-b3bb-2b6635fd6380 swap				    swap    defaults,discard,noatime,nodiratime	    0 0
none /tmp tmpfs defaults 0 0


#15 +Karl L.

Karl L.

    xorangekiller

  • Tech Issues Solved: 15
  • Joined: 24-January 09
  • Location: Virginia, USA
  • OS: Debian Testing

Posted 27 January 2013 - 07:28

Haggis, your fstab looks more-or-less like mine (since I added nodiratime, anyway). It looks like you did everything right, including the scheduler.