Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So my system has a 60GB Mushkin SSD, and a 1TB Seagate HDD. Both of them use SATAIII. I'm going to be using a fresh install of Xubuntu (from Windows), though I haven't ever manually set the partitioning scheme.

Would there be a way to only move directories like /home, /tmp, and maybe /usr to the HDD, while letting the installer figure out however much space it wants to allocate to the SSD's partitions?

Or would it be alright to leave the whole OS on the SSD, with the HDD being used as this /data directory where I keep all my music, downloads, etc?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The way I would be inclined to do this is to let the install to put the entire system on the SSD, and mount the hdd (for example as /data), then move the directories you wish to reside on the SSD into /data and symlink them. Are you sure you want to move /tmp and /usr though ? It would strike me as kind of defeating the purpose of having an SSD in the first place.

To move a file and create a symlink is easy -

cd /
mv /dirname /data/dirname
(wait while it moves, because its actually doing a copy + delete)
ln -s /data/dirname /dirname

I'd suggest against moving /tmp because its a temporary location and deleted every time the server is restarted, ie access to it should be fast, because its stuff you know the program expects to use.

Similarly, a lot of the tools you will use (but not mv or ln) are under /usr, so why would you want to make them slow ?

share|improve this answer
    
I was thinking of those directories because I read some stuff on excess writing to the SSD to wear out its lifetime. People also said that it's not an issue with modern SSD's, but I'd consider mine 'kinda modern, but cheap'. Anyway, I let the installer partition it for me, but I realize that's not what you meant at all. Installed it again, manually partitioning, then I used the commands you posted. Works perfectly. I've only moved /home so far. And thank you both for the help! Are there any other directories I should consider moving? –  Wog Mar 24 '13 at 19:56
    
It really depends on what you are trying to do, but I'd probably move /var/log if I were pushed for space, but nothing if I had the space to burn. One thing to bear in mind - when hard drives fail they normally give some notice or initial signs of failure. For SDD failures are usually catastrophic (ie no warning, no recovery practically possible), so make sure you have a good backup plan for important data - especially on your SSD. –  davidgo Mar 24 '13 at 20:07

I was in a similar situation and I couldn't find a way to move certain directories onto the HDD when installing Ubuntu unless I created separate partitions. However, I wasn't keen on breaking up my HDD into individual partitions.

So I installed Ubuntu entirely on the SSD first. Then, I used a liveCD environment and manually moved the /usr, /tmp, /var and /home directory onto the hard disk drive from the SSD. Once I did that, I edited the /etc/fstab file on the SSD to mount the hard disk at a particular location. Then, I created symlinks on the SSD for /usr, /tmp, /var and /home to point to the 'moved' locations of these directories on the hard disk drive.

So, as an example, my fstab on the SSD says "mount the hard disk in the directory /HDD". The /home directory on the SSD is then a symlink to /HDD/home, the /usr directory is a symlink to /HDD/usr etc.

If this is clear but you need more instructions, I can provide them here

share|improve this answer
    
Well, spoke too late. I was suggesting the same thing as the previous user, only difference being I did the 'mv' command on a Live CD environment. –  Hari Sundararajan Mar 24 '13 at 6:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.