LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 11-11-2015, 11:12 PM   #1
slayme40
LQ Newbie
 
Registered: Oct 2015
Posts: 16

Rep: Reputation: Disabled
Question Home mount point


Hi I'm running a dual boot with opensuse 13.2 and windoze 10. I am running out of space on my home mount point. If I install a second hard drive and add a second home mount point on my new hard disk will I be able to have some of my files on one home mount point (sda7) and other data on the other home mount point (sdb something).
 
Old 11-12-2015, 01:04 AM   #2
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Yes.
 
Old 11-12-2015, 01:20 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Note that sda7 and sdb-something aren't mount points. The directories where they are mounted, be it /home or /home2, are named mount points.

More precisely, in this command
Code:
mount /dev/sdb1 /home2
/home2 is the mount point.

Somebody else had a similar question ten years ago. I don't know if better tools exist today that allow you to combine two mounts easily.

Edit: UnionFS may well be your solution.

Last edited by berndbausch; 11-12-2015 at 01:30 AM.
 
Old 11-12-2015, 01:35 AM   #4
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Just mount the new drive somewhere and symlink or bind mount your Pics or Pron dirs from your home onto it.
 
Old 11-12-2015, 01:59 AM   #5
slayme40
LQ Newbie
 
Registered: Oct 2015
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by descendant_command View Post
Just mount the new drive somewhere and symlink or bind mount your Pics or Pron dirs from your home onto it.
And how do I do that may I ask
 
Old 11-12-2015, 02:07 AM   #6
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
https://duckduckgo.com/?q=mount
https://duckduckgo.com/?q=symlink
https://duckduckgo.com/?q=bind+mount
 
Old 11-12-2015, 02:48 AM   #7
slayme40
LQ Newbie
 
Registered: Oct 2015
Posts: 16

Original Poster
Rep: Reputation: Disabled
This is so confusing. Is it possible to just mount my new hard drive as home2 and just keep what's on the original home on home and just add put all my new files on home2?
That is just type mount /dev/sdb1 /home2 and use home2 from now on.
 
Old 11-12-2015, 03:18 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,840

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
you cannot mount 2 different harddisk partitions onto the same mount point. That is simply not possible. You can have only one home dir. And you need to find out what do you want to do with the other directory.
 
1 members found this post helpful.
Old 11-12-2015, 03:18 AM   #9
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by slayme40 View Post
This is so confusing. Is it possible to just mount my new hard drive as home2 and just keep what's on the original home on home and just add put all my new files on home2?
That is just type mount /dev/sdb1 /home2 and use home2 from now on.
Calling it home2 will just confuse you further - so give it a meaningful name like 'data', and (as root) make a mountpoint for it (just an ordinary directory) at /mnt/data (or such) and set the ownership of that dir to your user.
Then mount the new drive on it, make some dirs to hold your data and create symlinks to them in your existing /home/user/ dir.

edit: another simpler way would be to just mount it directly into, say, /home/user/data - then no symlinks would be needed.

Last edited by descendant_command; 11-12-2015 at 03:21 AM.
 
1 members found this post helpful.
Old 11-12-2015, 03:34 AM   #10
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I think the OP wants to copy the old home to the new disk, then mount the new disk under /home. If so, this is not only possible, but also rather simple.
  • mount /dev/sdb1 /mnt/newhome
  • cd /home
  • find . | cpio -pdumva /mnt/newhome
  • umount /mnt/newhome
  • put sdb1 in fstab
  • mount -a

I don't know enough about the current configuration to suggest what to do with the old home.
 
Old 11-12-2015, 05:02 AM   #11
slayme40
LQ Newbie
 
Registered: Oct 2015
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by descendant_command View Post
another simpler way would be to just mount it directly into, say, /home/user/data - then no symlinks would be needed.
So do I just type mount /dev/mnt/hdb1 home/user/data and I will have the entire 500gb 2nd hard drive for the home/user/data mount point as well as all the data in the original /home mount point? Do I have to put anything in fstab?

Last edited by slayme40; 11-12-2015 at 05:04 AM. Reason: forgot the add 2nd ?
 
Old 11-12-2015, 05:13 AM   #12
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by slayme40 View Post
So do I just type mount /dev/mnt/hdb1 home/user/data and I will have the entire 500gb 2nd hard drive for the home/user/data mount point as well as all the data in the original /home mount point? Do I have to put anything in fstab?
Code:
mount /dev/hdb1 /home/user/data
But earlier you said your device was named /dev/sdb1, which is much more likely, since "hdb1" refers to IDE drives that have been phased out for years.

If you want the new disk to be mounted each time you reboot, yes, you have to put something in /etc/fstab. I would copy an existing line in /etc/fstab and modify it so that it matches the new disk and the new mount point.
 
1 members found this post helpful.
Old 11-12-2015, 05:14 AM   #13
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Just wondering: Did you create a filesystem on the new disk? If not:
Code:
mkfs -t ext4 /dev/sdbwhatever
will create an EXT4 filesystem, which is the most popular type these days.
 
1 members found this post helpful.
Old 11-12-2015, 05:15 AM   #14
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Basically, although you have to create the dir first (as yourself) so it has somewhere to mount to.
(you prob meant sdb1, not hdb1 - that's the old school naming convention).
Obviously you have to issue the mnt cmd as root, then check you can access it ok as the normal user before you add it to /etc/fstab.
 
1 members found this post helpful.
Old 11-12-2015, 05:19 AM   #15
slayme40
LQ Newbie
 
Registered: Oct 2015
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Just wondering: Did you create a filesystem on the new disk? If not:
Code:
mkfs -t ext4 /dev/sdbwhatever
will create an EXT4 filesystem, which is the most popular type these days.
Obviously you need to create a filesystem 1st, same with any o/s
 
  


Reply



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
how do I get a mount point into my /home and file manager ? BW-userx Linux - Hardware 4 06-05-2015 09:24 PM
[SOLVED] How do I add to my main / mount point from my /home? wcrandthor Linux - Newbie 3 09-19-2012 11:52 AM
mount error: mount point /home/me/x does not exist whil Fedora 3 05-24-2006 10:39 AM
FreeBSD /home mount point question Ahmed *BSD 5 11-07-2005 08:58 PM
Same /home mount point for two distros? jaristr Linux - General 4 08-18-2005 11:27 AM

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

All times are GMT -5. The time now is 05:04 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
Open Source Consulting | Domain Registration