LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-03-2005, 09:57 PM   #1
gsgleason
Member
 
Registered: Oct 2004
Posts: 69

Rep: Reputation: 15
can I mount two devices to the same mount point?


Here's the deal. I'm moving my movie collection to my server so I can stream them through my xbox via SMB and watch them. no big deal there.

here's my question. I am using 2 drives of 250GB each for this. I want it to appear (from a user standpoint) as if all the movies are in one location.

I don't want to use raid0 because if one fails I lose everything.

Here's my thought. Is it okay to mount two devices to the same mount point? Is this an acceptable process?

I am using slack 10, and I ran the commands:
mount -t ext3 /dev/hdg1 /var/movies
mount -t ext3 /dev/hdh1 /var/movies

and it did it without complaining. I then copied a test .rpm file I already had to /var/movies, and verified it was there.

Then I unmounted both, and then mounted one at a time, and sure enough the data was on one of the drives and not the other.

Is this okay to do?

-greg

P.S. I read this on the man page.
Quote:
Only the super-user may mount and unmount filesystems. Since Linux 2.4
a single filesystem can be visible at multiple mount points, and multi-
ple mounts can be stacked on the same mount point.
I'm pretty sure that's what I'm asking, but I wanted to be sure. Thanks.

Last edited by gsgleason; 03-03-2005 at 09:58 PM.
 
Old 03-03-2005, 09:58 PM   #2
pyenos
Member
 
Registered: Mar 2005
Location: australia
Distribution: kernel 2.6.10[default]; kernel 2.4.22-10mdk; mandrake 9.2[default]
Posts: 65

Rep: Reputation: 15
that is intersting....
 
Old 03-03-2005, 09:59 PM   #3
gsgleason
Member
 
Registered: Oct 2004
Posts: 69

Original Poster
Rep: Reputation: 15
what is interesting about it?
 
Old 03-03-2005, 10:00 PM   #4
pyenos
Member
 
Registered: Mar 2005
Location: australia
Distribution: kernel 2.6.10[default]; kernel 2.4.22-10mdk; mandrake 9.2[default]
Posts: 65

Rep: Reputation: 15
Quote:
Originally posted by gsgleason
what is interesting about it?
i think unless you have the same dir structure between drives kernel automatically decides. so imo its no problem.
 
Old 03-03-2005, 10:07 PM   #5
gsgleason
Member
 
Registered: Oct 2004
Posts: 69

Original Poster
Rep: Reputation: 15
one concern is this. I'm going to be making varios directories for each movie, and each one will hold all the dvd files. I'm worried about the machine spreading the dvd files across the two devices. IF one failed, I'd be in the same situation that i woudl had i used raid0
 
Old 03-03-2005, 10:20 PM   #6
gsgleason
Member
 
Registered: Oct 2004
Posts: 69

Original Poster
Rep: Reputation: 15
i just tested it copying a folder and all it's contents to the point where i have 2 devices mounted.

I unmounted both and mounted one at a time, and sure enough, the folder is only on one device.

Maybe it will fill up one device before putting anything on the other device?
 
Old 03-04-2005, 04:58 AM   #7
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
When you mount into a directory that already has data it just ignores the old data and starts using the mount point.

So when you:
mount -t ext3 /dev/hdg1 /var/movies
mount -t ext3 /dev/hdh1 /var/movies

it first mounts the hdg1 partition, then when it mounts the hdh1 partition it just replaces the /var/movies directory with the newest mount. At that point, you are using exclusively /dev/hdh1 for that directory, if you unmount /dev/hdh1 then you will see and use /dev/hdg1 until you mount something over it or unmount that partiton also.

To use both, you can either mount them in seperate directories or use RAID. If you want the files to go to both drives, that's called RAID1 or mirroring.
 
Old 03-04-2005, 05:29 AM   #8
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
I remember reading an insteresting article that talked about multiple mounts on GoboLinux' web site:
http://gobolinux.org

Yves.

Edit: http://gobolinux.org/index.php?lang=...icles/clueless
Look for "ovlfs"

Last edited by theYinYeti; 03-04-2005 at 05:31 AM.
 
  


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 to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 10:03 AM
Mount problem - device already mounted or mount point busy zahoo Linux - General 7 08-28-2009 05:02 PM
samba mount when not owner of mount point cotton213 Linux - General 1 08-04-2005 06:21 AM
Multiple mount --bind's to 1 mount point ? Etraman Slackware 6 12-23-2004 07:18 PM
Multiple devices on the same mount point Knotz Linux - Hardware 3 05-15-2003 03:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:10 PM.

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