Changes between Initial Version and Version 1 of Processing/ssdsetup

Apr 3, 2012 3:26:40 PM (9 years ago)



  • Processing/ssdsetup

    v1 v1  
     1= SSD Setup Tutorial =
     3The following is a short tutorial on how to setup a Solid State Drive on Linux and use for swap space and storing temporary files. Upon completion of this procedure you should have a faster system in general and particularly a more responsive LAG. Note that all the commands listed below should be run as super user.
     5== Installation ==
     7To install an SSD drive you need to connect it with two cables: SATA data cable and a power cable. Turning off the workstation to do it is not necessary, but is recommended. If there are no spare cables inside your case it should be fine to use those that connect the optical drive as it is not being used anyway. The picture below shows the cables that need to be plugged into SSD.
     11#!div style="font-size: 80%; text-align: center"
     12SATA and power cables which need to be connected.
     15== Partitioning ==
     17Run gparted as root and select your new device from the list in the top-right corner. It should be called something like ///dev/sdc// and have 112GB capacity. Create one partition of size 122880MB with linux-swap file system and next partition with the remaining space as ext4 filesystem.
     21#!div style="font-size: 80%; text-align: center"
     22Gparted - that's how your drive should look like after partitioning.
     25== Setting up the swap space ==
     27To move the swap space you first need to check where is it already mounted:
     30cat /etc/fstab | grep swap
     33The firt column will tell you the mount point which should be something like ///dev/mapper/vg0-lv1/. Now, assuming your newly created swap partition is on /dev/sdc1, run:
     36swapoff -v /dev/mapper/vg0-lv1
     37mkswap /dev/sdc1
     38swapon -v /dev/sdc1
     41You can confirm that a 12GB swap has been created by running //free//.
     43== Editing /etc/fstab ==
     45To make the permanent changes to the filesystem you have to edit /etc/fstab file. Comment out or delete the line with //swap// in it and the line starting with tmpfs. At the and of the file add the following two lines:
     48/dev/sdb1    swap    swap    defaults    0 0
     49/dev/sdb2    /tmp    ext4    defaults,discard,noatime,rw,nosuid,noexec    0 0
     52Your fstab file should be similar to the one below:
     56#!div style="font-size: 80%; text-align: center"
     57/etc/fstab file after modification.
     60To apply the changes and properly setup the /tmp folder run:
     63mount -a
     64chown root:root /tmp
     65chmod 1777 /tmp
     68To confirm all worked you can now run //df// and see your /dev/sdc2 mounted on /tmp.