Since I don't use my laptop's CD-drive I want to put a small (8 GB) SSD into the CD-drive slot (I'll use a caddy similar to this one). I want to use compressed btrfs on the SSD and put all the data on the big HDD. I want to avoid unnecessary spin-ups. I want the system to be fast... I want to minimize wearing of the SSD.
How should I layout the mount points of my file-system? How can I prevent the HDD to spin up at the same time?
It's really up to you. You can do almost anything.
I have (to show off):
/media/ned
)/media/jeff
)Popular mounting convention would have me store the entire
/home/
onned
... 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/
onjeff
.mdadm
's RAID1 is considerably faster than its RAID5 but tons slower than my SSD. When half ofjeff
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 canmount bind
them in yourfstab
but I've just gone with SymLinks. Move the directory and run something like: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.