LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   can I mount two devices to the same mount point? (https://www.linuxquestions.org/questions/linux-hardware-18/can-i-mount-two-devices-to-the-same-mount-point-297408/)

gsgleason 03-03-2005 09:57 PM

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.

pyenos 03-03-2005 09:58 PM

that is intersting....

gsgleason 03-03-2005 09:59 PM

what is interesting about it?

pyenos 03-03-2005 10:00 PM

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.

gsgleason 03-03-2005 10:07 PM

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

gsgleason 03-03-2005 10:20 PM

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?

Darin 03-04-2005 04:58 AM

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.

theYinYeti 03-04-2005 05:29 AM

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"


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