2 #subtitle Some Subtitelish Text
6 Suppose we have an isolated network of data producing computers
7 (Sources), e.g. in a surveying vehicle (Rover). The collected data (a
8 few Terabytes per day) need to be transferred to a processing server
9 (Destination) in office.
11 This data transfer, which happens by means of removable disks, is our
14 On Rover, a couple of removable disks are put into a dedicated computer where they are
15 filled automatically by Monikop with data pulled from Sources.
17 The disks are then carried to the office where they are put into another
18 dedicated computer. Here, Monikop's counterpart called Pokinom pushes
19 their content to Destination and makes the disks re-usable by
22 The heavy lifting is done by [[http://www.samba.org/rsync/][rsync]]. Sources as well as Destination
23 need to have rsync servers installed.
25 - Transfer rates ca. ...
30 Debian packages to use
32 - to install from a git repository: git-core;
34 - to run Monikop and Pokinom:
35 rsync, mingetty, sudo, libcurses-perl, libfile-rsync-perl,
38 - to run the tests: bc, time.
41 Prepare removable disks and their mount points:
43 Create Filesystems with labels. Example (suppose disk tagged =disk_10= is attached to =/dev/sdg1=):
45 =mke2fs -j -L disk_10 /dev/sdg1=
47 Label the swap partition:
53 In =/etc/fstab=, make use of the disk labels:
56 ## System partitions ###
57 LABEL=root / ext3 defaults,errors=remount-ro 0 1
58 LABEL=swap none swap sw 0 0
60 LABEL=disk_01 /media/disk_01 ext3 rw,user,auto 0 0
61 LABEL=disk_02 /media/disk_02 ext3 rw,user,auto 0 0
65 Make sure system boots actually from the system disk rather than from
66 some of the removable ones. Change =/boot/grub/menu.lst= where is says
67 <src lang="conf"># kopt=root=...</src>:
70 ### BEGIN AUTOMAGIC KERNELS LIST
71 ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
72 ## by the debian update-grub script except for the default options below
74 ## DO NOT UNCOMMENT THEM, Just edit them to your needs
76 ## ## Start Default Options ##
77 ## default kernel options
78 ## default kernel options for automagic boot options
79 ## If you want special options for specific kernels use kopt_x_y_z
80 ## where x.y.z is kernel version. Minor versions can be omitted.
81 ## e.g. kopt=root=/dev/hda1 ro
82 ## kopt_2_6_8=root=/dev/hdc1 ro
83 ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
84 # kopt=root=/dev/disk/by-label/root noresume ro
91 Create a user on both Monikop's and Pokinom's machine. For
92 descriptions sake, we assume they're called m-operator.
94 Get Monikop (and Pokinom); from m-operator's home directory say:
96 =git-clone (FIXME: repo here)=
98 Copy =monikop.config.example= to =monikop.config= and
99 =pokinom.config.example= to =pokinom.config= and
100 adapt them according to your needs. Both have helpful comments,
101 and both are perl code, so be careful and keep the interpunction
104 Things you want to change for Monikop in =monikop.config=:
107 # Possible data sources, and by what directory name to represent them in
109 # When the latter is not unique, care must be taken that all pathnames in the
110 # respective sources are unique.
112 'data_producer1::data' => 'p1',
113 'data_producer2::data' => 'p2',
114 'data_producer3::data' => '',
115 'data_producer4::data' => '',
118 # Possible mount points of data destinations.
119 @usable_mount_points = (
126 =%sources= are the data producing Sources in a format rsync
127 understands, together with a source-specific directory name where data
128 of the respective Source goes. Those directory names can be equal for
129 several Sources if all filenames are certain to be unique.
131 =@usable_mount_points= are mount points (directories) for your
132 removable disks. Every disk needs its own mountpoint whose name should
133 correspond to the disk's label.
135 Things you want to change for Pokinom in =pokinom.config=:
138 # Possible mount points.
139 @possible_mount_points = (
147 ** Automatic login (Monikop and Pokinom):
149 =/etc/inittab=: change line which says
152 1:2345:respawn:/sbin/getty 38400 tty1
158 1:2345:respawn:/sbin/mingetty --autologin m-operator --noclear tty1
161 ** Autostart (Monikop and Pokinom):
162 Append to =~/.profile= (create if necessary):
164 /home/m-operator/monikop/monikop
168 /home/m-operator/monikop/pokinom,
172 If necessary, specify path to config file, e.g.
174 /home/m-operator/monikop/monikop /home/m-operator/monikop/monikop.config
178 ** Authorize m-operator to shut down computer
180 Use =visudo= to change =/etc/sudoers=; add:
183 messung ALL=(ALL) NOPASSWD: /sbin/halt -p
184 messung ALL=(ALL) NOPASSWD: /sbin/reboot
194 192.168.200.10 central
198 192.168.200.50 rear-left
199 192.168.200.60 rear-right
200 192.168.200.70 scanner
203 - =/etc/network/interfaces=
205 # The loopback network interface
207 iface lo inet loopback
211 iface eth1 inet static
212 address 192.168.200.9
213 netmask 255.255.255.248
217 iface eth2 inet static
218 address 192.168.178.40
219 netmask 255.255.240.0
220 gateway 192.168.180.169
224 iface eth3 inet static
225 address 192.168.200.29
226 netmask 255.255.255.248
230 iface eth4 inet static
231 address 192.168.200.49
232 netmask 255.255.255.248
236 iface eth5 inet static
237 address 192.168.200.59
238 netmask 255.255.255.248
242 iface eth6 inet static
243 address 192.168.200.69
244 netmask 255.255.255.248
247 - Provide for non-overlapping subnets. (http://jodies.de/ipcalc may be helpful.)
251 - Windows: Location of =/etc/hosts/=: =%SystemRoot%\system32\drivers\etc\hosts=
253 - IP address 192.168.200.60
254 - Subnet mask 255.255.255.248
260 192.168.178.10 central
264 192.168.178.50 rear-left
265 192.168.178.60 rear-right
266 192.168.178.70 scanner
271 (click Start, Programs, csRsyncServer, rsyncd.conf)
278 # /cygdrive/e/log stands for E:\log
279 path = /cygdrive/e/log
281 transfer logging = false
284 pid file=/var/run/rsyncd.pid
286 path = /media/platte_03
288 lock file = /var/lock/rsyncd
295 ignore nonreadable = yes
296 transfer logging = no
303 ** Rsync server installation
307 =/etc/default/rsync=:
322 pid file = /var/run/rsyncd.pid
327 comment = Pokinom only (requires authentication)
329 incoming chmod = g+r,g+w
332 hosts allow = 192.168.180.120
333 auth users = m-operator
334 secrets file = /etc/rsyncd.secrets
337 =/etc/rsyncd.secrets=:
344 Data destination (office)
349 http://sourceforge.net/projects/sereds/files/cwRsync/4.0.3/cwRsyncServer_4.0.3_Installer.zip/download
351 Service rsync: autostart
355 - You have to be able to tell from your data if it's complete.
356 - Monikop shows which disks have data and therefore should be
357 transferred to Pokinom.
358 - Monikop keeps starting over until shutdown or until disappearance
360 - Pokinom needs sufficient amount of free space on sink; must be
361 rebooted once this is not the case.
362 - fsck-monikop: to be run by root
363 - Backup functionality: data remains on disks until re-inserted in
364 Monikop. Names in use.
368 - Data must not contain any directories called $rsync_partial_dir_name
369 - Doesn't reflect disappearance of files on sources
370 - May ignore empty dirs (really?)