LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-20-2017, 06:07 PM   #1
MusicalCoder
LQ Newbie
 
Registered: Jan 2017
Posts: 3

Rep: Reputation: Disabled
Thumbs up Attaching an additional hard drive to /home


Hello All, and here is my situation!

I have a fresh install of Ubuntu Mate on a new computer. The computer came with a single 1TB hard drive, but I added 2 240GB SSDs.

I have it set up that 1 SSD is root (/) and the other is home (/home).

Now what I'd like to do is attach the 1TB drive (which is currently unmounted) to be able to be part of home. I would like to move Downloads and Pictures and Videos to the 1TB drive, and keep Documents and dot (.) and Desktop on the SSD.

How would I go about doing this?

Last edited by MusicalCoder; 03-20-2017 at 08:28 PM. Reason: Marking it Solved
 
Old 03-20-2017, 06:41 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: pclinuxos
Posts: 3,410
Blog Entries: 33

Rep: Reputation: 222Reputation: 222Reputation: 222
I do this too, and have done for a long time now.

to make "Downloads and Pictures and Videos" appear as
natural you would need to create partitions for each of them.

What I do is list the partitions in fstab under the folder /home/glenn/local
Mine are just file archives.

I needed to create that folder first as a user, glenn:glenn in my case.

Just do it as a user, not root.

This does not work too well if you remove the drive and try to boot,
it will likely stall if you don't comment out the lines in /etc/fstab.

/etc/fstab
Code:
# Entry for /dev/sda6 :
UUID=38d0dacd-7aa5-47e0-9909-ae2737fa65c6 / ext4 defaults 1 1
# Entry for /dev/sdb1 :
UUID=5700c7a2-2f60-4dcd-9832-b09bfb447fe5 /home ext4 defaults 1 2
# Entry for /dev/sdd1 :
UUID=4a78a18b-27f1-41a5-9911-761d0ecb3489 /home/glenn/local/archive ext4 defaults 1 2
# Entry for /dev/sdc4 :
UUID=1e503f23-697d-4340-8de6-d6a3ee4a6792 /home/glenn/local/media ext4 defaults 1 2
# Entry for /dev/sdc1 :
UUID=255c2d5e-4be3-4e09-a27c-cce5a95d3e60 /home/glenn/local/stuff ext4 defaults 1 2
.....
snipped
.....
there might be another way to do this.

any questions, please ask.

Last edited by GlennsPref; 03-20-2017 at 06:42 PM. Reason: spelling
 
Old 03-20-2017, 08:24 PM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
Another approach you could consider is to mount the HDD at some point in the filesystem (say /media/hdd), then create the Downloads, Pictures and Videos directories in your home directory as symbolic links to similarly named directories on the mounted HDD.

Something along the lines of (delete ~/Videos first): ln -s /media/hdd/Videos ~/Videos

Note that the ~ acts as shortcut to entering the full path to the current user's home directory.
 
Old 03-20-2017, 08:36 PM   #4
MusicalCoder
LQ Newbie
 
Registered: Jan 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
I've marked this solved, and thank you to hydruuga for most of the inspiration on this...

After further research, here is what I did...
1) The drive was already formated in XFS - did that in the install - it just wasn't mounted.
2) Used lsblk to show that the drive was unmounted and in /dev/sdc1
3) Used blkid (as sudo) to get the UUID for sdc1
4) Edited /etc/fstab with vim and added UUID={the uuid} /mnt xfs defaults 0 1
5) rebooted
6) verified with lsblk that sdc1 was now mounted to /mnt
7) used chmod 777 /mnt so that I could read, write and execute everything in /mnt
8) since this was a clean install - all my 'concerned' folders were empty so in /mnt I used mkdir to add Downloads, Videos, Music and Work (I personally use Work - not a defaulted folder)
9) then under /home/me, I rmdir those same folders
10) then ran hydrurga's ln -s command for each folder in question!

Thank you very much for your help in solving this!

Last edited by MusicalCoder; 03-20-2017 at 08:37 PM. Reason: bolded commands
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian not booting after additional hard drive is added SonicEarth Linux - Server 1 08-22-2009 01:05 PM
Additional hard drive only usable by root. zero-x Linux - General 4 04-14-2008 04:13 PM
Attaching Xbox Hard drive to Mandriva. cjdw Mandriva 5 06-27-2005 07:24 AM
Install Additional Hard Drive in Fedora lennysokol Linux - Hardware 4 03-10-2005 04:44 PM
How to see additional hard drive under Mandrake ncabell Linux - Newbie 3 11-05-2003 11:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration