Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

mount on the same mount point

 
Goto page 1, 2
   Soft32 Home -> Linux -> Genreal Discussions RSS
Next:  [Samba] how does one edit a domain group  
Author Message
climb65

External


Since: Oct 09, 2009
Posts: 3



(Msg. 1) Posted: Fri Oct 09, 2009 7:20 am
Post subject: mount on the same mount point
Archived from groups: comp>os>linux>misc (more info?)

Hello,

I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
mount point. I have just read that it is possible.

Note : MD devices are JFS.

But, altough I get no error, I do not get what I expected : the second
mount command makes the first mount invisible.

So, my 2 questions are :

1) is it possible to mount 2 MD devices on the same mount point?
2) If yes, how?

Thanks
Back to top
Login to vote
pk

External


Since: May 22, 2009
Posts: 8



(Msg. 2) Posted: Fri Oct 09, 2009 7:20 am
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

climb65 wrote:

> Hello,
>
> I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
> mount point. I have just read that it is possible.
>
> Note : MD devices are JFS.
>
> But, altough I get no error, I do not get what I expected : the second
> mount command makes the first mount invisible.
>
> So, my 2 questions are :
>
> 1) is it possible to mount 2 MD devices on the same mount point?
> 2) If yes, how?

I don't think it's possible. You can probably get something similar to what
you want by using one of the many union-fs like implementations.
Back to top
Login to vote
The Natural Philosopher

External


Since: Apr 15, 2009
Posts: 97



(Msg. 3) Posted: Fri Oct 09, 2009 7:20 am
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

climb65 wrote:
> Hello,
>
> I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
> mount point. I have just read that it is possible.
>
> Note : MD devices are JFS.
>
> But, altough I get no error, I do not get what I expected : the second
> mount command makes the first mount invisible.
>
> So, my 2 questions are :
>
> 1) is it possible to mount 2 MD devices on the same mount point?

yes, but the results are as above.

> 2) If yes, how?

As you did it.

If what you want is for two disks to apparently 'share' the same flat
directory space, then symlinks are possibly your friend.


>
> Thanks
Back to top
Login to vote
Chris Davies

External


Since: May 03, 2006
Posts: 66



(Msg. 4) Posted: Fri Oct 09, 2009 9:20 am
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

climb65 <climb65.DeleteThis@laposte.net> wrote:
> I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
> mount point. I have just read that it is possible.

Yes it's possible.


> But, altough I get no error, I do not get what I expected : the second
> mount command makes the first mount invisible.

That's exactly what should happen.


> 1) is it possible to mount 2 MD devices on the same mount point?
> 2) If yes, how?

Yes it is, by doing what you're doing. But it sounds like your expectation
differs from reality, and it would help somewhat if you were to explain
what you were actually trying to achieve.

Chris
Back to top
Login to vote
ray

External


Since: Apr 10, 2007
Posts: 375



(Msg. 5) Posted: Fri Oct 09, 2009 11:20 am
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 09 Oct 2009 10:49:47 +0000, climb65 wrote:

> Hello,
>
> I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
> mount point. I have just read that it is possible.
>
> Note : MD devices are JFS.
>
> But, altough I get no error, I do not get what I expected : the second
> mount command makes the first mount invisible.
>
> So, my 2 questions are :
>
> 1) is it possible to mount 2 MD devices on the same mount point? 2) If
> yes, how?
>
> Thanks

Let's think about this for a second. If you did as you wanted and you
tried to access a particular file - suppose there was a file on each disk
with the same name - how would the system know which one you wanted? If
you created a file in the common directory - where would it be stored?
Back to top
Login to vote
"Tony Lawrence

External


Since: Oct 09, 2009
Posts: 4



(Msg. 6) Posted: Fri Oct 09, 2009 11:20 am
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Oct 9, 11:14 am, ray <r....DeleteThis@zianet.com> wrote:
> On Fri, 09 Oct 2009 10:49:47 +0000, climb65 wrote:
> > Hello,
>
> > I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
> > mount point. I have just read that it is possible.
>
> > Note : MD devices are JFS.
>
> > But, altough I get no error, I do not get what I expected : the second
> > mount command makes the first mount invisible.
>
> > So, my 2 questions are :
>
> > 1) is it possible to mount 2 MD devices on the same mount point? 2) If
> > yes, how?
>
> > Thanks
>
> Let's think about this for a second. If you did as you wanted and you
> tried to access a particular file - suppose there was a file on each disk
> with the same name - how would the system know which one you wanted? If
> you created a file in the common directory - where would it be stored?

What he wants is a "union mount". See my http://aplawrence.com/Words/2004_11_21.html

--
Tony Lawrence
Back to top
Login to vote
"Tony Lawrence

External


Since: Oct 09, 2009
Posts: 4



(Msg. 7) Posted: Fri Oct 09, 2009 11:20 am
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Oct 9, 11:14 am, ray <r....RemoveThis@zianet.com> wrote:

