[付録] Apollo DOMAIN_OS の使い方3 ● Apollo DOMAIN 久しぶりの作業 2013/11/s * ロ−カルレジストリのデ−タをバックアップ $ wd //node_aaaaa/sys/registry $ cpf rgy_local /nix/cad/temp $ cpf rgy_local.bak /nix/cad/temp node_aaaaa は親機、node_bbbbb はディスクレス機。 * $ lcnode -me The node ID of this node is BBBBB. bbbbb で root でログイン。ロ−カルレジストリは使える。 aaaaa に $ crp -on //node_aaaa -me して。root のまま。 $ lusr root.staff.none.AAAAA //node_aaaaa $ /etc/edrgy -l Using local registry. edrgy=> v root[.staff.none]:w0UuY0sQV7sAI:0:10::/:: ktest[.none.none]::300:12::/nix/cad/ktest:: edrgy=> q $ login login: root Password: Using local registry. Can't use network registry: - Registry server unavailable (from RGYC / Server) Account entry has expired or is marked invalid. username[.group[.org]] login: 動いているデ−モンが何か足らないのでないか。glbd が動いてなかったのか、 それともいろいろいじっている内に自分で glbd を止めた気がする。 $ /etc/server /etc/ncs/glbd & やっても $ /etc/ncs/glbd & やっても、glbd は起動してこなかった。このマシン、親機を電源入れ直して再起動してみない といけないな。 $ date Tuesday, November 6, 2012 11:06:11 am (JST) $ ld /sys/node_data/etc/daemons Directory "/sys/node_data/etc/daemons": README cron glbd llbd rgyd $ lcnode The node ID of this node is AAAAA. 1 other node responded. Node ID Boot time Current time Entry Directory AAAAA 2012/06/21 1:58:38 2012/11/06 11:15:15 //node_aaaaa BBBBB 2008/05/10 9:32:44 2008/05/18 11:35:19 *** DISKLESS *** partner node: AAAAA $ pst ------------------------------------------------------------ Node: AAAAA Time: Tuesday, November 6, 2012 11:07:16 am (JST) ------------------------------------------------------------ Processor | PRIORITY | Program | State | Process Name Time (sec)| mn/cu/mx | Counter | | ------------------------------------------------------------ 11849573.217 -- -- -- -------- ----- 20663.909 -- -- -- -------- ----- 12.281 16/16/16 7608A494 Wait init 0.917 3/14/14 76089DB4 Wait mbx_helper 11109.933 3/ 7/ 7 7608A36E Wait rgyd.1.3 29801.864 3/14/14 7608A36E Wait uid = E8FC2654.F00AAAAA (rpcd) 0.436 3/14/14 7608A494 Wait root.BBBBB 2086.552 3/13/14 7608A36E Wait uid = E8FC2785.B00AAAAA (cron) 1.870 16/16/16 7608A36E Wait display_manager 0.402 3/14/14 7608A36E Wait uid = E8FC2789.000AAAAA (lpd) 0.064 3/14/14 Ready uid = EBB415DC.C00AAAAA (pst) 141.917 3/14/14 7608A36E Wait server_process_manager 27.092 3/14/14 76089DB4 Wait netman 25347.849 3/14/14 7608A36E Wait uid = E8FC2796.900AAAAA (prmgr) 15189.192 3/13/14 7608A36E Wait prsvr:p:0 ----------- 11953957.894 $ ld /sys/registry rgy_data rgy_local rgy_local.bak $ ld -a /sys/registry sys type blocks current type uid used length attr rights name dir nil 4 4096 P prwx- rgy_data file nil 28 26586 P prwx- rgy_local file nil 28 26586 P prwx- rgy_local.bak $ ld -a /sys/registry/rgy_data sys type blocks current type uid used length attr rights name file unstruct 12 8204 P prwx- acct file unstruct 8 4628 P prwx- group file unstruct 4 1528 P prwx- org file unstruct 8 7452 P prwx- person file unstruct 4 152 P prwx- replicas file unstruct 4 148 P prwx- rgy file unstruct 4 74 P prwx- rgy_state dir nil 4 4096 P prwx- unix file unstruct 4 1024 P prwx- update_log $ ld -a /sys/registry/rgy_data/unix sys type blocks current type uid used length attr rights name file unstruct 4 206 P prwx- group file unstruct 4 205 P prwx- org file unstruct 4 865 P prwx- passwd $ catf org wheel::0: apollo::1:user none::12:root,daemon,none,user,lp,admin,sys_person,uucp,bin,\ ktest sys_org::13: $ catf group wheel::0: daemon::1: bin::3:root mail::6:bin staff::10: none::12:alias,qmaild sys_proj::13: locksmith::14: login::15: backup::16:user sys_admin::17:user server::18: sys::19:root qmail::2107: nofiles::2108: $ catf passwd $ catf /etc/passwd もこれを見ているみたい。 root:w0UuY0sQV7sAI:0:10::/: daemon:w0UuY0sQV7sAI:1:12::/: bin:w0UuY0sQV7sAI:3:3::/: uucp:w0UuY0sQV7sAI:4:12::/usr/spool/uucppublic:/usr/lib/uucp/uucico none:w0UuY0sQV7sAI:12:12::/: sys_person:w0UuY0sQV7sAI:13:12::/: user:w0UuY0sQV7sAI:14:12::/: admin:w0UuY0sQV7sAI:15:12::/: lp:w0UuY0sQV7sAI:16:3::/: ktest::300:12::/nix/cad/ktest: $ /etc/edrgy ?(edrgy) Warning: the registry at site "dds://node_aaaaa" is read-only. edrgy=> q $ /etc/edrgy -s //node_aaaaa ?(edrgy) Warning: the registry at site "//node_aaaaa" is read-only. edrgy=> q レジストリ−サ−バの手動起動 $ /etc/server -p /etc/rgyd & $ /etc/ncs/glbd & glbd と rgyd をいったん殺して、再度稼働させる場合。 $ /etc/rgyd glbd はすぐ稼働する。rgyd は 数十秒かかる、& は付けないように。 この場合スレ−ブレジストリデ−モンを sigp xxx -b で止めると管理が マスタ−側に戻る。 $ /etc/edrgy -l Using local registry. edrgy=> v root[.staff.none]:w0UuY0sQV7sAI:0:10::/:: ktest[.none.none]::300:12::/nix/cad/ktest:: edrgy=> do p Domain changed to: person edrgy=> v root 0 ktest 300 edrgy=> do a Domain changed to: account edrgy=> c change account=> Enter account id [p.g.o]: ktest.none.none Enter new account id [p.g.o]: (cannot be changed) Enter new abbreviation type [p/pg/pgo]: (p) Enter new password: (cannot be changed) Enter new misc info in quotes: () Enter new home directory: (/nix/cad/ktest) Enter new shell: () (cannot be changed) Password valid [y/n]? (y) (cannot be changed) Enter new expiration date [yy/mm/dd or 'none']: (2008/03/20) (cannot be changed) Account valid for login [y/n]? (y) n change account=> Enter account id [p.g.o]: edrgy=> q * rgyd 起動しなおした 2013/11/s $ sigp rgyd.1.3 -s 止まった。 $ pst ------------------------------------------------------------ Node: AAAAA Time: Tuesday, November 6, 2012 1:12:41 pm (JST) ------------------------------------------------------------ Processor | PRIORITY | Program | State | Process Name Time (sec)| mn/cu/mx | Counter | | ------------------------------------------------------------ 11857015.087 -- -- -- -------- ----- 20685.641 -- -- -- -------- ----- 12.281 16/16/16 7608A494 Wait init 0.999 3/14/14 76089DB4 Wait mbx_helper 0.215 3/14/14 7608A36E Wait uid = EBB4859D.900AAAAA (rgyd) 29821.374 3/14/14 7608A36E Wait uid = E8FC2654.F00AAAAA (rpcd) 0.909 3/14/14 7608A494 Wait root.BBBBB 2087.921 3/14/14 7608A36E Wait uid = E8FC2785.B00AAAAA (cron) 1.870 16/16/16 7608A36E Wait display_manager 0.402 3/14/14 7608A36E Wait uid = E8FC2789.000AAAAA (lpd) 0.653 3/ 7/ 7 7608A36E Wait rgyd.1.3 0.064 3/14/14 Ready uid = EBB485FD.800AAAAA (pst) 142.017 3/14/14 7608A36E Wait server_process_manager 27.095 3/14/14 76089DB4 Wait netman 25363.671 3/14/14 7608A36E Wait uid = E8FC2796.900AAAAA (prmgr) 15198.717 3/14/14 7608A36E Wait prsvr:p:0 ----------- 11950359.184 しばらくしたら uid = EBB4859D.900AAAAA (rgyd) は rgyd.1.3 になっていた。 だめ、katou でも root でもログインできない。ロ−カルのデ−タベ−スも みないというか、アカウントの有効期限がきれているとなってしまう。 ● rgyd * rgyd $ khelp rgyd オプション -create ネットワーク・レジストリのレプリカを作成します。このオプションによ って,レジストリ・データベースのコピーが作成され, スレーブ・サーバ ・プロセスが開始されます。-createオプションは,あるノードでスレー ブ・サーバ・プロセスを初めて開始する場合に限って使用してください。 デーモンを再開始する場合には,オプションは何も指定する必要がありま せん。マスタ・レプリカを作成するには,cvtrgy(SR9のレジストリをSR10 のフォーマットに変換する場合)または rgy_create(新しいSR10レジスト リを作成する場合)を使用してください。 -recreate スレーブ・レプリカを作成し直します。このオプションは,データベース のスレーブのコピーが修復不可能な状態に破壊されてしまった場合に限っ て使用してください。既存のデータベースが破棄され,新しいものが作成 されます。 1. rgy_create または cvtrgy を使用してマスタ・データベースを作成した後, レジストリのマスタ・レプリカを開始します。 $ /etc/server -p /etc/rgyd 2. レジストリのスレーブ・レプリカを開始します。 $ /etc/server -p /etc/rgyd -create 3. レジストリの既存のレプリカ(マスタあるいはスレーブ)を再開始します。 $ /etc/server -p /etc/rgyd 4. リモート・ホスト //yak のレジストリの既存のレプリカを再開始します。 $ crp -on //yak -cps //yak/etc/rgyd * glbd $ khelp glbd glbd の開始時には,ローカル・ノード上でローカル・ロケーション・ブローカ ・デーモン(llbd)が実行中でなければなりません。通常は,どちらの ブローカもブート時に /etc/rcファイルから始動されます。 glbd が IPプロトコルを介して通信を行う場合には,ローカル・ノード上で TCPデーモン(tcpd)も実行中でなければなりません。tcpd は llbd よりも 前に始動している必要があります。 1. このネットワークまたはインタネット上の GLB の最初のレプリカを 生成し,開始します。 $ /etc/server /etc/ncs/glbd -create -first -family dds & 2. 後続の GLB のレプリカを始動し,そのデータベースをホスト //jeeves から初期化します。 $ /etc/server /etc/ncs/glbd -create -from dds://jeeves & 3. GLB の既存のレプリカを再始動します。 $ /etc/server /etc/ncs/glbd & 4. リモート・ホスト //bertie上の GLB の既存のレプリカを再始動します。 $ crp -on //bertie /etc/server //bertie/etc/ncs/glbd & * glbd と rgyd を初期化して、マスタ−とする。 $ /etc/server /etc/ncs/glbd -create -first & $ /install/tools/rgy_create $ /etc/ncs/glbd & glbd と rgyd をいったん殺して、再度稼働させる場合。 $ ld /etc/daemons とりあえずこれだけ空ファイルを作り、リブ−トする。 inetd tcpd glbd llbd rgyd ● * `2g/08/s のこと node_bbbbb から node_aaaaa に crp で入って。 $ /etc/rgy_admin Default object: rgy default host: dds://node_aaaaa State: in service slave rgy_admin: ? Known commands are: set site i[nfo] stop init[rep] repr[ep] delr[ep] lr[ep] mon[itor] reset ch[ange_master] become state q[uit] h[elp] ? node_bbbbb にて。 $ /etc/rgy_admin Default object: rgy default host: unspecified rgy_admin: q $ * 2008/05/s のこと $ /etc/rgy_admin Default object: rgy default host: dds://node_aaaaa State: in service slave rgy_admin: mon (master) dds:#0.ccccc *** not communicating *** dds://node_aaaaa state: in service 2006/06/26.13:40:03 --- rgy_admin: info Default object: rgy default host: dds://node_aaaaa State: in service slave ● /sys/node_data.bbbbb/etc/rc.local ----------------------------------------------------------- |if [ -f /etc/ifconfig ]; then | /etc/ifconfig net0 `/etc/hostname` netmask defaultmask | /etc/ifconfig eth0 192.168.1.9 | /etc/ifconfig lo0 127.0.0.1 |fi | |/etc/route add net 0.0.0.0 192.168.1.1 1 $ ld /etc/daemons/ Directory "/sys/node_data.bbbbb/etc/daemons": README Xapollo tcpd ● * 2010/09/m Apollo モニタが画面が小さくさざ波を打っている。落ち着かせたいのだが調整できない。 まあそこそこみれるようになったので、まあいいか。 * 2006/06/m $ ld //node_ccccc/sys/node_data/etc/daemons README Xapollo automount cron glbd inetd llbd lpd mountd nfsd portmap rgyd rpc.lockd rpc.mountd rpc.statd tcpd xpager2 ● kbs_patch.c /* $Log: kbs_patch.c,v $ * Revision 1.2 99/01/23 19:57:29 paul * Correct Version macro. * Minor error message tweak. * * Revision 1.1 99/01/23 18:31:56 paul * Initial revision This program fixes a limitation in the Domain/OS kernel that prevents SCSI drives with a capacity greater than 4GB (4*1024**3) from being INVOL'd. When attempting to INVOL such a drive, the reported capacity is reported as 4GB less than the true capacity. For example, a 4,569,599,488 byte drive was reported as having a capacity of approximately 268MB. The problem is that the kernel code that determines the capacity of a physical volume is not written for capacities that exceed 2^32 bytes. The OS determines how many blocks (1K or 4K) the drive can support by issueing the ReadCapacity SCSI command. This command returns the number of blocks on the drive, and the size of a block. Then the system multiplies these numbers together, which yields the capacity of the drive, in bytes. For the last step, the system divides the byte capacity by the system page size (1K or 4K). However, a byte capacity that is greater than 2^32-1 will have overflowed, and the result will be incorrect. One example if a drive with a reported capacity of 8,924,999 blocks, at 512 bytes per block, which comes to 4,569,599,488 total bytes (0x1105e8e00). This number exceeds 32 bits, and becomes 0x105e8e00, which divides by the page size of the node to become either 0x105e8 or 0x417a3 blocks, depending on the page size. Here is a code fragment for the capacity calculation: MOVE.l (a2),d0 * d0 = numblocks MULS.l ($4,a2),d0 * d0 *= blocksize MOVE.l d0,d1 * d1=d0 LSR.l #$8,d1 * d1 /= 4096 (page size) LSR.l #$4,d1 * MOVE.l d1,($FFFFFFE0,a6) * local_b_per_pvol = d1 On a machine with a 1K pagesize, the divisor is 1K, and the second shift instruction has a count of 2. The simplest fix for the problem is to reorder the code that does the multiply/divide. Note that the division is done by two adjacent LSR instructions. If one of these is moved to operate on the blocksize, then the multiply won't overflow. Here is an example: MOVE.l ($4,a2),d0 * d0 = blocksize LSR.l #$8,d0 * d0 /= 256 MULS.l (a2),d0 * d0 *= numblocks MOVE.l d0,d1 * d1=d0 LSR.l #$4,d1 * d1 /= 16 MOVE.l d1,($FFFFFFE0,a6) * local_b_per_pvol = d1 This solution worked in the case of the 4.5G drive mentioned earlier. Notes: This solution depends on the drive's block size being a multiple of 256. If the block size does not meet this requirement, then the results will be incorrect. The patched kernel is only necessary when the drive is being INVOL'd. Once invol has completed, the drive may be mounted on a normal system. */ #systype "sys5.3" #include #include #include #include #include #include #include #include /* prototype for undocumented function */ unsigned long getpagesize(void); /* version */ #define Version (strtok("$Revision: 1.2 $"+10, " ")) /* search/replace information for machines with a 1k page size */ unsigned short search_pattern1k[] = {0x2012, 0x4C2A, 0x0000, 0x0004, 0x2200, 0xE089, 0xE489, 0x2D41}; #define search_pattern_length1k (sizeof(search_pattern1k)/sizeof(search_pattern1k[0])) unsigned short replace_pattern1k[] = {0x202a, 0x0004, 0xe088, 0x4c12, 0x0000, 0x2200}; #define replace_pattern_length1k (sizeof(replace_pattern1k)/sizeof(replace_pattern1k[0])) /* search/replace information for machines with a 4K page size */ unsigned short search_pattern4k[] = {0x2012, 0x4C2A, 0x0000, 0x0004, 0x2200, 0xE089, 0xE889, 0x2D41}; #define search_pattern_length4k (sizeof(search_pattern4k)/sizeof(search_pattern4k[0])) unsigned short replace_pattern4k[] = {0x202a, 0x0004, 0xe088, 0x4c12, 0x0000, 0x2200}; #define replace_pattern_length4k (sizeof(replace_pattern4k)/sizeof(replace_pattern4k[0])) /* Search for the pattern, return VA of the pattern, or NULL if not found. */ unsigned short *search(unsigned short *base, unsigned long Words, unsigned short *search_pattern, unsigned long search_length) { int count; unsigned short *retval; /* Adjust Words for pattern length */ Words -= (search_length-1); retval = NULL; while (Words--) { /* See if we match at the current location */ for (count = 0; count < search_length; count++) if (base[count] != search_pattern[count]) break; if (count == search_length) { if (retval) { printf("Error - pattern found more than once.\n"); return NULL; } retval = base; } /* Increment base pointer */ base++; } return retval; } void do_help(void) { puts("\ kbs_patch - Patch kernel to support big SCSI drives\n\ \n\ Usage:\n\ kbs_patch [1024 | 4096] \n\ \n\ Examples:\n\ kbs_patch /sau14/domain_os\n\ kbs_patch 1024 /sau7/domain_os\n\ \n\ Description:\n\ The Domain/OS kernel selected by will be patched to support\n\ big SCSI drives. This changes the code that calculates the number of blocks\n\ that the drive contains. The pagesize argument is optional, and will default to\n\ the pagesize of the machine running the command.\n\ The argument must be the last one on the command line. Only\n\ one file may be patched at a time.\n\ Note that the patch that this program uses will not work on devices\n\ that have a block size that is not a multiple of 256 bytes.\n\ See source code for technical details.\n\ \n\ Disclaimer:\n\ No warranty for this program or its result are expressed or implied. The\n\ author assumes no liability for data loss or any other damage caused by the use\n\ of this program.\n\ "); } int main(int argc, char *argv[]) { int count; unsigned short *search_pattern, *replace_pattern; unsigned long search_length, replace_length; unsigned short *base, *patch_point; unsigned long pagesize; unsigned long length; struct stat stat_buf; status_$t status; /* say hello */ printf("kbs_patch, version %s, built " __DATE__ " at " __TIME__ ".\n", Version); if (argc == 2) { pagesize = getpagesize(); printf("Pagesize of machine is %d bytes.\n", pagesize); } else if (argc == 3) { pagesize = atol(argv[1]); printf("Selected page size is %d bytes.\n", pagesize); argv[1] = argv[2]; } else { do_help(); exit(EXIT_FAILURE); } /* Select the appropriate search/replace patterns, based on pagesize */ switch (pagesize) { case 1024: search_pattern = search_pattern1k; search_length = search_pattern_length1k; replace_pattern = replace_pattern1k; replace_length = replace_pattern_length1k; break; case 4096: search_pattern = search_pattern4k; search_length = search_pattern_length4k; replace_pattern = replace_pattern4k; replace_length = replace_pattern_length4k; break; default: printf("Unrecognized page size of %d bytes, can't patch file.\n", pagesize); exit(EXIT_FAILURE); } printf(" Search pattern is"); for (count = 0; count < search_length; count++) printf(" 0x%04x", search_pattern[count]); printf("\n Replace pattern is"); for (count = 0; count < replace_length; count++) printf(" 0x%04x", replace_pattern[count]); puts(""); /* Get the file length */ if (stat(argv[1], &stat_buf)) { perror("Can't get file size"); exit(EXIT_FAILURE); } /* Map the file */ printf("Mapping file '%s' for 0x%x bytes.\n", argv[1], stat_buf.st_size); base = ms_$mapl(argv[1], strlen(argv[1]), 0, (unsigned long)stat_buf.st_size, ms_$nr_xor_1w, ms_$wr, false, &length, &status); if (status.all != status_$ok) { printf("Error - Can't map file '%s'.\n", argv[1]); error_$print(status); exit(EXIT_FAILURE); } if (length == stat_buf.st_size) { /* Search for the patch point */ patch_point = search(base, length/2, search_pattern, search_length); if (patch_point != NULL) { /* Update the file */ for (count = 0; count < replace_length;count++) patch_point[count] = replace_pattern[count]; printf("Pattern found, 0x%x Words changed at byte offset 0x%x.\n", replace_length, ((char *)patch_point)-((char *)base)); } else { printf("Error - couldn't exactly one occurance of search pattern.\n"); } } else { printf("Error - Wanted to map 0x%x bytes, only mapped 0x%x bytes.\n", stat_buf.st_size, length); exit(EXIT_FAILURE); } /* Unmap the file */ ms_$unmap(base, length, &status); if (status.all != status_$ok) { printf("Error - Can't unmap file '%s'.\n", argv[1]); error_$print(status); exit(EXIT_FAILURE); } } ---------------------------------------------------------------------------------------- ● NFS 2008/01 テスト $ wd /nix/internet/manual $ crd tmp かとうでロッグイン $ /etc/mount -o soft ic_sg2:/nix/cad /nix/internet/manual/tmp Must be root to use mount ル−トでロッグインし直してみた Apollo の /etc/hosts に ic_sg2 がない。 $ /etc/mount -o soft ic_sg2:/nix/cad /nix/internet/manual/tmp mount: ic_sg2 not in hosts database mount: giving up on: /nix/internet/manual/tmp Apollo の /etc/hosts に indy がある。 $ /etc/mount -o soft indy:/nix/cad /nix/internet/manual/tmp $ ld tmp INDY のファイルがみえている Directory "/sys/node_data/tmp": .X11-unix lips_filter.config nfsGlobalData nfs_data print.u rpcdep.dat rpcdllb.dat ic_sg2 2# cat /etc/exports # NFS exported filesystem database (see exports(4) for more information). # Entries in this file consist of lines containing the following fields: # filesystem [ options ] [ netgroup ] [ hostname ] ... # # Filesystem must be left-justified and may name any directory within a # local filesystem. A backslash (\) at the end of a line permits splitting # long lines into shorter ones. Netgroup(4) and hostname refer # to machines or collections of machines to which filesystem is exported. # /nix -rw /usr1/indy/tenpu -rw $ /etc/mount -p /dev/wn768a / 5.3 rw 1187573952 0 0 indy:/nix/cad /nix/internet/manual/tmp nfs soft,rw 1200269456 0 0 解除 $ /etc/umount /nix/internet/manual/tmp $ /etc/mount -p /dev/wn768a / 5.3 rw 1200269861 0 0 * automount 起動 $ /usr/etc/automount -m /indy /etc/auto.indy /etc/auto.indy ------------------------------------------- |nix -rw,hard ic_sg2:/nix/cad | * INDY と Apollo のNFS ic_sg2 12# cat exports ---------------------------------- |# |# NFS exported filesystem database (see exports(4) for more information). |# |# Entries in this file consist of lines containing the following fields: |# |# filesystem [ options ] [ netgroup ] [ hostname ] ... |# |# Filesystem must be left-justified and may name any directory within a |# local filesystem. A backslash (\) at the end of a line permits splitting |# long lines into shorter ones. Netgroup(4) and hostname refer |# to machines or collections of machines to which filesystem is exported. |# |/nix/cad -rw # pwd //node_2cced/nix/internet/manual # mkdir abc # /etc/mount -o soft ic_sg2:/nix/cad /nix/internet/manual/abc $ wd abc;ld Directory "/nix/internet/manual/abc": .HSResource bbb com doc gyoumu katou nix.ps pp sample shibata takagi tmp 解除 $ /etc/umount /nix/internet/manual/abc $ /etc/mount -p 前 /dev/wn0a / 5.3 rw 865570487 0 0 $ /etc/mount -p 後 /dev/wn0a / 5.3 rw 865570487 0 0 ic_sg2:/nix/cad /nix/internet/manual/abc nfs soft,rw 865571367 0 0 INDY 側の mount -p は変化なし $ /usr/etc/rpcinfo -p program vers proto port 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 822 status 100021 1 tcp 826 nlockmgr 100024 1 tcp 824 status 100021 1 udp 1025 nlockmgr 100005 1 udp 829 mountd 100005 2 udp 829 mountd 100021 3 tcp 832 nlockmgr 150001 1 udp 832 pcnfsd 100005 1 tcp 833 mountd 100021 3 udp 1026 nlockmgr 100005 2 tcp 833 mountd 100020 2 udp 1027 llockmgr 100020 2 tcp 837 llockmgr 100003 2 udp 2049 nfs 100021 2 tcp 840 nlockmgr 100021 2 udp 1029 nlockmgr $ /usr/ucb/netstat -a Active connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp 0 0 localhost.960 localhost.sunrpc TIME_WAIT tcp 0 0 node_2cced.1037 ic_sg2.telnet ESTABLISHED ic_sg2 5# netstat -a Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp 0 0 localhost.1276 localhost.sunrpc TIME_WAIT tcp 0 0 localhost.1275 localhost.sunrpc TIME_WAIT tcp 0 0 localhost.1274 localhost.sunrpc TIME_WAIT tcp 0 0 localhost.1273 localhost.sunrpc TIME_WAIT ダメな場合 abc というディレクトリはない $ /etc/mount -o soft ic_sg2:/nix/cad /nix/internet/manual/abc mount: /nix/internet/manual/abc: No such file or directory $ wd /nix/internet/manual $ /etc/mount -o soft ic_sg2:/nix/cad abc mount: directory path must begin with '/' ● アポロとSUNのNFSの設定 * SUNの設定 /etc/export ------------------------------ |/sun SUNの /sun ディレクトリのみ解放する場合 /etc/export ------------------------------ |/ SUNの全ディレクトリを解放する場合 % /usr/etc/expotfs -a これをやると /etc/export が有効になる * アポロからSUNへ $ /etc/mount -o soft sparc:/sun /sunp 開始 $ /etc/mount -o soft sparc:/sun /sunpp $ /etc/mount -o soft sparc:/ /sun $ wd /;ld adus backup_log bin bscom bsd4.2 bsd4.3 sunp sunpp << 仮想のディレクトリができている $ /etc/umount /sunpp 終了 $ /etc/umount /sunp * NFSを使う うまく行っている場合のアクル $ acl nfs?* Acl for nfsd: Required entries root.%.% prwx- %.none.% [ignored] %.%.none [ignored] %.%.% -r-x- Extended entry rights mask: ----- Acl for nfsmount: Required entries root.%.% prwx- %.none.% [ignored] %.%.none [ignored] %.%.% -r-x- Extended entry rights mask: ----- Acl for nfsstat: Required entries root.%.% prwx- %.none.% [ignored] %.%.none [ignored] %.%.% -r-x- Extended entry rights mask: ----- Acl for nfsumount: Required entries root.%.% prwx- %.none.% [ignored] %.%.none [ignored] %.%.% -r-x- Extended entry rights mask: ----- /sys/node_data/etc/exports $ acl exports Acl for exports: Required entries none.%.% [ignored] %.none.% [ignored] %.%.none [ignored] %.%.% prwx- Extended entry rights mask: ----- ? Apollo 側に sun というディレクトリがあること ? $ /etc/mount -o soft sparc:/sun /sun ? $ wd / ディレクトリ sun の中にいるとアンマウントできない ? $ /etc/umount /sun ● NFS のアカウントを作る ****************************************************************** NFSの設定のため person_id( user_id )とgroup_id を -2 にする方法 ****************************************************************** $ wd /sys/node_data/tmp $ d Directory "/sys/node_data/tmp": .X11-unix llbdbase.dat $ crd etc $ wd etc $ d Directory "/sys/node_data/tmp/etc": Empty directory. $ d Directory "/sys/node_data/tmp/etc": group passwd group file -------------- |nobody::-2: |testg::3000: passwd file -------------------------------------------- |nobody::-2:-2:nobody for NFS dummy account:/ |testp::3000:3000:test account for import passwd:/ $ /etc/import_passwd -f -v -s /tmp/etc Preparing registry... Preparing foreign files... Creating Group entries from foreign group file... nobody::4294967294: >> Adding pgo entry for: nobody 4294967294 testg::3000: >> Adding pgo entry for: testg 3000 Creating Person entries and Accounts from foreign passwd file... nobody::4294967294:4294967294:nobody for NFS dummy account:/ >> Adding pgo entry for: nobody 4294967294 >> Adding account for nobody.nobody.none . testp::3000:3000:test account for import passwd:/ >> Adding pgo entry for: testp 3000 >> Adding account for testp.testg.none . Adding memberships from foreign group file... nobody::4294967294: testg::3000: 0 name conflicts, 0 UNIX id conflicts, 0 unnamed groups, 0 errors, 0 warnings. Import operation successful. Update registry [y/n]? y Closing registry... Closing foreign files... Done. $ /etc/edrgy edrgy=> v nobody nobody[.nobody.none]::-2:-2:nobody for NFS dummy account:/:: edrgy=> v testp testp[.testg.none]::3000:3000:test account for import passwd:/:: edrgy=> do p Domain changed to: person edrgy=> v nobody -f nobody -2 5991304F.F0009BD8 %.%.% pr -- edrgy=> v testp -f testp 3000 59913050.10009BD8 %.%.% pr -- edrgy=> do g Domain changed to: group edrgy=> v testg testg 3000 edrgy=> v nobody -f nobody -2 5991304F.B0009BD8 %.%.% pr -- l "" 1992/06/25.15:22 edrgy=> do a Domain changed to: account edrgy=> del testp.testg.none Please confirm delete of account "testp.testg.none" [y/n]: (n) y edrgy=> v testp ?(edrgy) Cannot retrieve any matching entries for "testp.%.%" - Entry not found (RGYC/Client) edrgy=> do p Domain changed to: person edrgy=> del testp Please confirm delete of primary name "testp" [y/n]: (n) y edrgy=> do g Domain changed to: group edrgy=> del testg ?(edrgy) Warning: any accounts for this group (%.testg.%) will also be deleted. Please confirm delete of primary name "testg" [y/n]: (n) y edrgy=> v testg ?(edrgy) "testg" - Entry not found (RGYC/Client) edrgy=> q