(Illustration by Gaich Muramatsu)
Gareth Bult <gareth_at_onyx.ftech.net>: > I don't know if this is correct, but the procedure I followed is; > > 1) Install both servers with rpm's > 2) vice-setup servers (one scm, one non) > 3) start servers (make sure /coda works) > 4) createvol_rep coda:root E0000100 /vicepa > 5) stop servers > 6) venus-setup localhost 40000 (on scm) > 7) venus-setup scm 40000 (on other) > 8) edit /vice/db/servers on scm, add non scm server with unique number > 9) edit VSGDB and add new group, eg; "E0000101 scm other" > 10) start servers > I cannot agree with this setup procedure, because: [1] Venus need not run on server (although we could make it so, normally we don't want to do that, for performance reason). So point 6) and 7) should actually means setting up Venus on a client (the fact that they are scm or not is incidental). [2] We should edit VSDGB first before we attempt to use the VSG (i.e. E0000100 in the example) to create any replicated volume. I re-read the Coda manual and found its presentation more or less follows the chronological sequence for setting up a Coda system. So although there are still room for improvement, it is a "must-read" for every who wish to install a Coda system. In particular, Chapter 7 to 11 are very relevant: Ch. 7. Installing a Coda Server Ch. 8. Installing and Configuring a Coda Client Ch. 9. Running Coda Ch. 10. System Administration: Volumes Ch. 11. System Administration: Users To answer Garth's question more specifically: > b) there is no step-by-step guide that makes any sense (without a > system that is already set up!) I will attach one of my setup log as an specific example. That may be a little step towards a more formal writing of (answers to) FAQs. Hope this help ! -- Clement ====================================================================== Yui-wah LEE (Clement) Tel: (852)-26098412 Department of Computer Science and Engineering, Fax: (852)-26035024 The Chinese University of Hong Kong Email: clement_at_cse.cuhk.edu.hk ====================================================================== === attachement ========================================== (warning: long) * background * SCM is named xylophone, non SCM is named violin client is named aria This is a real setup log, so there are also mistake and backtrack. For example, I hit a harddisk crash during the setup, so some step are done repeatedly, but I marked them clearly in the log. Read on.) Passwords are all replaced with "********", they are not the actual key I typed. You can know on which machine the command is issue by reading the shell prompt more carefully. For example: [clement_at_aria clement]$ echo hello hello is an "echo" command issued on the machine aria (one of my client machine). * summary * 1) rpm install coda-debug-server on both xylophone and violin 2) vice-setup on xylophone (scm) 3) vice-setup on violin (non-scm) 4) post vice-setup fixes (edit VSGDB here !) 5) create root volume 6) install coda client on aria (client) 7) adding user(s) 8) creating more volumes 9) testing the setup by doing some actual work (test compile) * actual log * 1) *** rpm install on xylophone and violin *** root_at_violin i386]# rpm -i coda-debug-server-4.6.1-1.i386.rpm most of the coda binaries (e.g. startserver, rdsinit etc) are now installed in /usr/sbin. 2) *** vice-setup on xylophone *** [root_at_xylophone sbin]# vice-setup Setting up config files (under /vice). Directories under /vice are set up. Setting up tokens for authentication. The following tokens must be identical on all servers. Enter a random token for auth2 authentication : ******** The following tokens must be identical on all servers. Enter a random token for volutil authentication : ******** tokens done! Setting up the file list for update filelist for update ready. Populating /vice/vol... lockfiles created. Services already present. Good. Is this the master server, aka the SCM machine? (y/n) y Now installing files specific to the SCM... Setting up servers file. Enter an id for this server (a number > 0 < 255) : 1 done! Initializing the VSGDB to contain the SCM as E0000100 /vice/db/VSGDB set up Setting up ROOTVOLUME file Enter the name of the rootvolume (< 32 chars) : codaroot done! ** When srv, updatesrv and updateclnt are running, ** and you have a data partition PART (such as /vicepa) issue ** the command createvol codaroot scm-hostname PART Setting up users and groups for Coda 1 user entries found An initial administrative user "admin" with passwod "changeme" now exists. You need a small log disk partition, preferrably on a disk by itself. You need a metadata partition of approx 4% of you filespace. For trial purposes you may give oridnary files instead of raw partitions. Keep all size small if you do this. Production servers will want partitions for speed. ------------------------------------------------------- WARNING: you are going to play with your partitions now. verify all answers you give. ------------------------------------------------------- WARNING: these choices are not easy to change once you are up and running. Are you ready to set up RVM? [yes/no] yes What is your log partition? /dev/hdb1 The log size must be smaller than you log partition. We recommend not more than 30M log size, and 2M is a good choice. What is your log size? (enter as e.g. '12M') 30M What is your data partition (or file)? /dev/hda5 The data size must be approx 4% of you server file space. We have templates for servers of approx: 500M, 1G, 2.2G, 3.3G, 8G (you can store less, but not more on such servers). The corresponding data sizes are 22M, 44M, 90M, 130M, 315M. (use 330M only on very fast machines) Pick one of the defaults, otherwise I will bail out What is the size of you data partition (or file) [22M,44M, 90M, 130M, 315M]: 44M -------------------------------------------------------- WARNING: DATA and LOG partitions are about to be wiped. -------------------------------------------------------- --- log area: /dev/hdb1, size 30M. --- data area: /dev/hda5, size 44M. Proceed, and wipe out old data? [y/N] y LOG file has been initialized! Rdsinit will initialize data and log. This takes a while. rvm_initialize succeeded. Going to initialize data file to zero, could take awhile. done. Just mapped in region (20000000,37748736) Just mapped in region (22400000,1048576) rds_zap_heap completed successfully. rvm_terminate succeeded. RVM setup is done! Your server directories will hold the files (not directories). You can currently only have one directory per disk partition. Where shall we store your data [/vicepa]? An FTREEDB exists in /vicepa. Clean up first and rerun /usr/sbin/vice-setup-srvdir (at this point I forgot that I have an old FTREEDB in /vicepa, so the script install kicked me out. I brain-wiped everything in /vicepa, as shown in the following, and retry. I later pick up the installation again by invoking "vice-setup-srvdir" manually. The portion of back-tracking is quoted with "BT>" -- Clement) BT> [root_at_xylophone /root]# umount /vicepa BT> [root_at_xylophone /root]# mkfs /dev/hda6 BT> mke2fs 1.10, 24-Apr-97 for EXT2 FS 0.5b, 95/08/09 BT> Linux ext2 filesystem format BT> Filesystem label= BT> 141312 inodes, 564448 blocks BT> 28222 blocks (5.00%) reserved for the super user BT> First data block=1 BT> Block size=1024 (log=0) BT> Fragment size=1024 (log=0) BT> 69 block groups BT> 8192 blocks per group, 8192 fragments per group BT> 2048 inodes per group BT> Superblock backups stored on blocks: BT> 8193, 16385, 24577, 32769, 40961, 49153, 57345, 65537, 73729, BT> 81921, 90113, 98305, 106497, 114689, 122881, 131073, 139265, 147457, BT> 155649, 163841, 172033, 180225, 188417, 196609, 204801, 212993, 221185, BT> 229377, 237569, 245761, 253953, 262145, 270337, 278529, 286721, 294913, BT> 303105, 311297, 319489, 327681, 335873, 344065, 352257, 360449, 368641, BT> 376833, 385025, 393217, 401409, 409601, 417793, 425985, 434177, 442369, BT> 450561, 458753, 466945, 475137, 483329, 491521, 499713, 507905, 516097, BT> 524289, 532481, 540673, 548865, 557057 BT> BT> Writing inode tables: done BT> Writing superblocks and filesystem accounting information: done BT> BT> [root_at_xylophone /root]# mount /vicepa (Should I had setup up /vicepa correctly, "vice-setup-srvdir should be called by vice-setup directly and need no explicitly invocation by user. -- Clement) [root_at_xylophone /root]# vice-setup-srvdir Your server directories will hold the files (not directories). You can currently only have one directory per disk partition. Where shall we store your data [/vicepa]? mkdir: cannot make directory `/vicepa': File exists Shall I set up a vicetab entry for approx 256000 files for /vicepa (y/n) y grep: /vice/db/vicetab: No such file or directory Now initializing the partition. This takes a while.... Partition /vicepa: inodes in use: 0, total: 262144. Date: Tue 09/01/98 15:43:30 Partition /vicepa: 518147 available size (1K blocks, minfree=5%), 518134 free blocks. done. Server directory is set up! 3) *** vice-setup on up violin (non-SCM server) *** [root_at_violin /root]# vice-setup Setting up config files (under /vice). Directories under /vice are set up. Setting up tokens for authentication. The following tokens must be identical on all servers. Enter a random token for auth2 authentication : ******** The following tokens must be identical on all servers. Enter a random token for volutil authentication : ******** tokens done! Setting up the file list for update filelist for update ready. Populating /vice/vol... lockfiles created. Adding services to /etc/services. /etc/services set up. Is this the master server, aka the SCM machine? (y/n) n Now installing things specific to non-SCM mahines...Enter the hostname of the SCM machine : xylophone You need a small log disk partition, preferrably on a disk by itself. You need a metadata partition of approx 4% of you filespace. For trial purposes you may give oridnary files instead of raw partitions. Keep all size small if you do this. Production servers will want partitions for speed. ------------------------------------------------------- WARNING: you are going to play with your partitions now. `verify all answers you give. ------------------------------------------------------- WARNING: these choices are not easy to change once you are up and running. Are you ready to set up RVM? [yes/no] yes What is your log partition? /dev/hdc1 The log size must be smaller than you log partition. We recommend not more than 30M log size, and 2M is a good choice. What is your log size? (enter as e.g. '12M') 30M What is your data partition (or file)? /dev/hda8 The data size must be approx 4% of you server file space. We have templates for servers of approx: 500M, 1G, 2.2G, 3.3G, 8G (you can store less, but not more on such servers). The corresponding data sizes are 22M, 44M, 90M, 130M, 315M. (use 330M only on very fast machines) Pick one of the defaults, otherwise I will bail out What is the size of you data partition (or file) [22M,44M, 90M, 130M, 315M]: 44M -------------------------------------------------------- WARNING: DATA and LOG partitions are about to be wiped. -------------------------------------------------------- --- log area: /dev/hdc1, size 30M. --- data area: /dev/hda8, size 44M. Proceed, and wipe out old data? [y/N] y LOG file has been initialized! Rdsinit will initialize data and log. This takes a while. rvm_initialize succeeded. Going to initialize data file to zero, could take awhile. done. Just mapped in region (20000000,37748736) Just mapped in region (22400000,1048576) rds_zap_heap completed successfully. rvm_terminate succeeded. RVM setup is done! Your server directories will hold the files (not directories). You can currently only have one directory per disk partition. Where shall we store your data [/vicepa]? mkdir: cannot make directory `/vicepa': File exists Shall I set up a vicetab entry for approx 256000 files for /vicepa (y/n) y grep: /vice/db/vicetab: No such file or directory Now initializing the partition. This takes a while.... Partition /vicepa: inodes in use: 0, total: 262144. Date: Tue 09/01/98 16:45:22 Partition /vicepa: 470113 available size (1K blocks, minfree=5%), 470100 free blocks. done. Server directory is set up! You have set up violin Your scm is xylophone Other config files will be fetched from the SCM by updateclnt. 4) *** post vice-setup fixes *** 4a) need to update /vice/db/servers on xylophone to add any entry for violin. [clement_at_xylophone db]$ cat /vice/db/servers xylophone 1 violin 1 [clement_at_violin clement]$ cat /vice/db/servers xylophone 1 violin 1 (There must be something wrongs here, I think the server number should be unique (the manual says so, too). But my actually files use non-unique number and I havn't got visible problem yet. -- Clement) 4b) edit /vice/db/VSGDB to add entry on xylophone for a group for two server (xylophone and violin). [clement_at_xylophone db]$ cat /vice/db/VSGDB E0000100 xylophone E0000101 xylophone violin 5) *** create the root volume *** [root_at_xylophone db]# createvol_rep codaroot E0000101 /vicepa Servers are (xylophone violin) HexGroupId is 7F000000 creating volume codaroot.0 on xylophone V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk Volume 1000001 (codaroot.0) created creating volume codaroot.1 on violin V_BindToServer: binding to host pc89225.cse.cuhk.edu.hk Volume 1000001 (codaroot.1) created Fetching /vice/vol/Volumelist from violin xylophone V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk VLDB completed. <echo codaroot 7F000000 2 1000001 1000001 0 0 0 0 0 0 E0000101 >> /vice/vol/VRList> V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk VRDB completed. Do you wish this volume to be Backed Up (y/n)? [n] y Day to take full dumps: [Mon] echoing 7F000000 IFIIIII codaroot >>/vice/db/dumplist 6) *** install coda client on aria (client) *** [root_at_aria i386]# umount /home/coda [root_at_aria i386]# rpm -ihv --nodeps /tmp/coda-debug-client-4.6.1-1.i386.rpm coda-debug-client ################################################## /lib/modules/2.0.35/misc/sound.o: unresolved symbol(s) [root_at_aria i386]# mount /home/coda (I needed to umount /home/coda and remount it later because the rpm install spec errorously treat it as an coda already mounted: %pre client -grep /coda /proc/mounts > /dev/null 2>1 +grep "^/coda" /proc/mounts > /dev/null 2>1 if [ $? = 0 ]; then echo "*** Coda is mounted: cannot install ***" exit 1 else exit 0 fi ) [root_at_aria i386]# rpm -ihv /tmp/coda-fs-module-k2.0.34_c4.6.0-1.i386.rpm coda-fs-module ################################################## /lib/modules/2.0.35/misc/sound.o: unresolved symbol(s) (note: We can't mix fs-modules of different version, I later manually installed a coda.o, compiled by myself, for kernel 2.0.35. Details are skipped as you would need to do this if you use 2.0.24. --Clement) 7) *** adding user for the new coda cluster *** [root_at_xylophone db]# cp -p user.coda user.coda.orig [root_at_xylophone db]# vi user.coda [clement_at_xylophone db]$ cat user.coda admin::500::Administrator:: clement::6822::LEE, Yui-wah (Clement):: [root_at_xylophone db]# cp -p group.coda group.coda.orig [root_at_xylophone db]# vi group.coda [clement_at_xylophone db]$ cat group.coda System:Administrators -204 admin [root_at_xylophone db]# cp -p vice.pdb vice.pdb.orig [root_at_xylophone db]# pwd2pdb -u user.coda -g group.coda > vice.pdb 2 user entries found [root_at_xylophone db]# cp -p vice.pcf vice.pcf.orig [root_at_xylophone db]# pcfgen vice.pdb (I hit a strange "cfs la" bug. The portion of log are quoted with "###". -- Clement) ### *** strange cfs bugs *** ### ### [ Spet 3, 98 ] ### ### [clement_at_aria clement]$ cfs la /coda ### Venus returned an ill-formed ACL ### ### Sep 3 14:05:32 aria kernel: coda_pioctl: Venus returns: 110 for (0x7f000000,0x1 ,0x1 ) ### Sep 3 14:05:32 aria kernel: coda_pioctl: upcall returns: 110 ### ### ### [clement_at_aria /coda]$ touch hello ### [clement_at_aria /coda]$ ls -a ### ./ ../ hello ### [clement_at_aria /coda]$ ls -l ### total 0 ### -rw------- 1 clement 65534 0 Sep 3 14:06 hello ### [clement_at_aria /coda]$ ls ~ > world ### [clement_at_aria /coda]$ ls -l ### total 1 ### -rw------- 1 clement 65534 0 Sep 3 14:06 hello ### -rw------- 1 clement 65534 323 Sep 3 14:06 world ### ### ### [clement_at_aria /coda]$ cfs la /coda ### System:AnyUser rlidwka ### [clement_at_aria /coda]$ pushd ~ ### ~ /coda ### [clement_at_aria clement]$ cfs la /coda ### System:AnyUser rlidwka ### 8) *** creating more volume (codausr, u.clement, t1.clement etc) *** create volume codausr *** [root_at_xylophone db]# createvol_rep codausr E0000101 /vicepa Servers are (xylophone violin) HexGroupId is 7F000001 creating volume codausr.0 on xylophone V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk Volume 1000002 (codausr.0) created creating volume codausr.1 on violin V_BindToServer: binding to host pc89225.cse.cuhk.edu.hk Volume 1000002 (codausr.1) created Fetching /vice/vol/Volumelist from violin xylophone V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk VLDB completed. <echo codausr 7F000001 2 1000002 1000002 0 0 0 0 0 0 E0000101 >> /vice/vol/VRList> V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk VRDB completed. Do you wish this volume to be Backed Up (y/n)? [n] y Day to take full dumps: [Mon] Tue echoing 7F000001 IIFIIII codausr >>/vice/db/dumplist ` [root_at_xylophone db]# strings VRDB codaroot codausr [root_at_xylophone db]# cat ../vol/RWlist codaroot.1 1000001 pc89225.cse.cuhk.edu.hk /vicepa 2 0 0 codausr.1 1000002 pc89225.cse.cuhk.edu.hk /vicepa 2 0 0 codaroot.0 1000001 pc89225.cse.cuhk.edu.hk /vicepa 2 0 0 codausr.0 1000002 pc89225.cse.cuhk.edu.hk /vicepa 2 0 0 [admin_at_aria /coda]$ cfs mkm usr codausr [admin_at_aria /coda]$ ls -l total 4 drwxrwxrwx 2 root 65534 2048 Sep 1 17:13 ./ drwxr-xr-x 21 root root 1024 Sep 2 15:33 ../ lrw-r--r-- 1 admin 65534 9 Sep 3 14:18 usr -> #codausr [admin_at_aria /coda]$ cfs checkservers Contacting servers ..... All servers up (Unfortunately, at this point, I could not mount the new volume, and later my harddisk on xylophone, hosting the rvm log, crashed. So I need to back track and re-do vice-setup-rvm, re-create root volume etc. The log for the back track are all quoted under "BT>" -- Clement) BT> *** restore coda server on xylophone *** BT> BT> * step 1 replace another 424MB harddisk on xylophone BT> BT> Disk /dev/hdb: 16 heads, 63 sectors, 826 cylinders BT> Units = cylinders of 1008 * 512 bytes BT> BT> fdisk to reserve 50M on /dev/hdb1 for rvm log BT> BT> BT> Disk /dev/hdb: 16 heads, 63 sectors, 826 cylinders BT> Units = cylinders of 1008 * 512 bytes BT> BT> Device Boot Begin Start End Blocks Id System BT> /dev/hdb1 1 1 102 51376+ 83 Linux native BT> BT> * step 2 vice-setup-rvm BT> BT> root_at_xylophone /vice]# vice-setup-rvm BT> BT> You need a small log disk partition, preferrably on a disk by itself. BT> You need a metadata partition of approx 4% of you filespace. BT> BT> For trial purposes you may give oridnary files instead of raw BT> partitions. Keep all size small if you do this. BT> Production servers will want partitions for speed. BT> BT> ------------------------------------------------------- BT> WARNING: you are going to play with your partitions now. BT> verify all answers you give. BT> ------------------------------------------------------- BT> BT> WARNING: these choices are not easy to change once you are up and running. BT> BT> Are you ready to set up RVM? [yes/no] yes BT> BT> What is your log partition? /dev/hdb1 BT> BT> The log size must be smaller than you log partition. BT> We recommend not more than 30M log size, and 2M is a good choice. BT> What is your log size? (enter as e.g. '12M') 30M BT> BT> What is your data partition (or file)? /dev/hda5 BT> BT> The data size must be approx 4% of you server file space. BT> We have templates for servers of approx: 500M, 1G, 2.2G, 3.3G, 8G BT> (you can store less, but not more on such servers). BT> The corresponding data sizes are 22M, 44M, 90M, 130M, 315M. BT> (use 330M only on very fast machines) BT> Pick one of the defaults, otherwise I will bail out BT> BT> What is the size of you data partition (or file) [22M,44M, 90M, 130M, 315M]: 44M BT> BT> -------------------------------------------------------- BT> WARNING: DATA and LOG partitions are about to be wiped. BT> -------------------------------------------------------- BT> BT> --- log area: /dev/hdb1, size 30M. BT> --- data area: /dev/hda5, size 44M. BT> BT> BT> BT> LOG file has been initialized! BT> BT> BT> Rdsinit will initialize data and log. BT> This takes a while. BT> rvm_initialize succeeded. BT> Going to initialize data file to zero, could take awhile. BT> done. BT> Just mapped in region (20000000,37748736) BT> Just mapped in region (22400000,1048576) BT> rds_zap_heap completed successfully. BT> rvm_terminate succeeded. BT> RVM setup is done! BT> BT> * step 3: re-create codaroot BT> BT> volutil create_rep /vicepa codaroot 7F000000 1000001 BT> BT> [root_at_xylophone srv]# volutil create_rep /vicepa codaroot 7F000000 1000001 BT> V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk BT> Volume 1000001 (codaroot) created BT> BT> (the magic number can be found from /vice/vol/VRList) BT> BT> (I can create_rep for codaroot again on xylophone without doing BT> the same on violin) BT> BT> * end BT> *** cfs mkm now works !? *** After all the fuss, the volume codausr is now visible, don't know why :-( [clement_at_duet /coda]$ cfs lv usr Status of volume 0x7f000001 (2130706433) named "codausr" Volume type is ReadWrite Minimum quota is 0, maximum quota is unlimited Current blocks used are 2 The partition has 465937 blocks available out of 470113 [clement_at_aria clement]$ cfs lv /coda/usr Status of volume 0x7f000001 (2130706433) named "codausr" Volume type is ReadWrite Minimum quota is 0, maximum quota is unlimited Current blocks used are 2 The partition has 465937 blocks available out of 470113 *** create volume for u.clement *** [root_at_xylophone srv]# createvol_rep u.clement E0000101 /vicepa Servers are (xylophone violin) HexGroupId is 7F000002 creating volume u.clement.0 on xylophone V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk Volume 1000002 (u.clement.0) created creating volume u.clement.1 on violin V_BindToServer: binding to host pc89225.cse.cuhk.edu.hk Volume 1000003 (u.clement.1) created Fetching /vice/vol/Volumelist from violin xylophone V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk VLDB completed. <echo u.clement 7F000002 2 1000002 1000003 0 0 0 0 0 0 E0000101 >> /vice/vol/VRList> V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk VRDB completed. Do you wish this volume to be Backed Up (y/n)? [n] y Day to take full dumps: [Mon] Wed echoing 7F000002 IIIFIII u.clement >>/vice/db/dumplist [clement_at_aria usr]$ cfs mkm /coda/usr/clement u.clement [clement_at_aria usr]$ ls ./ ../ clement/ *** t1.clement *** [root_at_xylophone auth2]# createvol_rep t1.clement E0000101 /vicepa Servers are (xylophone violin) HexGroupId is 7F000003 creating volume t1.clement.0 on xylophone V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk Volume 1000003 (t1.clement.0) created creating volume t1.clement.1 on violin V_BindToServer: binding to host pc89225.cse.cuhk.edu.hk Volume 1000004 (t1.clement.1) created Fetching /vice/vol/Volumelist from violin xylophone V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk VLDB completed. <echo t1.clement 7F000003 2 1000003 1000004 0 0 0 0 0 0 E0000101 >> /vice/vol/VRList> V_BindToServer: binding to host xylophone.cse.cuhk.edu.hk VRDB completed. Do you wish this volume to be Backed Up (y/n)? [n] n [root_at_xylophone auth2]# 9) *** testing compile coda on the new aria, new xylophone *** [ Sept 9, 98 ] aria: PII-300, 96MB RAM xylophone: P-90, 32MB RAM violin: P-90, 32MB RAM [clement_at_aria bd2]$ time /home/coda/coda/configure --enable-platform-i386_linux2 ... 7.12user 3.12system 0:19.00elapsed 53%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (54657major+48465minor)pagefaults 0swaps (and the rest is history ! -- Clement) ============================================================Received on 1998-09-24 22:57:36