Page 1 of 1

SSD + HDD mounting problems

Posted: Fri Dec 28, 2012 7:35 pm
by Therion87
Anyone know how to remount /var from an SSD to an HDD - /var is mount in as part of / on the SSD and /home is the HDD they were mounted that way by my during installation.

My current fstab:

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sdb1 during installation
UUID=4f8e9ce2-4096-4dba-b7f9-61e91c641b9a /               ext4    errors=remount-ro,noatime,discard 0       1
# /home was on /dev/sda1 during installation
UUID=3ff367de-ba7d-4f46-9aa8-0b69997da624 /home           ext4    defaults        0       2
# swap was on /dev/sdb5 during installation
UUID=b01e9f24-5b6a-4402-b4b5-8fa229aa8ac7 none            swap    sw              0       0
# store tmp files in memory instead of SSD
none /tmp	tmpfs	nodev,nosuid,mode=1777	0	0

Re: SSD + HDD mounting problems

Posted: Tue Jan 15, 2013 2:31 pm
by Therion87
Any ideas?

Re: SSD + HDD mounting problems

Posted: Wed Jan 16, 2013 7:55 pm
by passerby
-Boot through a live CD/DVD/USB
-Copy the contents of /var onto the new partition (separate from /home. eg. if /home is /dev/sda1, move it to /dev/sda2)
If you're unsure how, follow a tutorial for moving the home partition and just substitute home for var.
eg. http://blogs.pcworld.co.nz/pcworld/tux- ... _home.html
-Edit fstab to reflect the new /var
-reboot

eg.
Since /home was /dev/sda1, if you partitioned that disk so you have space for /var, it would end up as /dev/sda2.

Code: Select all

sudo mount -o rw -t ext4 /dev/sda2 /mnt
sudo cp /var /mnt
sudo pluma /etc/fstab
A simple cp command might not be enough. Refer to a tutorial on moving /home to be safe.
Add to fstab something like:

Code: Select all

/dev/sda2 /var           ext4    defaults        0       2
assuming it's been formatted as ext4. You can also use the UUID if you wish instead of /dev/sda2.
After that, reboot. If everything went well /var will be mounted on your HDD and you can delete /var on your SSD.
If not, boot through the live CD/DVD/USB again and comment out or delete the newly added line in fstab. Definitely refrain from deleting /var from your SSD until you've booted properly with the new config.

Re: SSD + HDD mounting problems

Posted: Thu Jan 17, 2013 8:13 am
by Therion87
Ok, thanks. that's where I was messing up I wasn't creating a second partion on the home drive. I need to resize.