SSD + HDD mounting problems

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Therion87

SSD + HDD mounting problems

Post 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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Therion87

Re: SSD + HDD mounting problems

Post by Therion87 »

Any ideas?
passerby

Re: SSD + HDD mounting problems

Post 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.
Therion87

Re: SSD + HDD mounting problems

Post 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.
Locked

Return to “Beginner Questions”