Started documentation
[monikop.git] / doc / monikop.muse
blob74a0a4fb9d8f2d1d74f382deadc318ea27a80533
1 * Introduction
3   - Data sources on isolated rover
4   - Data destination 
5   - Data transfer by removable disks which are filled by Monikop on
6     rover, emptied by Pokinom
7   - Transfer rates ca. ...
9 * Installation
11 ** Debian Packages to Use
12    rsync, mingetty, sudo, libcurses-perl, libfile-rsync-perl, git-core (installation), mingetty, bc (test), time (test)
13 ** git-clone ...
14 ** monikop.config, pokinom.config
15 ** monikop + pokinom: if necessary, specify path to config, eg. my $monikop_config = '/home/m-operator/monikop/monikop.config'
17 ** Automatic login (Monikop and Pokinom):
18 =/etc/inittab=: change line into
19 <src lang="conf">
20 1:2345:respawn:/sbin/mingetty --autologin m-operator --noclear tty1
21 </src>
23 ** Autostart (Monikop and Pokinom):
24    Append to =~/.profile= (create if necessary):
25    <src lang="bash">
26    /home/m-operator/monikop/monikop
27    </src>
28    or
29    <src lang="bash">
30    /home/m-operator/monikop/pokinom,
31    respectively.
32    </src>
34 ** Removable disks
35    - Create Filesystems. Example (suppose disk tagged disk_10 is attached to /dev/sdg1):
37      =mke2fs -j -L disk_10 /dev/sdg1=
39    - =/etc/fstab=:
40      <src lang="conf">
41      ## System partitions ###
42      LABEL=root     /               ext3  defaults,errors=remount-ro 0  1
43      LABEL=swap     none            swap  sw                         0  0
44      ## Removable disks                   
45      LABEL=disk_01  /media/disk_01  ext3  rw,user,auto               0  0
46      LABEL=disk_02  /media/disk_02  ext3  rw,user,auto               0  0
47      # etc
48      </src>
50    - Make sure system boots actually from the system disk rather than from some removable one:
52      Change =/boot/grub/menu.lst= where is says
53      =# kopt=root=...=:
54      <src lang="conf">
55      ### BEGIN AUTOMAGIC KERNELS LIST
56      ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
57      ## by the debian update-grub script except for the default options below
58      
59      ## DO NOT UNCOMMENT THEM, Just edit them to your needs
60      
61      ## ## Start Default Options ##
62      ## default kernel options
63      ## default kernel options for automagic boot options
64      ## If you want special options for specific kernels use kopt_x_y_z
65      ## where x.y.z is kernel version. Minor versions can be omitted.
66      ## e.g. kopt=root=/dev/hda1 ro
67      ##      kopt_2_6_8=root=/dev/hdc1 ro
68      ##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
69      # kopt=root=/dev/disk/by-label/root noresume ro
70      </src>
72      and call:
73      =update-grub=
75 ** =/etc/sudoers=:
76    call
77    =visudo=
78    and add:
79    <src lang="conf">
80    messung ALL=(ALL) NOPASSWD: /sbin/halt -p
81    messung ALL=(ALL) NOPASSWD: /sbin/reboot
82    </src>
84 ** Network setup
86 *** Monikop
88     - =/etc/hosts=
89       <src lang="conf">
90       127.0.0.1      localhost
91       192.168.200.10 central
92       192.168.178.20 nav
93       192.168.200.30 front
94       192.168.178.40 data
95       192.168.200.50 rear-left
96       192.168.200.60 rear-right
97       192.168.200.70 scanner
98       </src>
100     - =/etc/network/interfaces=
101       <src lang="conf">
102       # The loopback network interface
103       auto lo
104       iface lo inet loopback
105       
106       # central
107       allow-hotplug eth1
108       iface eth1 inet static
109          address 192.168.200.9
110          netmask 255.255.255.248
111       
112       # switch
113       allow-hotplug eth2
114       iface eth2 inet static
115          address 192.168.178.40
116          netmask 255.255.240.0
117          gateway 192.168.180.169
118       
119       # front
120       allow-hotplug eth3
121       iface eth3 inet static
122          address 192.168.200.29
123          netmask 255.255.255.248
124       
125       # rear-left
126       allow-hotplug eth4
127       iface eth4 inet static
128          address 192.168.200.49
129          netmask 255.255.255.248
130       
131       # rear-right
132       allow-hotplug eth5
133       iface eth5 inet static
134          address 192.168.200.59
135          netmask 255.255.255.248
136       
137       # scanner
138       allow-hotplug eth6
139       iface eth6 inet static
140          address 192.168.200.69
141          netmask 255.255.255.248
142       </src>
143     - non-overlapping subnets (http://jodies.de/ipcalc may be helpful)
144 *** Data sources
146     - Windows: Location of =/etc/hosts/=: =%SystemRoot%\system32\drivers\etc\hosts=
148     - IP address 192.168.200.60
149     - Subnet mask 255.255.255.248
151     - =/etc/hosts=:
153     <src lang="conf">
154       127.0.0.1      localhost
155       192.168.178.10 central
156       192.168.178.20 nav
157       192.168.178.30 front
158       192.168.178.40 data
159       192.168.178.50 rear-left
160       192.168.178.60 rear-right
161       192.168.178.70 scanner
162     </src>
164     - =rsyncd.conf=:
166     (click Start, Programs, csRsyncServer, rsyncd.conf)
167     <src lang="conf">
168     use chroot = false
169     strict modes = false
170     hosts allow = *
171     logfile = rsyncd.log
172     [log]
173     #   /cygdrive/e/log stands for E:\log
174         path = /cygdrive/e/log
175         read only = false
176         transfer logging = false
177     </src>
178         <src lang="conf">
179        pid file=/var/run/rsyncd.pid
180        [log]
181            path = /media/platte_03
182            use chroot = yes
183            lock file = /var/lock/rsyncd
184            read only = yes
185            list = yes
186            uid = nobody
187            gid = nogroup
188            strict modes = yes
189            ignore errors = no
190            ignore nonreadable = yes
191            transfer logging = no
192         </src>
194 *** Pokinom
197 *** Data sink
198 ** Rsync server installation
199 *** Linux
200     /etc/default/rsync:
201     Change line
202     RSYNC_ENABLE = true
203     /etc/rsyncd.conf
204     Data source (rover)
205     Data sink (office)
206 *** Windows
207     install cwrsync:
208     http://sourceforge.net/projects/sereds/files/cwRsync/4.0.3/cwRsyncServer_4.0.3_Installer.zip/download
209     rsyncd.conf
210     Service rsync: autostart
212 * Usage
213   You have to be able to tell from your data if it's complete.
214   Monikop shows which disks have data and therefore should be
215   transferred to Pokinom.
216   Monikop keeps starting over until shutdown or until disappearance
217   or data source(s)
218   Pokinom needs sufficient amount of free space on sink; must be
219   rebooted once this is not the case.
220   fsck-monikop: to be run by root
221   Backup functionality: data remains on disks until re-inserted in
222   Monikop.
224 * Bugs
225   - Data must not contain any directories called $rsync_partial_dir_name
226   - Doesn't reflect disappearance of files on sources
227   - May ignore empty dirs (really?)
228