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
/home/
has its own partition). – A.L May 25 '14 at 15:55