Re: Overmounting a filesystem

Christian Holtje (docwhat@uiuc.edu)
Thu, 11 Apr 1996 10:49:06 -0500 (CDT)


On Thu, 11 Apr 1996, Graham Mitchell wrote:

> On 10 Apr 96 at 21:43, Christian Holtje docwhat@uiuc wrote:
>
> <snip>
>
> > How about this for an off the cuff idea (well...I'm wearing a tee-shirt,
> > but still....)
> >
> > n devices(mountable) /dev/1, /dev/2 ... /dev/n
> > mounted on /mnt
> > in this order:
> >
> > mount /dev/1 /mnt
> > mount /dev/2 /mnt
> > ....
> > mount /dev/n /mnt
> >
>
> But you also want to be able to do something like....
>
> mount /dev/sr0/<path from root of CD> /usr/src
> mount /dev/dha1/<patch from root of HD> /usr/src
>
> (obviously we'd need to use loopback devices etc for that bits).

Hmmm...in that case, maybe overlay's can be made a special subset of
a loopback mount.

> > Flags (sysadmin set):
> >
> > Reads:
> > Getting the directory information in this order:
> > Get direntry for this dir (if it exists) for /dev/sr0
> > "" "" for /dev/hda1
>
> > Cases to handle:
> > If /dev/k has a direntry that matches an
> > older direntry(/dev/1.../dev/k-1) then the older one is
> > thrown out (therefore inaccessable).
>
> I'd say the one on the last mounted device should override.
> Irrespective of the date. This would allow you to migrate info from
> and underlying CDROM up to a hard disk (could be used as a psuedo
> archive - all files help on CD, but migrated to faster disk if/when
> they're accessed. You'd also need utilities to archive them 'back
> down' onto CD).

Whups! That sould read:
If /dev/k has a direntry that matches a deventry (starting at
/dev/1 to /dev/k-1) then the deventry < k is thrown out,
(therefore inaccessable) (i.e. the newer ones take precedence)

> >
> > Writes:
> > Check if file exists, working /dev/n.../dev/1 Take
> > FIRST occurance of a matching dirent.
> Again, I'd say that the LAST MOUNTED device should have preference,
> then work back onto the previously mounted device if spaec ran out.

Yes....you're write...otherwise the above scheme doesn't make
sense... you'd write to a file that gets ignored anyway!

> >
> > If file doesn't exist, write to /dev/1
> >
> > Cases to handle:
> > /dev/k is RO: Try /dev/k+1 till /dev/n then report FS is RO.
> > /dev/k doesn't have enought space to write the WHOLE file.
> > Write what is possible, continue on /dev/k+1, etc.
> > untill you reach the end, then give outofspace error.
> >
> > When file is closed, move all parts to one /dev/q,
> > searching from /dev/1..../dev/n
> >
> > If not enough space is available, then report an error.
>
> I dont like the idea of an error being reported long after a file has
> possibly been closed my a now dead process.

Yeah...that was my complant too...there must be a way to handle that.
Writes should be done differently...have to think about it.

Christian G. Holtje (aka Doctor What)

---
    ---     ---     ---   -      -  -  -   ---  -----  docwhat@itek.net
   +   -  +    -  +      +      +  -  +  -   +   -    CS major at Illinois
  *   +  *    +  *      *  +   *  +*+*  +*+*+   *    ---- finger me at ----
 ****     ***     ***   **  **   *  *  *   *   *       docwhat@itek.net
also:  http://www.itke.net/~docwhat

Q: Why would the government want to get rid of PBS? A: Fifteen more minutes of Pentagon running time.