OpenAFS kasutamine Debianiga
Allikas: Kuutõrvaja
Sisukord
Sissejuhatus
TODO
Tööpõhimõte
TODO
Kerberose serveri ettevalmistamine
[libdefaults]
... allow_weak_crypto = true
OpenAFS server
TODO
Tarkvara paigaldamine
Paigaldamiseks tuleb öelda
# apt-get install openafs-{fileserver,dbserver,client,krb5}
Paigaldamise käigus kompileeritakse sellised tuuma moodul
/lib/modules/2.6.32-5-amd64/updates/dkms/openafs.ko
kusjuures Debian Squeeze puhul kasutatakse DKMS tehnikat
.. Starting AFS services: AFS module /lib/modules/2.6.32-5-amd64/fs/openafs.o does not exist. Not starting AFS. Please consider building kernel modules using instructions in /usr/share/doc/openafs-client/README.modules Setting up openafs-modules-dkms (1.4.12.1+dfsg-2) ... Loading new openafs-1.4.12.1 DKMS files... First Installation: checking all kernels... Building for 2.6.32-5-amd64 and 2.6.32-trunk-amd64 Building initial module for 2.6.32-5-amd64 Done. openafs.ko: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/2.6.32-5-amd64/updates/dkms/ depmod...... DKMS: install Completed. Module build for the currently running kernel was skipped since the kernel source for this kernel does not seem to be installed. Processing triggers for menu ...
Serveri seadistamine
# bosserver -noauth # bos setcellname afs-server.loomaaed loomaaed -noauth # bos listhosts afs-server.auul -noauth Cell name is loomaaed Host 1 is afs-server
# bos listkeys afs-server.loomaaed -localauth key 3 has cksum 3204030878 Keys last changed on Fri Jul 9 22:21:21 2010. All done.
# aklog # klist Ticket cache: FILE:/tmp/krb5cc_0 Default principal: root/admin@LOOMAAED Valid starting Expires Service principal 07/09/10 23:37:17 07/10/10 09:37:17 krbtgt/LOOMAAED@LOOMAAED renew until 07/10/10 23:37:15 07/09/10 23:46:04 07/10/10 09:37:17 afs@LOOMAAED renew until 07/10/10 23:37:15
# tokens Tokens held by the Cache Manager: User's (AFS ID 1) tokens for afs@loomaaed [Expires Jul 10 09:37] --End of list--
Töötavad protsessid
root 24479 0.0 0.7 9484 3952 ? Ss 23:35 0:00 /usr/sbin/bosserver root 24483 0.0 1.2 13876 6244 ? S 23:35 0:00 /usr/lib/openafs/ptserver root 24485 0.0 1.6 16208 8236 ? S 23:35 0:00 /usr/lib/openafs/vlserver root 24488 0.0 1.9 298736 10012 ? S<l 23:35 0:00 /usr/lib/openafs/fileserver -p 23 \ -busyat 600 -rxpck 400 -s 1200 -l 1200 -cb 65535 -b 240 -vc 1200 root 24489 0.0 0.4 124424 2144 ? Sl 23:35 0:00 /usr/lib/openafs/volserver root 24559 0.0 0.0 6324 404 ? Ss 23:35 0:00 /sbin/afsd -afsdb -dynroot -fakestat
OpenAFS klient
Tarkvara paigaldamine
# apt-get install openafs-client openafs-krb5
Paigaldamisel debconf küsib
- AFS cell nime, vastata nt 'loomaaed'.
- AFS vahelao (ingl. k. cache) suurust, nt 50000 (kB)
Tarkvara seadistamine
Lisada /etc/openafs/CellServDB faili sissekanna oma AFS serveri kohta, nt
>loomaaed #Cell name 192.168.10.206 #afs-server.loomaaed
Käivitamine
# /etc/init.d/openafs-client start Starting AFS services: openafs afsd. afsd: All AFS daemons started.
Tulemusena monteeritaks külge /afs ressurss
# df -h Filesystem Size Used Avail Use% Mounted on ... AFS 8.6G 0 8.6G 0% /afs
AFS kliendis töötab mitmeid asjaga seotud protsesse, nt
root 22835 0.0 0.0 6328 404 ? Ss 10:12 0:00 /sbin/afsd -afsdb -dynroot -fakestat root 22836 0.0 0.0 0 0 ? S 10:12 0:00 [afs_callback] root 22837 0.0 0.0 0 0 ? S 10:12 0:00 [afs_rxevent] root 22838 0.0 0.0 0 0 ? S 10:12 0:00 [afs_rxlistener] root 22843 0.0 0.0 0 0 ? S 10:12 0:00 [afs_background] root 22844 0.0 0.0 0 0 ? S 10:12 0:00 [afs_background] root 22845 0.0 0.0 0 0 ? S 10:12 0:00 [afs_checkserver] root 22846 0.0 0.0 0 0 ? S 10:12 0:00 [afsd] root 22849 0.0 0.0 0 0 ? S 10:12 0:00 [afs_cachetrim]
Kliendist AFS serveri teenuste kasutamise lõpetamiseks tuleb öelda
# /etc/init.d/openafs-client stop Stopping AFS services: afsd openafs.
Kasutamine
Klientarvutis AFS serveri kasutamiseks tuleb öelda
$ kinit $ aklog