Temporary Ramfossils

TEMPORARY ROOTS ON ANTS VENTI FOSSIL SYSTEMS

The relationship between venti and fossil enables unique workflows. One of the most useful is making a ramdisk copy of a fossil filesystem and entering a namespace rooted into it. ANTS provides helper scripts for this. To begin, you need to know the rootscore you want to work with. You can find your most recent rootscore with a command like:

ns% fossil/last /dev/sdF0/fossil
vac:9d47bc23a178c36a96c4c1980ab3a2a7b210c6ad

If you want to make sure that your are working with an absolutely current copy, create a new archival snapshot in the fscons:

ns% con /srv/fscons
prompt: fsys main snap -a
prompt: archive vac:9d47bc23a178c36a96c4c1980ab3a2a7b210c6ad
prompt: >>> q

Once you have selected a rootscore, use the ramfossil command to create a ramdisk with a 100mb buffer for the fossil and initialize it to that rootscore:

ns% ramfossil 9d47bc23a178c36a96c4c1980ab3a2a7b210c6ad

You should see output like this:

200000+0 records in
200000+0 records out
a389f7b8c5dc6f8bd08418fa515ec70982dbdf6e
e892421c9c2462eeddf463e29a891221c392de41
957f6c7e4759ff70c6f0127ffdc907a287097724
fsys: dialing venti at tcp!127.1!17034

Now you can use the rerootwin command to root into that fossil, and then re-create a standard namespace environment inside it:

ns% rerootwin -f ramfossil
ns% service=con
ns% . $home/lib/profile
cpu% grio -s

This sequence performs a chroot-style operation with rerootwin, then runs your profile to reacquire the standard binds it contains, and then starts grio to provide you with a workspace. Within this subrio, you have a copy of your full root and a normal environment, but changes you make will only affect the temporary ramdisk fossil. You can write/change up to 100mb of data before the ramdisk fossil cache fills up.

The ramfossil has a standard control console at /srv/ramfscons. If you wish to save changes you make inside the ramrooted environment, you can issue an fsys main snap -a command and then preserve the generated rootscore. This will not affect your original root filesystem.

Sometimes, it is useful to test changes in the ramfossil, and then make your main fs a copy of the saved ramfs changes. You can do this by saving the rootscore of the ramfs to a file in 9fat, entering the ants boot/admin namespace, halting the main disk fossil, using flfmt -v with the saved rootscore to reset the main fossil to be identical to the ramfossil, then rebooting. Use caution with an operation like this.


Last modified Mon Mar 11 17:34:00 GMT 2019 [ Top | Edit | History | Changelog | Create a new page ] About the server | Powered by Plan 9