You all know I don't know all that much about Linux, possibly even less about terminal.
Well...
I want to enable TRIM, disable swap/tmp if possible and optimise my SSD for Linux according to an article in APC. Here's a little background...
Scientific Linux 6.1 + all updates, Crucial m4 64GB SSD.
You might notice this thread being on the APC forum. That's because I'm asking on behalf of that user I know irl.
From the magazine I'm reading (APC Feb 2012; Linux Mint 12):
So where would I put it on my etc/fstab? Do I just copy and paste it somewhere??
If there is a more elegant way of no having tmp/swap requires a re-installation/repartition manually to regain disk space, I'm really not that worried. Thanks all.
Well...
I want to enable TRIM, disable swap/tmp if possible and optimise my SSD for Linux according to an article in APC. Here's a little background...
Scientific Linux 6.1 + all updates, Crucial m4 64GB SSD.
You might notice this thread being on the APC forum. That's because I'm asking on behalf of that user I know irl.
Code:
[strayfire@Katyr ~]$ su
Password:
[root@Katyr strayfire]# fdisk -l
Disk /dev/sda: 64.0 GB, 64022175232 bytes
255 heads, 63 sectors/track, 7783 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4fa3da4e
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 7784 62008320 8e Linux LVM
Disk /dev/mapper/vg_katyr-lv_root: 30.3 GB, 30270291968 bytes
255 heads, 63 sectors/track, 3680 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_katyr-lv_root doesn't contain a valid partition table
Disk /dev/mapper/vg_katyr-lv_swap: 10.1 GB, 10133438464 bytes
255 heads, 63 sectors/track, 1231 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_katyr-lv_swap doesn't contain a valid partition table
Disk /dev/mapper/vg_katyr-lv_home: 23.1 GB, 23089643520 bytes
255 heads, 63 sectors/track, 2807 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_katyr-lv_home doesn't contain a valid partition table
[root@Katyr strayfire]#
From the magazine I'm reading (APC Feb 2012; Linux Mint 12):
No distributions enable it (TRIM) by default, but it's simple to do by adding the 'discard' flag to any mounted SSDs. To make these changes, open up terminal and run:
sudo nano -w /etc/fstab
Then for all SSD devices remove 'relatime' if present and add 'noatime, nodiratime,discard' so it looks something like:
dev/sda / ext4
noatime, nodiratime,discard,errors=remount-ro 0 1
So where would I put it on my etc/fstab? Do I just copy and paste it somewhere??
Code:
# /etc/fstab
# Created by anaconda on Fri Feb 3 04:43:17 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_katyr-lv_root / ext4 defaults 1 1
UUID=44b1e55b-616c-454e-82f7-6d3e2b82399f /boot ext4 defaults 1 2
/dev/mapper/vg_katyr-lv_home /home ext4 defaults 1 2
/dev/mapper/vg_katyr-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
If there is a more elegant way of no having tmp/swap requires a re-installation/repartition manually to regain disk space, I'm really not that worried. Thanks all.