> Let's think about this for a second. If you did as you wanted and you
> tried to access a particular file - suppose there was a file on each disk
> with the same name - how would the system know which one you wanted? If
> you created a file in the common directory - where would it be stored?

The ramifications of union mounts can be confusing.

The system doesn't know which one you wanted - but it does know which
one you'll get Smile

A more interesting question is what happens when a file in the upper
mount is deleted but a file with the name exists below. Should the
"under" file become visible? The answer depends upon whether or not
"whiteouts" are implemented.

See http://aplawrence.com/foo-mac/union-mounts.html for an example
(which happens to be on Mac OS X but the same concepts apply to Linux
union mounts).
Back to top
Login to vote
Michael Black

External


Since: Nov 02, 2008
Posts: 38



(Msg. 8) Posted: Fri Oct 09, 2009 1:04 pm
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 9 Oct 2009, climb65 wrote:

> Hello,
>
> I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
> mount point. I have just read that it is possible.
>
What exactly are you trying to do?

The minute you mount something to a mount point, whatever is there
disappears until the mounted partition is unmounted (and then it
reappears unharmed). A mount point is merely a directory, if it's empty
it means nothing to mount something there, if it's got content the content
disappears until there is a umount.

One can mount on a subdirectory of a mount point.

I have /home in a separate partition. When I move to a new release of my
distribution, I put it in a new partition, and play with it there for a
while, in tandem with the previous release. When I'm ready to make the
changeover, I make /home in the new release's partition the mount point
for my separate /home partition.

But, I also have a directory in my /home directory titled "mnt", where I
can mount flash drives and such. So I have a mount point within a mounted
partition.

You can do that, mount one partition, create a directory where you can
mount the next, and once the first is mounted, you mount the second.
As someone pointed out, this also ensures that you can tell which
content is in which partition, and if there are duplicates there won't
be a clash.

Michael


> Note : MD devices are JFS.
>
> But, altough I get no error, I do not get what I expected : the second
> mount command makes the first mount invisible.
>
> So, my 2 questions are :
>
> 1) is it possible to mount 2 MD devices on the same mount point?
> 2) If yes, how?
>
> Thanks
>
Back to top
Login to vote
"Tony Lawrence

External


Since: Oct 09, 2009
Posts: 4



(Msg. 9) Posted: Fri Oct 09, 2009 1:04 pm
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Oct 9, 1:04 pm, Michael Black <et... DeleteThis @ncf.ca> wrote:
> On Fri, 9 Oct 2009, climb65 wrote:
> > Hello,
>
> > I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
> > mount point. I have just read that it is possible.
>
> What exactly are you trying to do?

What he's trying to do is obviously a union mount.

Why does everybody keep insisting this can't be done?

http://www.filesystems.org/project-unionfs.html
Back to top
Login to vote
Baho Utot

External


Since: Aug 22, 2009
Posts: 6



(Msg. 10) Posted: Fri Oct 09, 2009 7:20 pm
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 09 Oct 2009 10:49:47 +0000, climb65 wrote:

> Hello,
>
> I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
> mount point. I have just read that it is possible.
>
> Note : MD devices are JFS.
>
> But, altough I get no error, I do not get what I expected : the second
> mount command makes the first mount invisible.

It worked correctly

>
> So, my 2 questions are :
>
> 1) is it possible to mount 2 MD devices on the same mount point? 2) If
> yes, how?
>

No

--
GNU/Linux runs on IBM mainframes and on the world's fastest supercomputers
Windows supercomputers on the other hand are called botnets. <grin>
Back to top
Login to vote
Baho Utot

External


Since: Aug 22, 2009
Posts: 6



(Msg. 11) Posted: Fri Oct 09, 2009 7:20 pm
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 09 Oct 2009 11:10:13 -0700, Tony Lawrence (pcunix) wrote:

> On Oct 9, 1:04 pm, Michael Black <et....TakeThisOut@ncf.ca> wrote:
>> On Fri, 9 Oct 2009, climb65 wrote:
>> > Hello,
>>
>> > I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
>> > mount point. I have just read that it is possible.
>>
>> What exactly are you trying to do?
>
> What he's trying to do is obviously a union mount.
>
> Why does everybody keep insisting this can't be done?
>
> http://www.filesystems.org/project-unionfs.html


What if unionfs is not available?

How would you make it work then?


--
GNU/Linux runs on IBM mainframes and on the world's fastest supercomputers
Windows supercomputers on the other hand are called botnets. <grin>
Back to top
Login to vote
Unruh

External


Since: Aug 14, 2005
Posts: 224



(Msg. 12) Posted: Fri Oct 09, 2009 7:20 pm
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Baho Utot <baho-utot.RemoveThis@invalid.com> writes:

>On Fri, 09 Oct 2009 10:49:47 +0000, climb65 wrote:

>> Hello,
>>
>> I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
>> mount point. I have just read that it is possible.
>>
>> Note : MD devices are JFS.
>>
>> But, altough I get no error, I do not get what I expected : the second
>> mount command makes the first mount invisible.

>It worked correctly

