接上回。。。
今天终于成功的将linux端服务器启动,并且于windows客户端成功连接,实现了AFS的基本存储、备份、帐户管理等基本功能。
期间发现了之前的许多问题。为了保证思路的完整性,这里还是继续沿用之前的叙述。后面再把完整的步骤整理出来。在这里
要感谢中科院高能物理研究所计算中心的许工!!因为有了他的几次指点才让后面的一些问题有了思路。
重启完服务器之后。
启动fs程序,主要包括:fileserve、volserver、salvager服务器。
# bos create <server name> fs fs /usr/afs/bin/fileserver /usr/afs/bin/volserver /usr/afs/bin/salvager -cell <cell name> -noauth 用命令看看详细的执行情况:
[root@jncc work]# bos status jncc.edu.cn -long -noauth
Instance kaserver, (type is simple) currently running normally.
Process last started at Thu Mar 4 20:52:34 2010 (2 proc starts)
Last exit at Thu Mar 4 20:52:34 2010
Command 1 is '/usr/afs/bin/kaserver'
Instance buserver, (type is simple) currently running normally.
Process last started at Thu Mar 4 20:52:34 2010 (2 proc starts)
Last exit at Thu Mar 4 20:52:34 2010
Command 1 is '/usr/afs/bin/buserver'
Instance ptserver, (type is simple) currently running normally.
Process last started at Thu Mar 4 20:52:34 2010 (2 proc starts)
Last exit at Thu Mar 4 20:52:34 2010
Command 1 is '/usr/afs/bin/ptserver'
Instance vlserver, (type is simple) currently running normally.
Process last started at Thu Mar 4 20:52:34 2010 (2 proc starts)
Last exit at Thu Mar 4 20:52:34 2010
Command 1 is '/usr/afs/bin/vlserver'
Instance fs, (type is fs) currently running normally.
Auxiliary status is: file server running.
Process last started at Thu Mar 4 20:53:04 2010 (2 proc starts)
Command 1 is '/usr/afs/bin/fileserver'
Command 2 is '/usr/afs/bin/volserver'
Command 3 is '/usr/afs/bin/salvager'
好像没有什么问题。
到这里服务器应该算是启动了。
下面开始配置文件系统了
先建立根分区,root.afs这是对应目录中/afs目录的分区。
[root@jncc work]# vos create jncc.edu.cn /vicepa root.afs -cell afs.server -noauth
Volume 536870912 created on partition /vicepa of jncc.edu.cn
然后启动更新服务器
[root@jncc work]# bos create jncc.edu.cn upserver simple "/usr/afs/bin/upserver -crypt /usr/afs/etc -clear /usr/afs/bin" -cell afs.server.edu -noauth
设定文件顶层,/afs目录的权限
[root@jncc work]# fs setacl /afs system:anyuser rl
fs:'/afs': Function not implemented
无法完成!(冷汗。。。)
到网上去搜,有人遇到过这个问题,但是解决方法是。。。。没有!!!
算了,先放弃权限,继续。。。。
建立root.cell分区,并且将它挂载到/afs/<cell name>并把读写挂到/afs/.<cell name>
[root@jncc work]# vos create jncc.edu.cn /vicepa root.cell
vsu_ClientInit: Could not get afs tokens, running unauthenticated.
Volume 536870915 created on partition /vicepa of jncc.edu.cn
[root@jncc work]# fs mkmount /afs/afs.server.edu root.cell
[root@jncc work]# fs setacl /afs/afs.server.edu system:anyuser rl
fs:'/afs/afs.server.edu': Function not implemented
[root@jncc work]# fs mkmount /afs/.afs.server.edu root.cell -rw
[root@jncc work]#
貌似问题不少,首先是我没有取得权限,然后是fs setacl仍然不能用。
不管,查看一下结果
[root@jncc etc]# vos listvol jncc.edu.cn
vsu_ClientInit: Could not get afs tokens, running unauthenticated.
Total number of volumes on server jncc.edu.cn partition /vicepa: 2
root.afs 536870912 RW 2 K On-line
root.cell 536870915 RW 2 K On-line
居然成功创建了分区。
服务器端难道就可以了吗??
事实是,不行,windows客户端无法连接上。
整个成功或失败的操作,以及系统反馈如下
export PATH:$PATH:/usr/afs/bin
[root@jncc work]# bosserver -noauth &
[1] 3653
[root@jncc work]# bos setcellname jncc.edu.cn afs.server.edu -noauth
[1]+ Done bosserver -noauth
[root@jncc work]# bos create jncc.edu.cn kaserver simple /usr/afs/bin/kaserver -cell afs.server.edu -noauth
[root@jncc work]# bos create jncc.edu.cn buserver simple /usr/afs/bin/buserver -cell afs.server.edu -noauth
[root@jncc work]# bos create jncc.edu.cn ptserver simple /usr/afs/bin/ptserver -cell afs.server.edu -noauth
[root@jncc work]# bos create jncc.edu.cn vlserver simple /usr/afs/bin/vlserver -cell afs.server.edu -noauth
[root@jncc work]# bos status jncc.edu.cn -noauth
Instance kaserver, currently running normally.
Instance buserver, currently running normally.
Instance ptserver, currently running normally.
Instance vlserver, currently running normally.
[root@jncc work]# kas -cell afs.server.edu -noauth
ka> create afs
initial_password:
Verifying, please re-enter initial_password:
ka> create admin
initial_password:
Verifying, please re-enter initial_password:
ka> examine afs
User data for afs
key (0) cksum is 2450523212, last cpw: Thu Mar 4 20:47:07 2010
password will never expire.
An unlimited number of unsuccessful authentications is permitted.
entry never expires. Max ticket lifetime 100.00 hours.
last mod on Thu Mar 4 20:47:07 2010 by <none>
permit password reuse
ka> setfields admin -flags admin
ka> examine admin
User data for admin (ADMIN)
key (0) cksum is 1361154845, last cpw: Thu Mar 4 20:47:22 2010
password will never expire.
An unlimited number of unsuccessful authentications is permitted.
entry never expires. Max ticket lifetime 25.00 hours.
last mod on Thu Mar 4 20:48:04 2010 by <none>
permit password reuse
ka> quit
[root@jncc work]# bos adduser jncc.edu.cn admin -cell afs.server.edu -noauth
[root@jncc work]# bos addkey jncc.edu.cn -kvno 0 -cell afs.server.edu -noauth
input key:
Retype input key:
[root@jncc work]# pts createuser -name admin -cell afs.server.edu -noauth
User admin has id 1
[root@jncc work]# pts adduser admin system:administrators -cell afs.server.edu -noauth
[root@jncc work]# pts membership admin -cell afs.server.edu -noauth
Groups admin (id: 1) is a member of:
system:administrators
[root@jncc work]# bos restart jncc.edu.cn -all -cell afs.server.edu -noauth
[root@jncc work]# bos create jncc.edu.cn fs fs /usr/afs/bin/fileserver /usr/afs/bin/volserver /usr/afs/bin/salvager -cell afs.server.edu -noauth
[root@jncc work]# bos status jncc.edu.cn -long -noauth
Instance kaserver, (type is simple) currently running normally.
Process last started at Thu Mar 4 20:52:34 2010 (2 proc starts)
Last exit at Thu Mar 4 20:52:34 2010
Command 1 is '/usr/afs/bin/kaserver'
Instance buserver, (type is simple) currently running normally.
Process last started at Thu Mar 4 20:52:34 2010 (2 proc starts)
Last exit at Thu Mar 4 20:52:34 2010
Command 1 is '/usr/afs/bin/buserver'
Instance ptserver, (type is simple) currently running normally.
Process last started at Thu Mar 4 20:52:34 2010 (2 proc starts)
Last exit at Thu Mar 4 20:52:34 2010
Command 1 is '/usr/afs/bin/ptserver'
Instance vlserver, (type is simple) currently running normally.
Process last started at Thu Mar 4 20:52:34 2010 (2 proc starts)
Last exit at Thu Mar 4 20:52:34 2010
Command 1 is '/usr/afs/bin/vlserver'
Instance fs, (type is fs) currently running normally.
Auxiliary status is: file server running.
Process last started at Thu Mar 4 20:53:04 2010 (2 proc starts)
Command 1 is '/usr/afs/bin/fileserver'
Command 2 is '/usr/afs/bin/volserver'
Command 3 is '/usr/afs/bin/salvager'
[root@jncc work]# vos create jncc.edu.cn /vicepa root.afs -cell afs.server -noauth
Volume 536870912 created on partition /vicepa of jncc.edu.cn
[root@jncc work]# bos create jncc.edu.cn upserver simple "/usr/afs/bin/upserver -crypt /usr/afs/etc -clear /usr/afs/bin" -cell afs.server.edu -noauth
[root@jncc work]# fs setacl /afs system:anyuser rl
fs:'/afs': Function not implemented
[root@jncc work]# vos create jncc.edu.cn /vicepa root.cell
vsu_ClientInit: Could not get afs tokens, running unauthenticated.
Volume 536870915 created on partition /vicepa of jncc.edu.cn
[root@jncc work]# fs mkmount /afs/afs.server.edu root.cell
[root@jncc work]# fs setacl /afs/afs.server.edu system:anyuser rl
fs:'/afs/afs.server.edu': Function not implemented
[root@jncc work]# fs mkmount /afs/.afs.server.edu root.cell -rw
[root@jncc work]#
[root@jncc etc]# vos listvol jncc.edu.cn
vsu_ClientInit: Could not get afs tokens, running unauthenticated.
Total number of volumes on server jncc.edu.cn partition /vicepa: 2
root.afs 536870912 RW 2 K On-line
root.cell 536870915 RW 2 K On-line
Total volumes onLine 2 ; Total volumes offLine 0 ; Total busy 0
到此,有一下几个问题:
1、fs 指令中大部分不能执行[现在已经解决]
2、系统重启后CellServDB内容还原而导致系统无法正常使用[现在已解决]
3、无法获取令牌[现在已经解决]
4、用klog登陆检测客户机,显示错误[现在已经解决]
5、系统启动时,提示没有加载openafs-client 模块[现在已经解决]
下面一篇将把问题如何解决的记录一下。并且整理一下整个系统搭建的思路。