lab 15 - cluster file

NAME

lab 15 - cluster file

DESCRIPTION

I'm still curious about layering of filesystems. Ds(3) was an example I looked at before writing signalfs. Another example was cryptfs (lab 2). Ds currently resides in /os/port/devds.c. A while ago I moved it into /emu/port/devds.c but hadn't made any use of it. I have wanted to use it for a rudimentary cluster file system, so I ported ds to limbo to play with distributed files and further explore files that are built from layering of other file systems.

I translated the C code and used styxservers to manage the simple, one level namespace. Here's some testing. This is really as much as I've tested it so far.

% for (i in `{seq 0 9}) {zeros -v $i 1024 8 > /tmp/chunk ^$i}
% echo cat c1 /tmp/chunk2 /tmp/chunk3 >ds/ctl
% echo cat c0 /tmp/chunk0 /tmp/chunk1 >ds/ctl
% echo mirror m0 ds/c0 ds/c1 > ds/ctl
% cat ds/ctl
cat c1 /tmp/chunk2 /tmp/chunk3
cat c0 /tmp/chunk0 /tmp/chunk1
mirror m0 ds/c0 ds/c1
% ls -l ds
--rw-rw-rw- M 36 caerwyn caerwyn 16384 Dec 31  1969 ds/c0
--rw-rw-rw- M 36 caerwyn caerwyn 16384 Dec 31  1969 ds/c1
--rw-rw-rw- M 36 caerwyn caerwyn     0 Dec 31  1969 ds/ctl
--rw-rw-rw- M 36 caerwyn caerwyn 16384 Dec 31  1969 ds/m0
% cat ds/c0 > /tmp/t1
% cat /tmp/t1 > ds/m0
% cmp ds/c0 ds/c1

I read the googlefs paper again today. With that in mind a cluster file system could be pieced together using some inferno components.

A kfs(4), or any standard fs, represents the master namespace. All files contain only a ds configuration--the chunk IDs and partioning info. All the inferno nodes write to the master registry (4) the chunks they will serve. Ds grows files by reading chunk id's from a master process that uses the registry to allocate new chunks. A client must navigate the master namespace to the file containing the ds configuration and mount ds in it's namespace. Then it has a distributed file which communicates directly with the nodes storing the disks in the network.

CONCLUSION

Not much thought given to the deeper problems. How would multiple writers on different clients append to the same file? Here is the source for dsfs.b

Comments

Popular posts from this blog

lab 110 - inferno archive edition

lab 111 - wavloop

lab 107 - midiplay