Hiding 'bind' partitions
Eamonn Sullivan
eamonn.sullivan at gmail.com
Sun Sep 3 16:50:28 UTC 2006
On 9/3/06, Craig Hagerman <craighagerman at gmail.com> wrote:
> On 9/4/06, Eamonn Sullivan <eamonn.sullivan at gmail.com> wrote:
>
> > On 9/3/06, Craig Hagerman <craighagerman at gmail.com> wrote:
> > > Hi,
> > >
> > > I have /home and /usr on a separate partition from /. I have /etc/fstab
> set
> > > up like this:
> > >
> > > /mnt/home /home none bind 0 0
> > > /mnt/usr /usr none bind
> 0 0
> > >
> > > This makes them 'appear' to be at /home and /usr respectively. My
> problem is
> > > that when I do a find or locate I end up getting duplicate results.
> e.g.:
> > >
> > > /usr/local/java
> > > /mnt/usr/local/java
> > >
> > > Are the same file, but the file system thinks they are separate
> locations.
> > > How can I make the /mnt/home and /mnt/usr directories hidden?
> >
> > Just out of curiosity, why mount them in two places (/mnt/home and
> > /home, for example). Why not just mount them once (/home)? I'm sure
> > I'm missing a good reason for this, so just tell me to go away...
> >
> > -Eamonn
>
>
> Ummm.... come to think of it I can't remember why I did that. I think I
> was/am confused about the correct way to have filesystem directories on
> another partition. I'll change my question to asking what the correct way to
> do this is.
>
> Craig
Normally, you can do something like this in /etc/fstab
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda2 /home ext3 defaults,errors=remount-ro 0 0
/dev/hda3 /usr ext3 defaults,errors=remount-ro 0 0
Or something very similar. Sorry, I don't have a live example to paste
here because at the moment my / (and everything under) is the whole
drive and /mount/backup is a second hard drive. Someone might be able
to give you a better example.
-Eamonn
More information about the ubuntu-users
mailing list