OpenAFS-Gentoo-HOWTO
|
OneLiner › OnlineBanking › OnlineBanking/Mozilla › Online_test › Open Project › OpenAFS-Gentoo-HOWTO 2 ϱ ˾ƾ ¶밭 :
ϴ 鿡, ټ Replica Ͽ /л 뵵 Ȯϱ .
Ŭ̾Ʈ 鿡, ټ Ʈ ʿ , (Cell) ̵忡 ټ 丮 ִ.
Cell Ʈũ AFS ѹ ̸ ǹ̷ Ǹ, AFS νϴ Ͻý Ƽ(partition), AFS Ǵ Ͻý (Volume) ̶ θ.
2.2 ִ νϽ鿡 Ͽ ¶ ִ νϽ :
̰ ؾ , ý лų ֱ ̴. ϳ OpenAFS ּ (kaserver) / (buserver) / ؼ(ptserver) / VLDB(vlserver) / ( κ) Ʈ (upserver) νϽ ־ ϸ, ¹ 丮 ϴ Ŭ̾Ʈ κ Ʈ (upclientetc) / κ Ʈ (upserver) / (fs) νϽ ּ ִ.
Ʈ/ý ȯ л Ѵٸ ͺ̽ Replication ϴ л ų ִ. 丮 Replication ϱ л ִ ͵ ϳ̴.
Ͽ ʴ. ּ, ʰ 濡 ҿ Ѵٸ ̴.
3.2 OpenAFS ġ ¶, OpenAFS ġؾ Ѵ.
root@afsdisk1 # emerge net-fs/openafs
, openafs-kernel openafs Ű ġ ̴. ɾ Ŀ ̳ʸ ̴. Ʈ غڸ,2.6.18 ֽ Ŀο ̴.
3.3 BOS (Basic Over Seer) Server ʱ ¶ ġ 丮(/etc/openafs) CellServDB ϰ ThisCell ִµ, 鿩ٺ ߸(?) ʱȭ ִ. ʱȭ , .
root@afsdisk1 # rm -f /etc/openafs/CellServDB root@afsdisk1 # rm -f /etc/openafs/ThisCell ps. afs ִٸ /etc/openafs/BosConfig ϵ ϵѴ.
, bosserver ʱȭ:
root@afsdisk1 # bosserver -noauth &&
3.4 Cell ̸ ¶/ лǾ ִ Storage Pool ֱ , ϴ ؾ Ѵ. OpenAFS Cell ̸ 丮 Ǯ Ѵ. Ŵ, powercell ̴.
Cell ̸ Ŭ̾Ʈ Ʈ ؾ ̸̱ , ǵ̸ ª ̴.
Ʒ , afsdisk1.testbed.org powercell ̶ ̸ ش.
root@afsdisk1 # bos setcellname afsdisk1.testbed.org powercell -noauth
3.5 ͺ̽ ¶ , bos create ɾ , /etc/openafs/BosConfig Ͽ ͺ̽ μ ְ߰, ϴ ̴. Ʒ 4 μ µ, ̴ ԵǴ 丮 Ǵ ƴ϶, ϴ ͺ̽ ӽſ Ǵ ̴.
ϴ ߰ ϱ , Ѵ:
μ ġ afssrvdir (1.2 丮 ǥ Ұ), /usr/libexec/openafs 丮 ִ.
3.5.1 ͺ̽ ¶ , 4 /ϱ , Ʒ Ͽ:
root@afsdisk1 # bos create afsdisk1.testbed.org kaserver simple \ /usr/libexec/openafs/kaserver -cell powercell -noauth root@afsdisk1 # bos create afsdisk1.testbed.org buserver simple \ /usr/libexec/openafs/buserver -cell powercell -noauth root@afsdisk1 # bos create afsdisk1.testbed.org ptserver simple \ /usr/libexec/openafs/ptserver -cell powercell -noauth root@afsdisk1 # bos create afsdisk1.testbed.org vlserver simple \ /usr/libexec/openafs/vlserver -cell powercell -noauth 3.5.2 ͺ̽ Ȯ ¶ 4 , bos status ¸ ִ. ¸ ˾ƺ: ̶ Ʒó ̴.
root@afsdisk1 # bos status afsdisk1.testbed.org -noauth Instance kaserver, currently running normally. Instance buserver, currently running normally. Instance ptserver, currently running normally. Instance vlserver, currently running normally. 3.6.1 kas ¶̸ kas Ѵ. Ʒ :
ǥ , kas :
root@afsdisk1 # kas -cell powercell -noauth
ϸ, ka> Ʈ ߰ ̴. create Ͽ Ʈ ϰ, examine Ͽ Ʈ ˻Ѵ. setfields Ͽ, admin νĽŰ ȴ. Ʒ ϵ :
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 2651715259, last cpw: Mon Jun 4 20:49:30 2001 password will never expire. An unlimited number of unsuccessful authentications is permitted. entry never expires. Max ticket lifetime 100.00 hours. last mod on Mon Jun 4 20:49:30 2001 by <none> permit password reuse ka> setfields admin -flags admin ka> examine admin User data for admin (ADMIN) key (0) cksum is 2651715259, last cpw: Mon Jun 4 20:49:59 2001 password will never expire. An unlimited number of unsuccessful authentications is permitted. entry never expires. Max ticket lifetime 25.00 hours. last mod on Mon Jun 4 20:51:10 2001 by <none> permit password reuse ka> 3.6.2 ڸ Ʈ ߰ϴ ¶ , kas Ͽ Ʈ ߰ؾ Ѵ. admin Ʈ(/etc/openafs/server/UserList) ߰ϵ . 뿹 Ʒ :
:
ʷ Ʒ , admin Ʈ ߰ߴ:
root@afsdisk1 # bos adduser afsdisk1.testbed.org admin -cell powercell -noauth
(admin ̿ܿ) ڴ, ptserver Ǿ ̴.
3.7 AFS ȣȭ Ű ϱ ¶ AFS ȣȭ Ű ؾ Ѵ. bos addkey Ͽ, ִ. :
, ȣ Ű ϴµ, Ű ڽ afs Ű ϰ ־ Ѵ.
3.8 (ptserver) ؼ ͺ̽ admin ϱ ¶pts createuser ɾ ؼ, ؼ ͺ̽ admin ڸ Ʈ ؾ Ѵ.
, Ʒ ɾ ߴ: , admin UID 1002̶, -id 1002 ٿִ ̴.
root@afsdisk1 # pts createuser -name admin -id 1002 -cell powercell -noauth
ڰ system:administrators 쿡 Ե ֵ, pts adduser Ͽ 쿡 ԽŰ, pts membership Ȯϵ . Ʒ ˾Ƽ ϰ İ鼭 .
root@afsdisk1 # pts adduser admin system:administrators -cell powercell -noauth root@afsdisk1 # pts membership admin -cell powercell -noauth Groups admin (id: 1002) is a member of: system:administrators 3.9 AFS ¶ , AFS ϵ .
Ʒ :
, Ʒ Ͽ AFS :
root@afsdisk1 # bos restart afsdisk1.testbed.org -all -cell powercell -noauth
3.10 fs νϽ : , , Salvager μ ¶ bos create ٽ Ͽ, ϼ, , Salvager ϰ, ؾ Ѵ. ̵ 3 μ ٸ μ /usr/libexec/openafs ְ, fileserver, volserver, salvager ̸ ´.
߰ϴ , Ʒ :
, Ʒ ɹ ϸ ȴ:
root@afsdisk1 # bos create afsdisk1.ucsoft.org fs fs \ /usr/libexec/openafs/fileserver /usr/libexec/openafs/volserver \ /usr/libexec/openafs/salvager -cell powercell -noauth 3.10.1 OpenAFS μ Ȯ ¶ μ Ͽ, μ ִ Ȯ ִ: bos status Ѵ.
Ͽ, ϸ ȭ ´:
root@afsdisk1 # bos status afsdisk1.testbed.org -long -noauth Instance kaserver, (type is simple) currently running normally. Process last started at Sun Nov 19 00:55:34 2006 (14 proc starts) Last exit at Sun Nov 19 00:52:08 2006 Command 1 is '/usr/libexec/openafs/kaserver' Instance buserver, (type is simple) currently running normally. Process last started at Sun Nov 19 00:56:08 2006 (14 proc starts) Last exit at Sun Nov 19 00:52:08 2006 Command 1 is '/usr/libexec/openafs/buserver' Instance ptserver, (type is simple) currently running normally. Process last started at Sun Nov 19 00:56:11 2006 (14 proc starts) Last exit at Sun Nov 19 00:52:08 2006 Command 1 is '/usr/libexec/openafs/ptserver' Instance vlserver, (type is simple) currently running normally. Process last started at Sun Nov 19 00:56:17 2006 (14 proc starts) Last exit at Sun Nov 19 00:52:08 2006 Command 1 is '/usr/libexec/openafs/vlserver' Instance fs, (type is fs) currently running normally. Auxiliary status is: file server running. Process last started at Sun Nov 19 00:55:34 2006 (4 proc starts) Last exit at Sun Nov 19 00:55:34 2006 Command 1 is '/usr/libexec/openafs/fileserver' Command 2 is '/usr/libexec/openafs/volserver' Command 3 is '/usr/libexec/openafs/salvager' 3.11 Fileserver UDP ̽ ¶afslocaldir (/var/lib/openafs) NetInfo ϴ , ý Ʈ ̽ ̵ Ѵ.
/var/lib/openafs 丮 ̵, NetInfo ̸ ؽƮ ۼѴ.
Է IP ־ִµ, Ѵ:
192.168.0.21 127.0.0.1 , bos restart , Fileserver ϵ Ѵ.
4 OpenAFS Cell Volume ¶OpenAFS ϱ ι°, ǰ (Volume) /߰ϴ ̴ܶ. ܶ ִ ū ڸ ٸ, ū ھȿ ̴.
Cell Volume ó Ѵٸ, ΰ ϶. ù° ּ root.afs root.cell ݵ ʿϴ ؾ Ѵ. ι° ٸ ýۿ ܼ ϱ , տ ؿԴ ͺ̽ ٸ ýۿ ʿ ̴. ݵ صΰ, ؾ ̴.
4.1 ũ غ ¶ ũ Ƽ ɰ, ũ Ƽǿ , ϵ Ƽ ʿϴ: AFS ߰ ũ ij ϱ , ý ext2, Ȥ ext3 Ѵ. ٸ Ƽ , ϱ ϴ. (reiserfs , ϸ ſ ̴)
غ Ǿ, Ʈ 丮 vicepX 丮 Ѵ. (X ġ ȣϴ ִ´. a ֵ b ֵ, ҹڷ ִ´. ⼭ vicepa ϰڴ.)
root@afsdisk1 # mkdir /vicepa
/etc/fstab 丮 Ƽ Ʈϰ Ѵ. /etc/fstab Ʒ ߰ ̴: Ʒ , ϴ ļ ϵ .
/dev/hda4 /vicepa ext3 defaults 0 2
, /etc/fstab , Ʈ ϵ . Ʒ , /dev/hda4 /vicepa 丮 Ʈ ̴.
root@afsdisk1 # mount -a
4.2 ( ) ͺ̽ ϱ ¶ κ ù° AFS ϴ, root.afs ù° AFS ϴ κ̴.
Ʒ :
root@afsdisk1 # vos create afsdisk1.testbed.org /vicepa root.afs -cell powercell -noauth Volume 536870912 created on partition /vicepa of afsdisk1.testbed.org , ش ũⰡ Ե ̴.
'partition /vicep01 does not exist on the server' , ش Ƽ Ʈ ϰ, bos restart õ ϸ ȴ.
4.3 κп Update ¶ Ե ٸ ӽŵ鿡 ̵ 丮 ϱ , ( ) Update (upserver μ) ؾ Ѵ. ̵ ٸ ӽſ, ߰ Ŭ̾Ʈ Update Server Ȱȭ ȴ.
Ʒ :
, Update :
root@afsdisk1 # bos create afsdisk1.testbed.org upserver simple \ "/usr/libexec/openafs/upserver -crypt /etc/openafs/server -clear /usr/libexec/openafs" \ -cell powercell -noauth 4.4 Ŭ̾Ʈ κ Update ¶Ŭ̾Ʈ κ Update 2 . ϳ OpenAFS (Database) ý ƿ(, /etc/openafs/server ϴ ƿ), ȭ ϴ upclientetc , ̳ʸ κ AFS ̳ʸ ȭϴ upclientbin ִ. Thin Client ƴ϶, ⺻δ upclientetc ϸ ȴ.
ܼ upclientetc Բ, κп Update (, upserver) ΰ ʿ Ѵ.
upclientetc ϴ :
ٰŷ, upclientetc غ: OpenAFS //ؼ/VLDB ͺ̽ ġ afsdisk1.testbed.org ϶, ܼ Ҹ ϴ afsdisk2 ֱ߰ ؼ, Ͽ upclientetc ̴.
root@afsdisk2 # bos create afsdisk2.testbed.org upclientetc simple \ "/usr/libexec/openafs/upclient afsdisk1.testbed.org /etc/openafs/server" \ -cell powercell -noauth 4.5 Deprecated: AFS ۵ϱ ð ȭ ¶ ܶ ſ, ntpclient + cron ð ֱ ȭ ϸ ȴ. GentooLinux openafs runntp ʴ.
, ̸ ϱ ntpd ̾ Ѵ. ( 忡 ʿϴٰ ߴ ó) ƴϸ, ּ ܺ ntp ּҸ ˰ ־ ̴.
ܶ runntp μ , ð ȭ ϴ Ϳ ̴:
Ͽ runntp μ Ѵ:
root@afsdisk1 # bos create afsdisk1.testbed.org runntp simple \ "runntp afsdisk1.testbed.org" -cell powercell -noauth 4.6 ϰ Ʈ ϱ ¶ó AFS Ͽ, root.afs 쿡 Ʈ ؾ Ѵ. ( ʰ, root.afs Ǿ ִٸ, Ŭ̾Ʈ ̵忡 Ŀ 丮 " ġ " ̶ ̴)
Ʒ :
ٰŷ, root.cell ϵ .
root@afsdisk1 # vos create afsdisk1.testbed.org /vicepa root.cell
5 OpenAFS Client ¶ Ȱϱ ؼ 翬 Ŭ̾Ʈ ʿϴ. ܶ, Ŭ̾Ʈ ϴ ̴.
, Ŭ̾Ʈ ϱ ؼ 翬, net-fs/openafs Ű ʿϴ. Է϶:
root@hostname # emerge net-fs/openafs
5.1 Client ¶, /etc/openafs 丮 CellServDB ThisCell ؾ Ѵ. ϴ , IP Cell name Ű ؾ ϴµ, Ǿ ִ ΰ ؼ ؾ Ѵ.
, /etc/openafs/CellServDB ´. ̶ , # ڿ ٴ ּó ƴ϶ ̴. ݵ >Cellname Ŀ #Cell name ̶ Ѵ. Ʒٿ IP ϰ, ٽ Ŀ #hostname(.domain.name) Ѵٴ ̴.
>powercell #Cell name 192.168.0.21 #afsdisk1
powercell
5.2 Ŭ̾Ʈ ؿ ij ¶Ŭ̾Ʈ AFS ijø κп ij ϰ ȴ. ġ /etc/openafs/cacheinfo Ǹ, ⺻ /var/cache/openafs Ʒ ijð ǵ Ǿ ִ. 밭 Ʒ :
/afs:/var/cache/openafs:200000
⺻ 200MByte , /afs ƮǴ AFS Ͻý /var/cache/openafs ijø ϰڴٰ Ǿ ִ.
̹ ext2/ext3 ý ϰ ִٸ, Ʒ ̻ 캼 ʿ䰡 .
, dd ؼ Ȯϵ .
root@hostname # dd if=/dev/zero of=/ext2part4afs.img bs=1024M count=2
ɾ ؼ 2GB zero-filled Ȯϸ, mkfs ؼ ext2 ̹ :
root@hostname # mkfs.ext2 /ext2part4afs.img
̽ ƴ϶ ϸ, ŭϰ ϰ ϸ ȴ.
ϰ, /etc/fstab ϰ, ijð 丮 Ȯϵ . ̹ /var/cache/openafs 丮 , ش 丮 ֵ ؾ Ѵ.
/etc/fstab Ͽ ߰Ѵ.
# AFS cache ¸¦ À§ÇÑ ¼³Á¤. /ext2part4afs.img /var/cache/openafs ext2 loop,defaults 0 0 , mount -a Ͽ ش ̹ loopback mount .
, /etc/openafs/cacheinfo . ext2 Ƽ ٲ ̹ 2GB ̹Ƿ, Ʈ Ͻý 뷮 Ȯϰ ϰ ־.
/afs:/var/cache/openafs:1800000
Ʈ ijø Ȯϴ, ӵ ϰ ִ. ̸ ؼ chunksize ϴµ, 2^n ų ִ. (ɼ Է° n̴)
/etc/init.d/openafs-client λ , ij ũ 缭 ɼ Ǿ ִ: , /etc/conf.d/openafs-client , ڽ ij ´ ã ̴. (ٸ ص ȴ.)
, ijû ä ̷:
/etc/conf.d/openafs-client ,
OPTIONS="AUTOMATIC"
̶ Ǿ ִµ, ڽ ϴ ϰ ϰ 쿡, SMALL / MEDIUM / LARGE / XLARGE / XXLARGE ִ.
߿Ѱ, chunksize Ѵٴ ε, ̰ ⺻ 0̴. 2^n ϸ, ij 1GB~2GB ؿ 2^18 = 256 Kilobyte, -chunksize 18 ִ .
δ $XLARGE õ ̹Ƿ, ( 1.8GB ij) XLARGE , -chunksize 18 ߰:
XLARGE="-fakestat -stat 3600 -dcache 3600 -daemons 5 -volumes 196 -files 50000 -chunksize 18"
ص, AFS ϰ ϰ ص, ̴.
5.3 openafs-client ¶ , ijø ϴµ ƹ , openafs-client ؾ Ѵ. ԷϿ, openafs-client Ѵ. ̰ ϸ, ڵ AFS Ŀ ǰ, /afs/cellname ̴.
root # /etc/init.d/openafs-client start
5.4 kaserver αϴ ¶ ص, ϸ ۹̼ ٰ ̴. klog α kaserver ū Ƴ Ѵ. ǰ ۵Ǿٸ, ϴ:
username@hostname > klog <AFS »ç¿ëÀÚ ¸í>
Ǹ, ׳ ƹ ٽ Ʈ ̴. admin ߾ٸ, AFS admin Էϸ ̴. н , ڽ Էߴ н带 ϸ ȴ.
, /afs/cellname . ȴٸ, OK.
6.1 (û) *NIX ý α AFS Login ÿ ϰ ¶AFS PAM ְ ش. ̴:
/lib/security 丮 pam ̺귯 ִ. openafs ġϸ, 丮 pam_afs.so.1 pam_afs.krb.so.1 ߰ ̴.
츮 ؾ login ϴ /etc/pam.d/system-auth , su ̵ ϴ /etc/pam.d/su ִ.
/etc/pam.d/system-auth Ѵ:
#%PAM-1.0 auth required pam_env.so auth sufficient pam_unix.so try_first_pass likeauth nullok # AFS¸¦ À§ÇØ Ãß°¡ÇÑ ºÎºÐÀº ¾Æ·§ÁÙÀÌ´Ù. auth sufficient pam_afs.so.1 use_first_pass ignore_root auth required pam_deny.so account required pam_unix.so password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 try_first_pass retry=3 password sufficient pam_unix.so try_first_pass use_authtok nullok md5 shadow password required pam_deny.so session required pam_limits.so session required pam_unix.so /etc/pam.d/su Ʒ Ѵ. (ּ Ǿ. ϰ ):
#%PAM-1.0 # AFS¸¦ À§ÇØ Ãß°¡µÈ ºÎºÐÀº ¹Ù·Î ¾Æ·§ÁÙÀÌ´Ù. auth sufficient pam_afs.so.1 ignore_uid 100 auth sufficient pam_rootok.so auth required pam_wheel.so use_uid auth include system-auth account include system-auth password include system-auth session include system-auth session required pam_env.so session optional pam_xauth.so 6.2 AFS (ACL) ¶system:administrators ѿ, Ȥ ACL ִ , fs setacl Ͽ ϸ ȴ.
fs setacl : ߰ ɼ, fs help setacl Ȯϱ ٶ.
丮 Ʈ Ʈ 丮(: /afs/powercell) ְ, acl ִ:
AFS ߰ ǵ Ʈ ְ ش: 빮 A, B, C, D, E, F, G, H - 8 - ִ. AFS α , ̵ flag ǹ̸ οϰ, ְ ش. -clear ɼ ACL Ʈ ִ ɼ̰, -negative Ҵ ݴ ÷ ȭش. -id/-if 丮/Ͽ ʱ Ҵ ϴ ɼ̴.
6.3 Ե Ʈ ȭϱ ¶vos / ġ ͺ̽ õ ۾ ϴ ̴. ̸ ̿Ͽ, 鿡 //Ʈ ȭ ִ. ܶ , ִ Ʈ ȭ (sync VLDB) ϰ, ȭ (sync Server) ϰ ϴ ̴.
VLDB/ ȭ ִ: VLDB ȭ, Ʒ ȭ̴.
, vldb Ʈ Ȯ ִ:
# vos listvldb
Ŭ̾Ʈ ϸ, Ʈ ̴.
6.5.1 klog (delay) ¶klog ϴµ ̰ ٸ, ϴ Ȯغ. /etc/openafs/CellServDB ù° ְ, νϽ ۵ϴ bos status Ȯغ ٶ. ܼ init.d ũƮ , νϽ Ŷ ƹ Ѵ. (init.d ũƮ bos ߴ Ȯ ̴)
6.5.2 VLDB ý ¶Kerberos ƹ , vos listvldb Ŭ̾Ʈ ν VLDB µ ִ. κ , ش OpenAFS / Ѵ. /etc/resolv.conf Ӽ Ȯϰ Ű ִ, Ȥ hostname ã´ٸ domainname ڵ ִ Ȯ ̴. ʿϸ, NSCD(Name Server Caching Daemon) ϰų õ ڵ ϵǰԲ ϴ ߰ ִ.
6.6 AFS ġũ Ͽ ¶ AFS ˻ϱ , ִ: ϴ ͵δ ִ.
|
Executive ability is prominent in your make-up. |









![[http]](/imgs/http.png)
Cell ̸ Ŭ̾Ʈ Ʈ ؾ ̸̱ , ǵ̸ ª ̴.
ܶ ſ, ntpclient + cron ð ֱ ȭ ϸ ȴ. ![[https]](/imgs/https.png)