It's really up to you. You can do almost anything.
I have (to show off):
- 1x RAID0 PCI-E SSD (OCZ Revo 120gig) that runs at 540MB/s as the primary disk
- 4x 1.5TB disks in RAID5 as the "data" disk (called
/media/ned
)
- 2x 1.5TB disks in RAID1 (currently degraded - called
/media/jeff
)
Popular mounting convention would have me store the entire /home/
on ned
... But this would slow down a lot of applications that use things in ~
to run (eg Firefox has a SQLite database that works best on a fast disk).
Per that convention, I used to keep the entire /home/
on jeff
. mdadm
's RAID1 is considerably faster than its RAID5 but tons slower than my SSD. When half of jeff
died, I decided I wanted more speed.
So now I just keep a directory on ned
for things I really don't want on the SSD. This includes my ~/Music
~/Documents
, etc. You can mount bind
them in your fstab
but I've just gone with SymLinks. Move the directory and run something like:
ln -s /media/ned/.fakehome/Music ~/Music
Rinse and repeat.
I my case, it's really a case of how much I can stand to lose if the worst happens. I have some security with RAID5 so anything not on it (especially the RAID0 SSD) is much more liable to die if a squirrel farts in its direction.
As you've only got a relatively tiny SSD and only one data disk, the metrics and causalities are slightly different. Each method is equally unsafe and you're limited by space. You might do best to mount all of home on the data disk and do the reverse of what I'm doing. Create a directory on the SSD for the things you want to be fast and SymLink them back out onto the data partition.
You can use fstab-mount commands but I just find SymLinks easier to maintain. I'm not sure what the performance overhead differences are like but I'm fairly sure I've asked somewhere.
The following uses the kernel's virtual memory block dump mechanism. First get the perl script:
wget https://raw.githubusercontent.com/true/aspersa-mirror/master/iodump
Then turn on block dump:
echo 1 | sudo tee /proc/sys/vm/block_dump
And run the following:
while true; do sleep 1; sudo dmesg -c; done | perl iodump
..and press Controlc to finish, you will see something like the following:
^C# Caught SIGINT.
TASK PID TOTAL READ WRITE DIRTY DEVICES
jbd2/sda3-8 620 40 0 40 0 sda3
jbd2/sda1-8 323 21 0 21 0 sda1
#1 4746 11 0 11 0 sda3
flush-8:0 2759 7 0 7 0 sda1, sda3
command-not-fou 9703 4 4 0 0 sda1
mpegaudioparse8 8167 2 2 0 0 sda3
bash 9704 1 1 0 0 sda1
bash 9489 1 0 1 0 sda3
mount.ecryptfs_ 9698 1 1 0 0 sda1
And turn off block dump when you are finished:
echo 0 | sudo tee /proc/sys/vm/block_dump
Thanks to http://www.xaprb.com/blog/2009/08/23/how-to-find-per-process-io-statistics-on-linux/ for this helpful info.
Best Answer
I think your plan is OK but while you are at it, why don't you put the /var on a Logical Volume too instead of a separate partiton on your new drive? I find lvm a lot more flexible than regular partitions. My main machine is all using lvm, including
/
without any problem and very quick to resize/reconfigure Logical Volumes.To use your current HD with lvm, you'll need to empty and format it. One way to do that is to put the new drive as a device in the Volume Group, move your current home to it, format the current HD and add it to the VG.