Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
01-29-2014, 12:42 PM
|
#1
|
Senior Member
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223
Rep:
|
Can you mount two partitions on the same mount point?
I have two different partitions on two different hard disks. Is it posible to mount both as /home at the same time?
|
|
|
01-29-2014, 12:48 PM
|
#2
|
Senior Member
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604
|
The short answer, yes and no.
In a mount scenario only one partition can use a mount point. However, there are things in the Linux world that allow us to setup multiple partitions as a logical volume and then mount that logical volume to a mount point.
NOTE: This requires a re-partition to mark the partitions as an LVM.
http://www.howtoforge.com/linux_lvm
Let us know if you have any questions.
|
|
1 members found this post helpful.
|
01-29-2014, 02:57 PM
|
#3
|
Member
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95
Rep:
|
Yes. No idea if Slackware includes it (it ought to, considering it's included with all reasonably-modern kernels).
|
|
|
01-29-2014, 03:59 PM
|
#4
|
Senior Member
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604
|
Quote:
Originally Posted by YellowApple
Yes. No idea if Slackware includes it (it ought to, considering it's included with all reasonably-modern kernels).
|
You should really explain this, this is a special type of filesystem that is not commonly used. LVM + ext3 filesystems are much more standardized.
I personally would never use unionfs but there are people out there who do. I highly encourage you to search around on this topic before you implement to make sure you know what you are getting into.
|
|
|
01-29-2014, 06:44 PM
|
#5
|
Member
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95
Rep:
|
Quote:
Originally Posted by Kustom42
You should really explain this, this is a special type of filesystem that is not commonly used. LVM + ext3 filesystems are much more standardized.
|
I'd argue that the concept of union mounts is very much standardized, and both UnionFS (which I linked) and aufs are already in very common use (particularly in live-CD environments).
|
|
|
01-29-2014, 06:56 PM
|
#6
|
Member
Registered: May 2008
Location: Republic of Texas
Posts: 393
Rep:
|
Ok - I know where you are heading - but ... traditionally the answer is a resounding 'yes'! However, you will only be able to see the last one :-(
|
|
|
01-29-2014, 09:23 PM
|
#7
|
Moderator
Registered: Mar 2008
Posts: 22,242
|
Not to get into a debate here.
Kustom42's first answer is really the correct answer to the question based on the word "mount" and no other inference. One might read the question as possible to exclude the "at the same time" assumption. One could mount two partitions to the same mount point at different times.
We can all agree that lvm, btrfs, zfs and other schemes like unionfs and aufs is a way to do what the OP may have had in mind.
|
|
|
01-29-2014, 10:02 PM
|
#8
|
Senior Member
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,804
|
Quote:
Originally Posted by perbh
Ok - I know where you are heading - but ... traditionally the answer is a resounding 'yes'! However, you will only be able to see the last one :-(
|
To be totally pedantic about it, they aren't actually mounted to the same point. You can mount the first one to, for example, /mnt/tmp (presumably part of the root filesystem). When you do the second mount, /mnt/tmp is now referring to the root inode of that first-mounted filesystem, and not to a directory on the root filesystem. You can see the effect of that if you try to umount that first filesystem by specifying the device:
Code:
# mount -r /dev/sdd1 /mnt/tmp
# mount -r /dev/sdd2 /mnt/tmp
# umount /dev/sdd1
umount: cannot umount /dev/sdd1 -- /dev/sdd2 is mounted over it on the same point.
|
|
|
01-29-2014, 10:19 PM
|
#9
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
|
Quote:
Originally Posted by YellowApple
I'd argue that the concept of union mounts is very much standardized, and both UnionFS (which I linked) and aufs are already in very common use (particularly in live-CD environments).
|
I'd argue that you should ask the OP's intent for mounting the two partitions on the same mount point prior to offering advice on how to do it.
|
|
|
01-30-2014, 01:09 PM
|
#10
|
Member
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95
Rep:
|
Quote:
Originally Posted by Richard Cranium
I'd argue that you should ask the OP's intent for mounting the two partitions on the same mount point prior to offering advice on how to do it.
|
OP asked for a way to mount two partitions to the same mount point at the same time. I provided links to documentation of the kernel's ability to do precisely that without needing to take "intent" into account, given that the provided use case - having one mountpoint point to multiple locations simultaneously - is precisely what said kernel functionality was designed to handle.
Quote:
Originally Posted by jefro
Not to get into a debate here.
Kustom42's first answer is really the correct answer to the question based on the word "mount" and no other inference. One might read the question as possible to exclude the "at the same time" assumption. One could mount two partitions to the same mount point at different times.
We can all agree that lvm, btrfs, zfs and other schemes like unionfs and aufs is a way to do what the OP may have had in mind.
|
I didn't mean to start a debate; apparently the concept of union mounts, despite having been around for at least two decades, is taboo around these parts...
|
|
|
01-30-2014, 01:58 PM
|
#11
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
|
Quote:
Originally Posted by YellowApple
OP asked for a way to mount two partitions to the same mount point at the same time. I provided links to documentation of the kernel's ability to do precisely that without needing to take "intent" into account, given that the provided use case - having one mountpoint point to multiple locations simultaneously - is precisely what said kernel functionality was designed to handle.
I didn't mean to start a debate; apparently the concept of union mounts, despite having been around for at least two decades, is taboo around these parts...
|
There are use cases where LVM is superior to union mounts. Since I can't read minds as well you think you can, I would have had to ask the OP to determine what solution would best support his intent.
|
|
|
01-30-2014, 02:04 PM
|
#12
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
|
Quote:
Originally Posted by moisespedro
I have two different partitions on two different hard disks. Is it posible to mount both as /home at the same time?
|
Since everyone else is busy showing how smart they are, I guess that I'll ask.
Why do you want to do this? Is there content on both partitions that you want to merge? Do you want to use both drives to store your stuff?
|
|
1 members found this post helpful.
|
01-30-2014, 03:40 PM
|
#13
|
Member
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95
Rep:
|
Quote:
Originally Posted by Richard Cranium
There are use cases where LVM is superior to union mounts. Since I can't read minds as well you think you can, I would have had to ask the OP to determine what solution would best support his intent.
|
I'm not denying that LVM has its merits, nor am I claiming to be a psychic. I merely put forward the tool specifically designed to do what OP asked for: the ability to have one mountpoint for multiple partitions.
If you're going to nag me for providing a quick and immediate answer instead of seeking additional clarification from OP, at least be consistent and do the same to Kustom42, who is equally guilty of making assumptions by your rationale.
|
|
|
02-05-2014, 06:05 PM
|
#14
|
Senior Member
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604
|
Quote:
Originally Posted by YellowApple
I'm not denying that LVM has its merits, nor am I claiming to be a psychic. I merely put forward the tool specifically designed to do what OP asked for: the ability to have one mountpoint for multiple partitions.
If you're going to nag me for providing a quick and immediate answer instead of seeking additional clarification from OP, at least be consistent and do the same to Kustom42, who is equally guilty of making assumptions by your rationale.
|
I am not guilty of making assumptions, I provided an option and told you to elaborate more on what is being asked. I actually talked about what LVM was in my post and this continuance of flaming each other on the boards needs to cease right now. Everyone here is trying to show how big their e-peen is and its ricidulous we are here to help the OP focus on that.
And yes you do need to provide details in your response not just I'm smart and know what I'm doing and use this. I explained possible impilications and provided a link to a tutorial with examples.
You posted a link to a FOSS project that is used on less distros than I can count on both hands out of the box. Explain this to the OP and say here is an option, its used on these and heres its benefits. Let them figure out if its right for them or not.
Feel free to disagree with any of the above with exception of ceasing the flaming, we are violating the forum rules here and need to focus on working together to build a strong community and keep people coming back. Remember we are all here because we <3 Linux
|
|
|
02-05-2014, 08:49 PM
|
#15
|
Member
Registered: Mar 2013
Location: Reno, Nevada, United States
Distribution: Slackware, OpenBSD, openSUSE, Android
Posts: 95
Rep:
|
Quote:
Originally Posted by Kustom42
I am not guilty of making assumptions, I provided an option and told you to elaborate more on what is being asked. I actually talked about what LVM was in my post and this continuance of flaming each other on the boards needs to cease right now. Everyone here is trying to show how big their e-peen is and its ricidulous we are here to help the OP focus on that.
|
Pardon me? I'm not flaming, and I'm not waving an e-peen. I merely put forward a suggestion; OP can take it or leave it.
Quote:
Originally Posted by Kustom42
And yes you do need to provide details in your response not just I'm smart and know what I'm doing and use this.
|
Again: pardon? I never stated anything along those lines, nor intended to imply it.
Quote:
Originally Posted by Kustom42
I explained possible impilications and provided a link to a tutorial with examples.
You posted a link to a FOSS project that is used on less distros than I can count on both hands out of the box.
|
Union mounts are very common in LiveCD/DVD/USB environments, and UnionFS and aufs are the two most prevalent in-kernel implementations of the concept for Linux.
Quote:
Originally Posted by Kustom42
Explain this to the OP and say here is an option, its used on these and heres its benefits. Let them figure out if its right for them or not.
|
Very well.
A union mount allows multiple filesystems to be mounted simultaneously; the end result looks like a single filesystem, with a single mountpoint. This concept is commonly used in Unix-like operating systems; Plan 9 - Bell Labs' successor to Unix - makes extensive use of such filesystem combination, and is an awesome example of union mounts done right. There are multiple methods of implementing union mounts in Linux, two of them being UnionFS and aufs.
In the case of UnionFS, then - so long as your kernel supports it - you can easily make two filesystems accessible with one mountpoint:
Code:
mount -t unionfs -o dirs=/mnt/user-partition-1:/mnt/user-partition-2 none /home
For aufs:
Code:
mount -t aufs -o br=/mnt/user-partition-1:/mnt/user-partition-2 none /home
Both of the above assume that you've already established mountpoints for your two partitions that need to be mounted as /home.
There's also unionfs-fuse if your kernel doesn't include UnionFS or aufs and you don't feel like compiling kernel modules. That tool is also quite simple:
Code:
unionfs-fuse /mnt/user-partition-1:/mnt/user-partition-2 /home
I'm not sure about the availability of any of these in Slackware, though I do know that Slax (which is based on Slackware) previously used UnionFS and now uses aufs as of version 6. Debian has both unionfs-fuse and aufs.
Quote:
Originally Posted by Kustom42
Feel free to disagree with any of the above with exception of ceasing the flaming, we are violating the forum rules here and need to focus on working together to build a strong community and keep people coming back. Remember we are all here because we <3 Linux
|
Eeyup.
Last edited by YellowApple; 02-05-2014 at 08:51 PM.
|
|
2 members found this post helpful.
|
All times are GMT -5. The time now is 06:46 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|