[TriLUG] OT: mounting a directory on a different volume

Jon Carnes jonc at nc.rr.com
Tue Apr 29 23:58:51 EDT 2003


This works for see the data in two places, though the data is still only
in one place. If you want the data backed-up (on both volumes at the
same time), then you are looking at using something like rsync across
the two volumes.

Good Luck - Jon Carnes

On Tue, 2003-04-29 at 23:06, Jeremy Portzer wrote:
> On Tue, 2003-04-29 at 22:44, Greg Brown wrote:
> 
> > I have two disks in my system, one of which contains the home directory 
> > and one of which contains my /opt directory.
> > 
> > df -h output:
> > /dev/hda3              7906196   3940416   3564156  53% /
> > /dev/hda2               248895     10197    225846   5% /boot
> > /dev/hda4             10449900   2686836   7232116  28% /home
> > /dev/hdb1             76920416  36622148  36390860  51% /opt
> > 
> > I would like to mount /opt/backups/g-mac on /home/gwbrown1/g-mac so 
> > that anything created in /home/gwbrown1/g-mac to /opt/backup/g-mac
> 
> You could do this with bind mounts.
> 	mount --bind /home/gwbrown1/g-mac /opt/backup/g-mac
> [you'll need to make sure the empty directory /opt/backup/g-mac exists
> first]
> 
> But I agree with Greg Woodbury, symlinks are probably what you really
> want.  Bind mounts are still a little esoteric.
> 
> One tip about symlinks -- always try to avoid using absolute paths in
> the symlink.  This can save you endless hassle later on if you need to
> mount your / partition somewhere else, such as /mnt/sysimage as used by
> RHL's rescue mode.
> 
> For example, have a symlink called g-mac, in the /opt/backup directory,
> point to "../../home/gwbrown1/g-mac" .  Don't use the absolutely syntax
> of "/home/gwbrown1/g-mac" .
> 
> Hope this helps,
> 
> Jeremy
> 
> _______________________________________________
> TriLUG mailing list
>     http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ:
>     http://www.trilug.org/faq/TriLUG-faq.html




More information about the TriLUG mailing list