[OpenAFS] how?: Distribute /home to n Terminal Servers

Dan Pritts danno@internet2.edu
Sat, 7 Dec 2002 11:29:37 -0500


On Sat, Dec 07, 2002 at 08:57:11PM +1300, Steve Wright wrote:
> Are the 'performance issues' ethernet related, or processor related ? 
> We can easily place this traffic on a private network segment.

I have never really paid much attention to this since i have not had a
large cell to administer but but i can guarantee you that the network
traffic is not significant.

> The prime goal is redundancy and simplicity.  I understand AFS is lots 
> more complex than an NFS solution, but we can mostly package the system 
> pre-configured, and the hardware/networking pre-specified.

> Ok.  I would have mounted /home/ as *one* volume.. 

> I only need all the directories under /home/

Typically each user will get a volume for their home directory.  For
example, quotas are enforced at the volume level.  

You would probably have another volume for the /home directory itself,
which contained afs "mount points" for all the home directories.
*this* volume would hardly ever change, and could be replicated across
all of your file servers.

To implement what is suggested here, you would have volumes for each
user, and have the volumes spread across your server farm in roughly equal
proportions.  

Should one server run short on disk space it is simple to 
move volumes about from one server to another, but you would need to
have some scripts that monitored this situation and issued the commands
to move from one server to the other.

> Can we have each 
> server maintain it's own sync'ed (cached) copy of the same (/home/) 
> fileset ?

This part will "just work".  The AFS client software will automagically
grab whatever you need from the appropriate server when you need it,
assuming that said server is online.

It will *not* cache stuff forever.  If you lose a file server, you lose
the data on it (other than your backups, which you will of course have).


> I'm not up on that at this stage..  I trust I can safely ignore it for 
> now ? (famous last words...)

Probably, but there can be issues.  the AFS FAQ at 
http://grand.central.org/twiki/bin/view/AFSLore/UsageFAQ

byte-range file locking: [ Programmer ]

AFS does not support byte-range locking within a file, although lockf()
and fcntl() calls will return 0 (success). The first time a byte-range
lock is attempted, AFS will display:

"afs: byte-range lock/unlock ignored; make sure no one else else is
running this program."

whole file locking: [ Programmer ]

AFS does support advisory locking an entire file with flock(). Processes
on the same client workstation that attempt to lock a file obey the
proper locking semantics.

Processes on different AFS clients requesting a lock on the same file
would get EWOULDBLOCK returned.

> <shrug>  Why can't I just `init 3 && cp -a /home /somewhere/else && init 
> 5`  ??
> 
> Sorry if that's an ignorant question, but it seems logical to me..

The afs file server does not just serve out files that live on a directory
on the server - each volume is a single file on the file server partition.

Typically people back up on a volume-by-volume basis.  

When you run AFS, you really run AFS - it is not just a file sharing
protocol, it is a way of life :).  

> I *thought* I heard that there is no such thing as UIDS + GIDS on an 
> AFS filesystem ?   (I expect I'm really showing my ignorance now..)

UIDs:  sort of, but not really.  There is certainly the concept of 
a user identifier.

GIDs:  pretty much not.  There is the concept of groups, though, 
and the ACL mechanism is very flexible.



danno
--
dan pritts                                       danno@internet2.edu
systems administrator                            734/352-4953 office
internet2                                        734/546-4423 mobile