Jeff Abrahamson on 10 Jan 2007 18:24:19 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] where do dey go?


On Sat, Jan 06, 2007 at 07:07:16PM -0500, jeff wrote:
>   [17 lines, 89 words, 748 characters]  Top characters: _teinso/
> 
> Apparently a USB hd `became unattached' yesterday. I copied some
> files to it.  When I fired up today, it was still unattached, but
> the files appeared at the mount point. When I got it reattached,
> POOF, they were gone.
> 
> Does this mean that they got copied to /mount/dir instead of /dev/sda1? 
>   Where, physically, is /mount/dir when it's not attached to /dev/sda1?

The directory /mount/ is a normal directory.  When you mount something
on top of it (which is how mounts have to work), accesses to the
directory become accesses to the mounted thing.

So /mount/dir/ still exists, it's just hidden by /dev/sda1 that is now
mounted there.  Unmount, mv the contents, remount, and mv the contents
back.


For example, you can copy /usr to a separate partition, then mount
taht partition on top of /usr.  If you're hacked, you unplug network
cables, umount /usr and remount what was there at /usr-hacked.  Then
you have safe tools to use in /usr (because no one can umount /usr
while you're running because the volume is busy) while you look at
/usr-hacked.

Note that this is an old-school technique for dealing with hacks, from
before the days when you could just boot off of CD's (because it is
from before the days of CD's).  I mention it here as an illustration
of how a lot of stuff can hide behind a mount point.

Maybe the practical use now is hiding your porn collection from family
members or something. ;-)

-- 
 Jeff

 Jeff Abrahamson  <http://jeff.purple.com/>          +1 215/837-2287
 GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug