Subject: Re: AFS or CodaFS
To: Phil Nelson <phil@cs.wwu.edu>
From: Petra Lynn Hofmann <hofmpet@iit.edu>
List: netbsd-help
Date: 01/18/2005 17:16:37
Thank you for explaining=2C I think I understand better the file systems=3B=
 =

at least=2C well enough to now read the documentation=2E  In addition=2C =
I =

believe I understand some of the difference between Coda/AFS and NFS=2C =

however=2C what about Win2K/XP=3F  Is CIFS used by these file systems=3F =
 Or=2C =

is SAMBA still the best method of file sharing between Linux and MS O/S=3F=


P

----- Original Message -----
From=3A Phil Nelson =3Cphil=40cs=2Ewwu=2Eedu=3E
Date=3A Tuesday=2C January 18=2C 2005 2=3A51 pm
Subject=3A Re=3A AFS or CodaFS

=3E -----BEGIN PGP SIGNED MESSAGE-----
=3E Hash=3A SHA1
=3E =

=3E On Tuesday 18 January 2005 09=3A00=2C PetraHof wrote=3A
=3E =3E I=27ve been closely following this thread and now wonder why =

=3E choose one
=3E =3E file system over the other=2C as apparently Coda is an extension =

=3E of AFS=2E =A0
=3E =3E Would someone explain=2C thanks=2E =A0Petra
=3E =

=3E I can answer this one=2E  Yes=2C Coda started with AFS v2 and then =

=3E went in a =

=3E different direction=2E  Some machines at CMU run both AFS and Coda=2E=
  =

=3E The =

=3E following summarizes the primary differences between AFS and Coda =

=3E as I =

=3E understand them=3A
=3E =

=3E   1)  First=2C AFS and Coda break the file storage into =22volumes=22=
=2E  =

=3E Each volume =

=3E contains a filesystem tree=2E   Volumes may be mounted in any =

=3E directory in the =

=3E entire tree=2E  Typically=2C each user gets a volume=2C but a single =
use =

=3E may have =

=3E many volumes in their file tree=2E   In AFS=2C volumes are stored on =
a =

=3E read/write =

=3E server=2E  There may be several read only replicas=2C but writing to =

=3E the volume =

=3E requires writing to the read/write server=2E    In Coda=2C this =

=3E restriction was =

=3E dropped and so a volume may be stored on several servers as a =

=3E read/write =

=3E replica=2E   So the loss of one server does not stop work with =

=3E volumes that =

=3E have replicas of other servers=2E
=3E =

=3E  2)  Both AFS and Coda use a client cache to store the complete =

=3E file on the =

=3E local disk=2E   Neither read or write blocks=2E  They both implement =

=3E session =

=3E semantics=2E    The difference comes when the server(s) is(are) =

=3E unavailable=2E  =

=3E AFAIK=2C if there is a read replica that can be contacted=2C AFS lets=
 =

=3E you read =

=3E the file=2E  If the read/write replica is not available (network or =

=3E server =

=3E problems) then you can not write the file=2E   You lose all access =

=3E to AFS in =

=3E that case=2E
=3E =

=3E   For Coda=2C it assumes if the file is in the local cache and you =

=3E can=27t talk =

=3E to any server=2C we should allow the user to use the local cached =

=3E file=2E  The =

=3E client goes into =22disconnected operation=22 where the user can stil=
l =

=3E read and =

=3E write files=2C but only ones that are in the cache=2E  (You can creat=
e =

=3E a new file =

=3E while disconnected=2E)    The client keeps track of all =

=3E modifications and new =

=3E files during the disconnected period and then when the client can =

=3E again =

=3E connect to the server(s)=2C it sends back all the modifications to =

=3E the =

=3E server(s)=2E   =

=3E =

=3E Both 1 and 2 above allow for conflicts to occur=2E   First=2C when tw=
o =

=3E servers =

=3E disagree on the content of a file and second=2C when the servers and =

=3E a client =

=3E disagree on the content of a file=2E   This is the primary reason a =

=3E user needs =

=3E to monitor the coda file system=2E  Also=2C since an access to a file=
 =

=3E is delayed =

=3E until the file is in the local cache=2C it is nice to see that the =

=3E delay in =

=3E editing your file is due to fetching the file from the server=2E
=3E =

=3E Because of this disconnected operation=2C databases should not be =

=3E used on Coda=2E  =

=3E The fact that many programs use =22mini databases=22 in one=27s home =

=3E directory also =

=3E means that Coda is somewhat unfriendly to home directories=2E   AFS =

=3E works quite =

=3E well in this situation=2E (although I don=27t know how good is the =

=3E current AFS =

=3E support on NetBSD=2E)   Coda tends to work very nicely in other =

=3E environments =

=3E where network connection can be a problem or on a laptop=2E   People =

=3E have been =

=3E known to take their laptop away from a network for up to 2 weeks =

=3E and do a lot =

=3E of work in Coda=2E  When they finally returned=2C they reconnected an=
d =

=3E their 2 =

=3E weeks of work was sent back to the servers with no problems=2E
=3E =

=3E There is also an instance of disconnected work connected with a =

=3E server =

=3E problem=2E  Several years ago at CMU=2C a person was using Coda and i=
n =

=3E their use =

=3E it caused a bug in the server to be detected=2E   The server bug =

=3E caused a =

=3E server crash=2E   The primary developer noticed the server crash=2C =

=3E debugged the =

=3E server=2C brought it back with a fixed version =2E=2E=2E and the user=
 =

=3E never knew the =

=3E server crashed=2E   His client just went into disconnected operation =

=3E and the =

=3E user kept working the entire time the server was being fixed=2E   =

=3E The reason =

=3E the user knew there was a server problem was because the developer =

=3E went to =

=3E the office of the user to make sure everything was OK=2E
=3E =

=3E There are some interesting results due to the multiple read/write =

=3E replicas and =

=3E the algorithms for resolving conflicts=2E   If one server loses a =

=3E disk=2C one can =

=3E recover that server by replacing the disk=2C creating the complete =

=3E set of empty =

=3E volumes in the server and then letting the other servers =

=3E repopulate the the =

=3E contents of the volumes by conflict resolution=2E   No need to load =

=3E from =

=3E backups=2E
=3E =

=3E There are other differences due to diverging code=2C but =

=3E disconnected operation =

=3E is IMHO the primary reason to use Coda=2E   The other reason to use =

=3E Coda is the =

=3E multiple r/w replicas=2E =

=3E =

=3E - --Phil
=3E =

=3E - -- =

=3E Phil Nelson                       NetBSD=3A http=3A//www=2Enetbsd=2Eo=
rg
=3E e-mail=3A phil=40cs=2Ewwu=2Eedu           Coda=3A http=3A//www=2Ecoda=
=2Ecs=2Ecmu=2Eedu
=3E http=3A//www=2Ecs=2Ewwu=2Eedu/nelson =

=3E -----BEGIN PGP SIGNATURE-----
=3E Version=3A GnuPG v1=2E2=2E3 (NetBSD)
=3E =

=3E iD8DBQFB7XbbzbodwsP3RI0RAprVAJ9DLu4nq7TRrTA1n0xCZyd6PC6HWgCdFgOS
=3E TX5QcF2RQCq7efzVxd12ZJY=3D
=3E =3DnlJp
=3E -----END PGP SIGNATURE-----
=3E