En este punto, el directorio /vice ya está creado. Sin embargo ha de asegurarse que posee suficiente espacio en la partición donde está ubicado el directorio /vice. Tenga en cuenta que el archivo SrvLog puede llegar a ocupar más de 100 megas en ciertas circunstancias. Por este motivo, tal vez sea necesario crear una nueva partición para el directorio /vice. Una vez que se está seguro de poseer el espacio necesario en el directorio en cuestión, ya se puede ejecutar el siguiente paso de la configuración: la ejecución del script vice-setup.
Hay que tener en cuenta que la configuración de un servidor SCM es diferente a la configuración de un servidor no SCM. Por lo tanto, cuando el script vice-setup le pregunte si este servidor va a ser un SCM, es muy importante responder de la manera adecuada. Sólo se ha de configurar un servidor SCM por cada célula Coda.
El script vice-setup configura aspectos comunes para los servidores SCM y no SCM, pero se llamarán a scripts diferentes dependiendo de si la respuesta a la pregunta anterior ha sido un sí o un no.
Configuración de un servidor SCM.
vice-setup-scm vice-setup-user vice-setup-rvm vice-setup-srvdir |
Configuración de un servidor no SCM.
vice-setup-rvm vice-setup-srvdir |
vice-setup invocará a los scripts anteriores en el orden en el que se han listado.
A continuación se verá la forma de configurar un servidor SCM. El primer paso es la ejecución del comando /usr/sbin/vice-setup, cuya salida se verá en las siguientes capturas de pantalla:
![]() | Nota |
|---|---|
El texto marcado en negrita son las respuestas a las preguntas realizadas por /usr/sbin/vice-setup, por lo que tendrá que adaptarlas a sus necesidades. También ha de notar que en esta configuración se hace uso de archivos para el almacen del log y los datos del servidor SCM en vez de particiones. | |
# vice-setup Welcome to the Coda Server Setup script! Setting up config files for a coda server. Do you want the file /etc/coda/server.conf created? [yes] yes What is the root directory for your coda server(s)? [/vice] /vice Setting up /vice. Directories under /vice are set up. Is this the master server, aka the SCM machine? (y/n) y Setting up tokens for authentication. The following token must be identical on all servers. Enter a random token for update authentication : server-token The following token must be identical on all servers. Enter a random token for auth2 authentication : auth2-token The following token must be identical on all servers. Enter a random token for volutil authentication : volutin-token tokens done! Setting up the file list for update client Filelist for update ready. /etc/services already has new services registered! Good. /etc/services ready for Coda Now installing files specific to the SCM... Setting up servers file. Enter an id for the SCM server. (hostname todoscsi) The serverid is a unique number between 0 and 255. You should avoid 0, 127, and 255. serverid: 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) : scm-root-volume-name Setting up users and groups for Coda You need to give me a uid (not 0) and username (not root) for a Coda System:Administrator member on this server, (sort of a Coda super user) Enter the uid of this user: 1001 Enter the username of this user: coda An initial administrative user coda (id 1001) with Coda password "changeme" now exists. A server needs a small log file or disk partition, preferrably on a disk by itself. It also needs a metadata file or partition of approx 4% of your filespace. Raw partitions have advantages because we can write to the disk faster, but we have to load a copy of the complete RVM data partition into memory. With files we can use a private mmap, which reduces memory pressure and speeds up server startup by several orders of magnitude. Servers with a smaller dataset but heavy write activity will probably benefit from partitions. Mostly read-only servers with a large dataset will definitely benefit from an RVM data file. Nobody has really measured where the breakeven point is, so I cannot really give any hard numbers. ------------------------------------------------------- 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? /var/tmp/log.raw 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. '2M') 2M What is your data partition (or file)? /var/tmp/data.raw 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. Pick one of the defaults, otherwise I will bail out Remember that RVM data will have to be mmapped or loaded into memory, so if anything fails with an error like RVM_EINTERNAL you might have to add more swap space. What is the size of you data partition (or file) [22M, 44M, 90M, 130M, 200M, 315M]: 44M -------------------------------------------------------- WARNING: DATA and LOG partitions are about to be wiped. -------------------------------------------------------- --- log area: /var/tmp/log.raw, size 2M. --- data area: /var/tmp/data.raw, 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. rds_zap_heap completed successfully. rvm_terminate succeeded. RVM setup is done! Directories on the server will be used to store container files that hold the actual data of files stored in Coda. Directory contents as well as metadata will be stored in the RVM segment that we already configured earlier. You should only have one container file hierarchy for each disk partition, otherwise the server will generate incorrect estimates about the actual amount of exportable disk space. Where shall we store your file data [/vicepa]? /vicepa Shall I set up a vicetab entry for /vicepa (y/n) y Select the maximum number of files for the server. [256K, 1M, 2M, 16M]: 1M Server directory /vicepa is set up! Congratulations: your configuration is ready...and now to get going do the following: - start the auth2 server as: auth2 - start rpc2portmap as: rpc2portmap - start updatesrv as: updatesrv - start updateclnt as: updateclnt -h todoscsi - start the fileserver: startserver & - wait until the server is up: tail -f /vice/srv/SrvLog - create your root volume: createvol_rep scm-root-volume-name E0000100 /vicepa - setup a client: venus-setup todoscsi 20000 - start venus: venus - enjoy Coda. - for more information see http://www.coda.cs.cmu.edu. |
A continuación, se arrancarán los distintos servicios y se terminará la configuración del servidor SCM, como se indica en las últimas líneas de la caputura de pantalla anterior.
Arranque del servidor auth2.
# # /etc/init.d/auth2.init start Starting auth2: /usr/sbin/auth2 done. |
Arranque del servidor Coda.
# /etc/init.d/codasrv.init start Starting codasrv: codasrv. |
Arranque de los servidores de actualización.
# /etc/init.d/coda-update start Starting /usr/sbin/rpc2portmap... Starting /usr/sbin/updatesrv... Starting /usr/sbin/updateclnt... |
Comprobación del archivo de Log del servidor Coda. La siguiente captura muestra el contenido de un servidor SCM desde que se arranca hasta que queda operativo. Si no se observan errores, el servidor Coda estará arrancado.
# tail -f -n 70 /vice/srv/SrvLog
Date: Tue 12/30/2003
18:09:38 New SrvLog started at Tue Dic 30 18:09:38 2003
18:09:38 Resource limit on data size are set to -1
18:09:38 RvmType is Rvm
18:09:38 Main process doing a LWP_Init()
18:09:38 Main thread just did a RVM_SET_THREAD_DATA
18:09:38 Setting Rvm Truncate threshhold to 5.
Partition /vicepa: inodes in use: 0, total: 1048576.
18:09:39 Partition /vicepa: 192768K available (minfree=0%), 61768K free.
18:09:39 The server (pid 4923) can be controlled using volutil commands
18:09:39 "volutil -help" will give you a list of these commands
18:09:39 If desperate,
"kill -SIGWINCH 4923" will increase debugging level
18:09:39 "kill -SIGUSR2 4923" will set debugging level to zero
18:09:39 "kill -9 4923" will kill a runaway server
18:09:39 Vice file system salvager, version 3.0.
18:09:39 SanityCheckFreeLists: Checking RVM Vnode Free lists.
18:09:39 DestroyBadVolumes: Checking for destroyed volumes.
18:09:39 Salvaging file system partition /vicepa
18:09:39 Force salvage of all volumes on this partition
18:09:39 Scanning inodes in directory /vicepa...
18:09:39 SFS: There are some volumes without any inodes in them
18:09:39 SalvageFileSys: unclaimed volume header file or no Inodes in volume 1000001
18:09:39 SalvageFileSys: Therefore only resetting inUse flag
18:09:39 SalvageFileSys completed on /vicepa
18:09:39 VAttachVolumeById: vol 1000001 (scm-root-volume-name.0) attached and online
18:09:39 Attached 1 volumes; 0 volumes not attached
lqman: Creating LockQueue Manager.....LockQueue Manager starting .....
18:09:39 LockQueue Manager just did a rvmlib_set_thread_data()
done
18:09:39 CallBackCheckLWP just did a rvmlib_set_thread_data()
18:09:39 CheckLWP just did a rvmlib_set_thread_data()
18:09:39 ServerLWP 0 just did a rvmlib_set_thread_data()
18:09:39 ServerLWP 1 just did a rvmlib_set_thread_data()
18:09:39 ServerLWP 2 just did a rvmlib_set_thread_data()
18:09:39 ServerLWP 3 just did a rvmlib_set_thread_data()
18:09:39 ServerLWP 4 just did a rvmlib_set_thread_data()
18:09:39 ServerLWP 5 just did a rvmlib_set_thread_data()
18:09:39 ResLWP-0 just did a rvmlib_set_thread_data()
18:09:39 ResLWP-1 just did a rvmlib_set_thread_data()
18:09:39 VolUtilLWP 0 just did a rvmlib_set_thread_data()
18:09:39 VolUtilLWP 1 just did a rvmlib_set_thread_data()
18:09:39 Starting SmonDaemon timer
18:09:39 File Server started Tue Dic 30 18:09:39 2003
18:10:38 New Data Base received |
Creación del volumen raíz.
![]() | Nota |
|---|---|
Las palabras marcadas en negrita son las entradas tecleadas por el usuario durante el proceso de creación del volumen. | |
# createvol_rep scm-root-volume-name E0000100 /vicepa Getting initial version of /vice/vol/BigVolumeList. V_BindToServer: binding to host todoscsi GetVolumeList finished successfully V_BindToServer: binding to host todoscsi Servers are (todoscsi ) HexGroupId is 7f000000 creating volume scm-root-volume-name.0 on todoscsi (partition /vicepa) V_BindToServer: binding to host todoscsi V_BindToServer: binding to host todoscsi Set Log parameters Fetching volume lists from servers: V_BindToServer: binding to host todoscsi GetVolumeList finished successfully todoscsi - success V_BindToServer: binding to host todoscsi VLDB completed. <echo scm-root-volume-name 7f000000 1 1000001 0 0 0 0 0 0 0 E0000100 >> /vice/db/VRList.new> V_BindToServer: binding to host todoscsi VRDB completed. Do you wish this volume to be Backed Up (y/n)? [n] y Day to take full dumps: [Mon] Mon echoing 7f000000 IFIIIII scm-root-volume-name >>/vice/db/dumplist |
A partir de este momento, ya tenemos arrancando y funcionando nuestro servidor SCM. Es ahora cuando podemos proceder a configurar un servidor de apoyo (no SCM)[10] y conectar el cliente al servidor Coda.