Mount two device on the same directory
Can I mount two different device on the same dir ?
If I first mount a superblock of vitual filesystem on / ,
then I mount another real device /dev/sda1 also on / ,
then, if I type " ls / " command , Are all files in the two device show up to me?
thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 1 line
then, if I type " ls / " command , Are all files in the two device show up to me?
My understanding is that whichever filesystem was mounted last, that will be the one responding to ls.
For example, when you mount a usb stick to /mnt/mydevice, the directory contents are replaced with the contenst of the usb stick you mounted.
To see what I mean:
mkdir /mnt/mydrive
touch /mnt/mydrive/somefile
ls /mnt/mydrive/
mount /dev/(whatever the device is) /mnt/mydrive
ls /mnt/mydrive/
somefile should appear in the listing before mount but not after mounting.
Signature · 12 lines
Drew "Nothing in life is to be feared. It is only to be understood." --Marie Curie "This started out as a hobby and spun horribly out of control." -Unknown -- To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs