[1608] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: redhat-digest Digest V96 #414

daemon@ATHENA.MIT.EDU (Randy Schrickel)
Tue Oct 29 09:41:05 1996

Date: Tue, 29 Oct 1996 09:29:07 -0500
From: Randy Schrickel <randy.schrickel@raba.com>
To: redhat-list@redhat.com
CC: junkie@glcom.com
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

> Subject: Re: Weird mount problem!
> Date: Tue, 29 Oct 1996 07:57:46 -0500 (EST)
> From: Info junkie <junkie@glcom.com>
> To: redhat-list@redhat.com
> 
> > > /dev/hda3                 none                      ext2   defaults 0 0
> > > I have never had to use /dev/hda3 so it was normally just sitting there.
> > >
> > > Now i need to use it, so i thought pas problem; i'll just mount it
> > >
> > > ----
> > > [root@glink /root]# mount /dev/hda3 -t ext2 /home
> > > [root@glink /root]# cd /home
> > > [root@glink /home]# ls
> > > lost+found
> > > [root@glink /home]#
> > > -----
> > >
> > > And now /home/* files are gone! What is going on?
> > >
> >
> > Actually, they're not gone.  They're just...sorta...underneath.
> >You need to create another directory, "/home1", maybe.  That will be
> > what's called a "mount point".  See your /etc/fstab for examples of
> >"mount points."  Then you can mount "/dev/hda3 on /home1.
> >
> > By way of explanation: there exists on Suns a _transparent_ filesystem.

Huh? Never heard it called that before. It's actually a "feature" of the
mount command (some might call it a bug; I think this topic has been
discussed here before). IMHO, a feature that should be used with caution
due to the confusion it can cause.

> >Picture this:  you mount your CDROM on the mount point "/mnt/cdrom".
> > You then mount /dev/hda3 as a transparent filesystem on top of
> > "/mnt/cdrom".  A transparent filesystem differs from a regular
> >filesystem in that the underlying filesystem "shines through", much

I'd call that a "opaque" filesystem, because you *can't* see what's
underneath. The later mount hides what is on the first mount. This is
exactly Jamal's problem.

> [root@glink /]# df
> Filesystem         1024-blocks  Used Available Capacity Mounted on
> /dev/hda2             991000  851669    88125     91%   /
> /dev/hdc1             991000  501679   438117     53%   /a
> /dev/hda1             354592  226224   128368     64%   /dosc
> 
> [root@glink /]# ls -l
>  . .drwxr-xr-x  22 root     root         1024 Oct 29 07:48 home
> drwxr-xr-x   2 root     root         1024 Oct 29 07:38 home1
>  . .
> note home1 created via symbolic link to home.

Don't want home1 to be a link to home, make it a real directory.
"rm /home1; mkdir /home1"

> mount /dev/hda3 -t ext2 /home1
> [root@glink /]# mount -t ext2 /dev/hda3 /home1
> [root@glink /]# df
> Filesystem         1024-blocks  Used Available Capacity Mounted on
> /dev/hda2             991000  851669    88125     91%   /
> /dev/hdc1             991000  501679   438117     53%   /a
> /dev/hda1             354592  226224   128368     64%   /dosc
> /dev/hda3             634239      13   601466      0%   /home1
> [root@glink /]# find /home1
> /home1
> /home1/lost+found

This is exactly what you would expect, and is actually what you want.
Now you just need to copy everything from /home to /home1 (using tar,
cp, or whatever... I think this was discussed yesterday.) Then when you 
"ls" or "find" in /home1, it will look like /home. Note that your
current /home is not a filesystem, just a directory. "df" should also
show that you now have stuff in /home1. Before continuing, I would make
sure you have /home backed up somewhere!

Now you can "rm -rf /home". "df" should now show the available space on
/dev/hda2 increased by about the same amount as /dev/hda3 is used.

Now, you can either move /home1 to /home "mv /home1 /home" or link them
"ln -s /home1 /home". After either command, doing a "ls" or "find" in
/home should look just as you expect. Add /home to your fstab to make it
permanent, and you're done.

/dev/hda3                 /home                      ext2   defaults 0 0

Hope this helps and is a little clearer. Email if you need anything
else.

randy
-- 
Randy Schrickel, RABA Technologies, Columbia, MD
Individuals committed to excellence.
My opinions, not my employer's.
http://www.raba.com/~randy  (that's "tilde"randy, not "space"randy)


--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post