/ on SSD, should I put /var on a HDD?
That's a bad idea. If you put the installed applications on the SSD you'll get a more stable operating system and better performance. You've got a 120GB SSD, so you should not hesitate to use it for your installed applications.
Your 750GB hard drive is certainly not there for nothing. Here is my suggestion for how to use the 750GB hard drive optimally. Install Ubuntu on your SSD, including your /home
directory, everything goes on your SSD. Then use your 750GB hard drive as a data drive to store your personal files. No matter what happens to your operating system, your personal files will be protected and accessible on the 750GB hard drive. Even if your operating system becomes completely unusable or if you do a fresh install of Ubuntu, all of your personal files will still be there intact on the 750GB hard drive.
You don't need to worry about your 120GB SSD being too small. A 120GB SSD has more than enough space to install Ubuntu in this way. In fact even a 60GB partition has more than enough space for Ubuntu and a lot of installed applications.
On my Ubuntu there are a few files that I use regularly. In order to improve performance and open these files fast, I keep these files on my SSD too in my /home
directory. I don't have many of these files, so my /home
directory is quite small.
Ok, first, the answers I have seen do not address the 2 most important issues.
First, although I applaud your diving in and trying something, the reason you have run into problems is due to an incomplete understanding of the linux directory structure. Please confirm what follows before blindly following my advice as I am not a regular user of the *buntu flavors of linux, but...
Applications are not (in my experience) generally found in /var, (there are exceptions), most applications are found below the /usr directory, /var is (in ubuntu) used for server related files, logs and caches. also things which would be lost on reboot if stored in /tmp.
There is a tradeoff to be made. /var on a fast drive (such as an ssd) will improve system performance, but due to specifics of ssd drives, may reduce (somewhat) the life of the drive due to more frequent writes.
Nutshell, faster performance, /var on ssd, longer drive life, /var on your 750GB drive.
For reference, all of my system files (openSUSE 13.1) and the whole system directory structure (including /var) exist on a single 64GB ssd.
Karel's information about your data is a little misleading (I believe), in that your data and /home directory are closely tied. My suggestion, mount /home on a partition on the 750GB Drive. This will simplify file management in the long run.
My data and website are the only things not on the ssd, my data (/home, /srv/http are kept on separate drives to ease upgrades or moving to other distributions. (I have files in my /home directory that were created in 1998)
I will answer how to move /var in a post that follows
Me again, BTW I do agree w/ Karel that doing your base install to the ssd is the best option. I also recommend reading a few other tutorials before following my directions.
NOTE: it is much easier to configure your system during a fresh install,
Now if you do wish to create a new mount point for /var there are numerous things to consider.
Some directories will be harder to move because files may be in use, /var is one of these problem children. Anytime your system is active it is likely that data is being written to /var
Another consideration is maintaining the correct file attributes, copy will not do this without the proper flags.
these links could help get you started,
http://lists.opensuse.org/opensuse/2001-11/msg01343.html
http://dev.digi-corp.com/2009/09/moving-opt-data-to-new-partition-in-linux-due-to-low-disk-space
NOTE: I prefer using tar over cp, it is faster and I know it will preserve my file attributes, something like the following (a quick example, some steps have been left out for simplicity)
DO NOT FOLLOW THESE DIRECTIONS WITHOUT UNDERSTANDING WHAT IS BEING DONE
- Boot from live USB.
- Use fdisk and mkfs, to create and format a new partition on your 750GB drive, 50GB should be plenty.
- Mount the new directory.
Like this
mkdir /mnt/var2
mount -a /dev/sdxx /mnt/var2
(replace sdxx with the 50 GB partition you created for your new /var, for example /dev/sdb1)
mount your ssd as /mnt/oldroot
mkdir /mnt/oldroot
mount -a /dev/sdxx /mnt/oldroot
(here /dev/sdxx is the / partition on your ssd, probably /dev/sda1 or similar) You should be able to navigate your old filesystem now, starting at /mnt/oldroot
now you will copy the files from the old /var directory to the new one
cd /mnt/oldroot/var
tar cSpf - . | (cd /mnt/var2 ; tar xvSpf - )
when the copying finishes, compare the 2 directories, if everything looks good rename the old /var directory
mv /mnt/oldroot/var /mnt/oldroot/var.0ld
mkdir /mnt/oldroot/var
All that is left is to edit /mnt/oldroot/etc/fstab to add the new partition as the mountpoint for /var (I will leave this to your imagination)
then
umount /mnt/var2
umount /mnt/oldroot
reboot
If all went well, when you reboot the new partition should be mounted as /var