Andrew 文件系统体验 (1)
2006-09-16 12:01:46| 分类:
一般技术
| 标签:
|举报
|字号大中小 订阅
2006年9月16日,今天是我技术生涯的重要时刻:第一次真正地访问了Internet上的Andrew文件系统(AFS)节点。当然,是以匿名客户端的身份,我现在还没有能力把服务器端搭建起来。
AFS使用下列端口服务:
afs3-fileserver 7000/tcp bbs # file server itself
afs3-fileserver 7000/udp bbs
afs3-callback 7001/tcp # callbacks to cache managers
afs3-callback 7001/udp
afs3-prserver 7002/tcp # users & groups database
afs3-prserver 7002/udp
afs3-vlserver 7003/tcp # volume location database
afs3-vlserver 7003/udp
afs3-kaserver 7004/tcp # AFS/Kerberos authentication
afs3-kaserver 7004/udp
afs3-volser 7005/tcp # volume managment server
afs3-volser 7005/udp
afs3-errors 7006/tcp # error interpretation service
afs3-errors 7006/udp
afs3-bos 7007/tcp # basic overseer process
afs3-bos 7007/udp
afs3-update 7008/tcp # server-to-server updater
afs3-update 7008/udp
afs3-rmtsys 7009/tcp # remote cache manager service
afs3-rmtsys 7009/udp
感觉上,似乎AFS客户端使用UDP协议获取目录和文件信息,然后用TCP来传输大文件。任何客户端访问都会无例外地先进入本地文件系统的缓存目录,AFS的缓存刷新机制会确保当服务端发生改变时能重传相应的文件中被改变了的部分(应该是以块为单位)。
一个使用了AFS的Linux系统,挂载表是这个样子的:(df's output)
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/sda3 918354 143551 725805 17% /
udev 10240 76 10164 1% /dev
devshm 517788 0 517788 0% /dev/shm
/dev/sda10 56119724 16935296 39184428 31% /home
/dev/sda8 918322 8256 861070 1% /tmp
/dev/sda5 9767184 6478132 3289052 67% /usr
/dev/sda6 3903620 1796836 2106784 47% /var
/dev/sda7 1921156 44944 1778620 3% /var/cache/openafs
/dev/sda2 20972856 7860592 13112264 38% /mnt/win32
AFS 9000000 0 9000000 0% /afs
其中AFS(/afs)是AFS文件系统挂载点,/var/cache/openafs是本地缓存挂载点,之所以单独挂载这个目录是因为AFS缓存目录目前在Linux下必须是ext3文件系统,据说其他文件系统类型缺乏AFS所必须的锁定机制,而XFS文件系统是特殊地不能支持。
如果进入/afs目录,就会看到一些以站点名命名的目录,其中每个目录称为一个cell,具有相同域名的cell统称为site:
binghe@localhost:/afs$ ls -l
总计 654
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 1ts.org
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 acm.uiuc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ams.cern.ch
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 andrew.cmu.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 anl.gov
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 asu.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 athena.mit.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 atlass01.physik.uni-bonn.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 atlas.umich.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ba.infn.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 bazquux.org
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 biocenter.helsinki.fi
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 bme.hu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 caspur.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 cats.ucsc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 cede.psu.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 cern.ch
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 chem.cmu.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ciemat.es
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 citi.umich.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 clarkson.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 club.cc.cmu.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 cmf.nrl.navy.mil
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 coed.org
drwxr-xr-x 46 root root 4096 2006-06-22 05:46 cs.cmu.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 cs.pitt.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 cs.rose-hulman.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 cs.stanford.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 cs.uwm.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 cs.wisc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 dapnia.saclay.cea.fr
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 dbic.dartmouth.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 dementia.org
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 desy.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 dev.mit.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 dia.uniroma3.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 e18.ph.tum.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ece.cmu.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 eecs.harvard.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 e.kth.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 enea.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 engr.wisc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 eng.utah.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 epfl.ch
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 es.net
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ethz.ch
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 extundo.com
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 f9.ijs.si
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 fnal.gov
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 fusione.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 glue.umd.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 gppc.de
drwxrwxrwx 2 root root 2048 2006-05-07 07:21 grand.central.org
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 hackish.org
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 hallf.kth.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 hep.caltech.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 hephy.at
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 hep.man.ac.uk
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 hep.sc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 hep.wisc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 i1.informatik.rwth-aachen.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 iastate.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ic-afs.arc.nasa.gov
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 icemb.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ictp.trieste.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 idahofuturetruck.org
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ies.auc.dk
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ifca.unican.es
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ifh.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ific.uv.es
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 in2p3.fr
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 infn.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ing.uniroma1.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ipp-garching.mpg.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ir.stanford.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 isk.kth.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 italia
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 it.kth.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 itp.tugraz.at
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 jpl.nasa.gov
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 kfki.hu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 kloe.infn.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 laroia.net
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 lcp.nrl.navy.mil
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 le.infn.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 lnf.infn.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 lngs.infn.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 lrz-muenchen.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 lsa.umich.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 math.unifi.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 md.kth.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 mech.kth.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 mekinok.com
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 membrain.com
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 meteo.uni-koeln.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 midnightlinux.com
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 mpe.mpg.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 msc.cornell.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 msu.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 nada.kth.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 ncsa.uiuc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 nd.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 nersc.gov
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 net.mit.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 nikhef.nl
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 nimlabs.org
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 nomh.org
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 northstar.dartmouth.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 oc7.org
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 openafs.org
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 pdc.kth.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 phy.bris.ac.uk
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 physics.unc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 physics.wisc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 physik.uni-freiburg.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 physik.uni-mainz.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 physik.uni-wuppertal.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 physto.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 pi.infn.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 pitt.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 p-ng.si
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 psc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 psi.ch
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 psm.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 qatar.cmu.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 rhic.bnl.gov
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 rl.ac.uk
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 rose-hulman.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 rpi.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 rrz.uni-koeln.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 rz.uni-jena.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 sanchin.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 sbp.ri.cmu.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 scoobydoo.psc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 scotch.ece.cmu.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 s-et.aau.dk
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 setfilepointer.com
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 sinenomine.net
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 sipb.mit.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 slackers.net
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 slac.stanford.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 soap.mit.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 sodre.cx
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 stacken.kth.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 su.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 syd.kth.se
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 tgrid.it
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 tproa.net
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 tu-bs.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 tu-chemnitz.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 umbc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 umich.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 umr.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 uncc.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 uni-bonn.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 uni-freiburg.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 uni-hohenheim.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 uni-mannheim.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 uni-paderborn.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 urz.uni-heidelberg.de
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 usatlas.bnl.gov
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 vn.uniroma3.it
drwxr-xr-x 2 root root 4096 2002-11-24 12:03 wam.umd.edu
drwxr-xr-x 100 root root 4096 1970-01-01 08:00 wu-wien.ac.at
上面这些目录实际上来自我电脑里的一个预设的AFS全球公共cell数据库。大家可能注意到多数 cell 目录的时间不对(1970-01-01 08:00),这是因为我在挂载AFS时打开了一个fakeroot的选项。就是说,除非我真正进入某个afs cell目录里浏览,否则我与该cell之间是没有网络通信的,自然也无法获取他这个目录的任何信息,所以目录的时间是0。但是还有一些有正确时间的,就是我之前访问过的,例如卡內基-梅隆的计算机学院AFS cell:
$ ls -l /afs/cs.cmu.edu
总计 432
drwxr-xr-x 5 2232100 root 2048 1994-09-22 04:10 academic
?--------- ? ? ? ? ? /afs/cs.cmu.edu/osf1
drwxr-xr-x 2 2230546 uucp 2048 1998-01-29 09:48 alpha_dux40
drwxr-xr-x 2 2229246 root 2048 1994-04-13 08:42 alpha_osf1
drwxr-xr-x 2 2229815 root 2048 1994-08-30 14:13 alpha_osf20
drwxr-xr-x 2 2229815 daemon 2048 1995-07-12 12:47 alpha_osf32
drwxr-xr-x 2 2230546 users 2048 2005-07-11 22:53 amd64_fc3
drwxr-xr-x 2 2230546 users 2048 2006-06-22 05:47 amd64_fc5
drwxr-xr-x 38 42 root 4096 2001-01-26 02:09 archive
drwxr-xr-x 2 2229246 daemon 2048 1994-05-27 03:44 common
drwxr-xr-x 2 2230546 root 2048 2005-05-06 15:36 data
drwxrwxrwx 17 root root 2048 2006-09-16 04:31 help
drwxrwxrwx 2 root root 2048 1999-03-29 20:49 host
drwxr-xr-x 2 2230546 uucp 2048 1996-08-14 04:14 hp700_ux100
drwxr-xr-x 2 2233626 root 2048 1994-04-13 08:44 hp700_ux90
drwxr-xr-x 2 2230546 users 2048 2005-07-11 22:52 i386_fc3
drwxr-xr-x 2 2230546 users 2048 2006-06-22 05:47 i386_fc5
drwxr-xr-x 2 2230546 dialout 2048 1996-03-30 06:07 i386_linux1
drwxr-xr-x 2 backup root 2048 1992-08-21 12:14 i386_mach
lrwxr-xr-x 1 backup root 7 1989-03-24 04:31 ibmrt_mach -> rt_mach
drwxr-xr-x 2 backup root 2048 1992-08-02 12:43 links_mach
lrwxr-xr-x 1 2228236 root 4 1994-02-18 11:04 local -> misc
drwxr-xr-x 2 backup root 2048 1992-02-06 13:41 luna88k_mach
drwxr-x--- 3 sys root 2048 1992-10-17 00:21 mach
drwxrwxrwx 10 root root 2048 2002-06-11 23:32 mac_sys7
drwxr-xr-x 300 root root 14336 2006-09-14 01:51 misc
drwxr-xr-x 4 backup root 2048 1992-08-02 12:43 mmax_mach
lrwxr-xr-x 1 backup root 9 1989-02-16 06:53 next_mach -> sun3_mach
drwxr-xr-x 2 2232100 root 2048 1996-09-13 04:05 org
drwxr-xr-x 2 backup root 2048 1989-07-25 09:14 os
drwxr-xr-x 3 backup root 2048 1992-08-02 12:51 pmax_mach
drwxr-xr-x 2 2229246 root 2048 1994-04-13 09:26 pmax_ul43a
drwxr-xr-x 2 root root 94208 2006-09-08 02:04 project
drwxr-xr-x 2 2232100 root 2048 1993-03-02 01:23 publications
lrwxr-xr-x 1 backup root 10 1988-11-16 03:10 root -> @sys/omega
drwxr-xr-x 2 2230546 root 2048 1995-03-31 04:51 rs_aix32
drwxr-xr-x 3 root root 2048 1992-08-02 12:42 rt_mach
drwxr-xr-x 11 root root 2048 2006-04-21 02:50 service
drwxr-xr-x 2 2230546 root 2048 1995-06-28 17:17 sgi_53
drwxr-xr-x 2 2230546 root 2048 1996-11-26 16:07 sgi_62
drwxrwxrwx 5 root root 2048 1990-06-06 04:48 sun3_40
drwxrwxrwx 6 root root 2048 1990-11-20 03:14 sun3_41
drwxr-xr-x 2 root root 2048 1994-09-16 23:01 sun3_mach
drwxrwxrwx 7 root root 2048 1996-04-18 23:23 sun4_40
drwxrwxrwx 7 root root 2048 1996-04-18 23:23 sun4_40c
drwxrwxrwx 7 root root 2048 1996-04-18 23:23 sun4_41
drwxrwxrwx 5 root root 2048 1992-02-18 11:29 sun4_411
drwxr-xr-x 2 2229246 daemon 2048 1994-04-13 09:26 sun4_413
drwxr-xr-x 2 2230546 root 2048 1995-01-20 03:48 sun4_53
drwxr-xr-x 2 2230546 root 2048 1995-07-12 14:47 sun4_54
drwxr-xr-x 2 2230546 uucp 2048 1996-06-26 15:04 sun4_55
lrwxr-xr-x 1 backup root 8 1990-06-07 06:29 sun4c_40 -> sun4_40c
drwxrwxrwx 6 root root 2048 1990-11-20 03:14 sun4c_41
drwxrwxrwx 6 root root 2048 1991-10-11 10:45 sun4c_411
lrwxr-xr-x 1 2232100 root 9 1993-05-21 04:55 sun4m_412 -> sun4c_411
drwxr-xr-x 3 backup root 2048 1992-08-02 12:55 sun4_mach
drwxr-xr-x 2 2229885 daemon 2048 2000-12-09 05:14 sun4x_57
drwxr-xr-x 3 backup root 2048 1990-06-29 05:36 sunos
drwxr-xr-x 2 2230546 root 2048 1999-07-07 14:32 system
lrwxr-xr-x 1 backup root 2 1989-03-24 04:30 unix -> os
drwxr-xr-x 2 root root 208896 2006-09-15 00:37 user
lrwxr-xr-x 1 backup root 4 1990-07-17 01:47 usr -> user
drwxr-xr-x 3 backup root 2048 1989-08-31 06:39 vax_22
drwxr-xr-x 3 root root 2048 1992-08-02 12:57 vax_mach
drwxr-xr-x 49 root root 8192 2005-01-05 02:32 Web
(未完待续)
评论这张
转发至微博
转发至微博
评论