On a regular mount, whatever is mounted on a mountpoint hides everything
that was previously on that mount point. The former stuff is
inaccessible.

As people have pointed out there is a set of routines, called Union File
System, by which you can mount inclusively-- ie all the material mounted
as a union file system is accessible.

Read http://en.wikipedia.org/wiki/UnionFS
Linux has both unionfs and aufs as implimentations.



>>
>> So, my 2 questions are :
>>
>> 1) is it possible to mount 2 MD devices on the same mount point? 2) If
>> yes, how?
>>

>No
Back to top
Login to vote
Unruh

External


Since: Aug 14, 2005
Posts: 224



(Msg. 13) Posted: Fri Oct 09, 2009 7:20 pm
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Baho Utot <baho-utot.DeleteThis@invalid.com> writes:

>On Fri, 09 Oct 2009 11:10:13 -0700, Tony Lawrence (pcunix) wrote:

>> On Oct 9, 1:04 pm, Michael Black <et....DeleteThis@ncf.ca> wrote:
>>> On Fri, 9 Oct 2009, climb65 wrote:
>>> > Hello,
>>>
>>> > I'm trying to mount 2 md devices (/dev/md4 and /dev/md5) on the same
>>> > mount point. I have just read that it is possible.
>>>
>>> What exactly are you trying to do?
>>
>> What he's trying to do is obviously a union mount.
>>
>> Why does everybody keep insisting this can't be done?
>>
>> http://www.filesystems.org/project-unionfs.html


>What if unionfs is not available?

>How would you make it work then?

You don't.
Or you install unionfs or aufs and run the modules.
Back to top
Login to vote
climb65

External


Since: Oct 09, 2009
Posts: 3



(Msg. 14) Posted: Mon Oct 12, 2009 7:20 am
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 09 Oct 2009 11:10:13 -0700, Tony Lawrence (pcunix) wrote :
(...)



Hello guys and thanks for your answers.

Yes, what I'm looking for is a cumulative mount, as you call it
"unionfs".

For instance :

/dev/md4 and /dev/md5 will be moutned as /mnt/data.

In this mount point, I will have a global directory, say GD. On each md
device, I have this GD directory.

Then, on one md device, I have for example, 3 directories, say DA, DB and
DC. On the second md device, I have DD and DE.

my resulting mount point would be then as follows :

/mnt/data/GD/DA/
/mnt/data/GD/DB/
/mnt/data/GD/DC/
/mnt/data/GD/DD/
/mnt/data/GD/DE/

But as you said, my potential problem is that in D[A-E] directories, I
have files with the same name. There is just the main directory (DA, DB,
etc) which differs.

Is that a real problem?

Anyway, I've just learned something. I didn't know the existence of these
2 modules :
- unionfs
- aufs

I will look them with attention.

Thanks
Back to top
Login to vote
Joe Beanfish

External


Since: Apr 14, 2006
Posts: 22



(Msg. 15) Posted: Mon Oct 12, 2009 1:20 pm
Post subject: Re: mount on the same mount point [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

climb65 wrote:
> On Fri, 09 Oct 2009 11:10:13 -0700, Tony Lawrence (pcunix) wrote :
> (...)
>
>
>
> Hello guys and thanks for your answers.
>
> Yes, what I'm looking for is a cumulative mount, as you call it
> "unionfs".
>
> For instance :
>
> /dev/md4 and /dev/md5 will be moutned as /mnt/data.
>
> In this mount point, I will have a global directory, say GD. On each md
> device, I have this GD directory.
>
> Then, on one md device, I have for example, 3 directories, say DA, DB and
> DC. On the second md device, I have DD and DE.
>
> my resulting mount point would be then as follows :
>
> /mnt/data/GD/DA/
> /mnt/data/GD/DB/
> /mnt/data/GD/DC/
> /mnt/data/GD/DD/
> /mnt/data/GD/DE/
>
> But as you said, my potential problem is that in D[A-E] directories, I
> have files with the same name. There is just the main directory (DA, DB,
> etc) which differs.
>
> Is that a real problem?

Also look into LVM for concatenating volumes into one logical volume, RAID0.
Back to top
Login to vote
Display posts from previous:   
Related Topics:
acl and linux - hi, i have to work with acl and linux; how is the best file system to do it ? (i have heard reiserfs but i don't know....

Microsoft/LINUX debate. - Why does people brother having this Microsoft/LINUX mud-slinging thing? I am new to LINUX but installed REDHAT 8..

Multiple CD volume backup solution - Hi all I'm looking for a backup package that will allow me to span multiple CDs and also allow for individual CD..

virus scanner - Hi All was wondering if i can get some idea of what people are useing for virus scanners on Redhat 8. Its sendmail tha...

trailing slash in web urls - ya this may be a lame question but i have just setup apache 2.0.46 and when i connect to http://domain it gets the..

Need advice on linux distro - I Installed Debian Linux on a spare computer 2 months ago, and that was the first time I used linux. I've been using i...
       Soft32 Home -> Linux -> Genreal Discussions All times are: Pacific Time (US & Canada) (change)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]