[OpenAFS-devel] Re: root via openafs?

Adrián Etchevarne adrian.etchevarne@gmail.com
Thu, 26 Jun 2008 12:18:10 -0300


Dean Anderson wrote:

> The problem is that afs sites expects to be mounted at /afs/sitename/.
> But pivot_root usually takes an inode/vnode, if I recall. Once you have
> afs going, you should be able to pivot into anything that has public
> permissions.
> 
> I think afs caching could be useful for diskless, and indeed nfsv4
> includes caching.  However, the whole diskless idea kind of went by the
> wayside when disks became cheap and large. Diskless was invented in an
> era when 100meg was all that shipped with a cheap unix workstation.
> Now, you can 32Gig on a key-fob flash card. So why go diskless except
> during boot?  Since ram is so cheap, one can usually download the whole
> mini-root into ram. Even the $50 wifi hubs have 8, 16 meg or 32meg ram.
> Those unix workstations of 1991 had 8 or 16 meg ram, but little boxes
> still measured ram in kb.
> 
> So, I'm wondering why you think diskless/flashless is still worthwhile
> past installation?  I can however see the utility of read-only usr on
> flash-based machines, tho.  Don't let me dissuade you, tho.  I rather
> doubt anyone's done this, but I'd like to know how it works out... If
> nothing else, its probably a good example of clever kernel hacking at
> its finest.
> 
> --Dean
> 
One important reason is that you have only one operating system to manage
and one point less of workstation failure. I have an installation of 50+
machines, booting linux from network. They mount / from nfs,
but /usr, /home and /opt are from afs and disks are optional. I modified
the the startups scripts so they check if a disk is present. If so, mount a
partition to use as cache, else make a ramdisk. The only reason for the
disks-cache are the large vmware images that students use (11gb of ro data
+ 2-3gb of rw data) and performance, but otherwise disks have no data and
no installation besides partitioning and mkfs.ext3 and swap, and easily a
diskless computer can be used as a workstation (with 2gb of ram, here, if
nobody uses virtualization, nobody uses the swap anyway). If one disk
broke, I simply remove it and the workstation still can be used. Or, you
can strip that workstation disk and put it on that server raid :)

The next step is to get ridden of nfs, using an initrd, but instead of using
pivot_root, using mount --bind to mount the other subdirectories,
including /bin and /sbin.


Greetings, 
         Adrián.