Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 17061  / 1 Year ago, thu, may 11, 2023, 8:06:17

My current system is laid out across two drives:




  1. 40GB for / and /swap (dev/sdb)

  2. 1TB for /home (dev/sdc)



As my /home drive is running out of space, and storage is cheap, I've bought a 2TB drive with the intent of expanding /home across that drive too (so /home is spread over two drives/3TB).



I expected this to happen automagically (though I have no idea why I would expect that, really), the drive is installed (dev/sda), formatted as ext4, but I've no idea where to go next. Is this easy, is there a tool that can do this?



I've read the following questions:





But I can't piece together the advice in such a way that it makes sense to me, or how it enables:




  • Expansion of /home,

  • Auto-mounts the new drive.



I've been using Ubuntu for almost three years, and I still need schoolin'...sigh.


More From » 11.04

 Answers
7

As mentioned in my comment, creating a symlink is probably the easiest way of accomplishing your goal. There is one downside to going this route and I'll explain it at the end.



Here's what you need to do:




  1. Find the mount point of your new 2TB drive. If the drive is currently mounted, you can easily find this information by running the mount command - which will list all currently mounted drives / partitions.

  2. Once you have the mount point, you can create a symlink to that folder in your home directory by running the following command:



    ln -s [MOUNT POINT]  ~/secondary


    This will create a folder in your /home directory named secondary that contains all of the contents of your 2TB drive. Now whenever you want to save something to your 2TB drive, simply save it in the secondary folder.




Now you've probably already spotted the downside to going this method. Although it is simple to set up, it doesn't automatically split content across the drive for you. You'll have to do this yourself. If you wanted to, you could copy all of the contents of a folder in your home directory (like Music or Desktop) to your 2TB drive and then replace 'secondary' with the name of that folder in the command above.


[#44283] Friday, May 12, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
arsleyeuth

Total Points: 72
Total Questions: 121
Total Answers: 112

Location: North Korea
Member since Mon, Oct 31, 2022
2 Years ago
;