User Tools

Site Tools


haas:system:sokraits_halfadder.offbyone.lan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:system:sokraits_halfadder.offbyone.lan [2014/10/04 13:49] – [/tmp as noexec] wedgehaas:system:sokraits_halfadder.offbyone.lan [2014/10/04 14:41] (current) – [rsync to fileserver] wedge
Line 1108: Line 1108:
  
 Wait at least 5 minutes for data reporting to make it into graphable form. Wait at least 5 minutes for data reporting to make it into graphable form.
 +
 +=====Sync'ing to data store=====
 +Since we've been successful running the systems out of a RAMdisk, care must be taken to preserve any changes in the event of a reboot or power failure.
 +
 +====rsync to disk====
 +
 +In this light, I first had the systems rsync'ing to their local SSD (boot drive). I rigged up a custom cronjob than ran 3 times a day. It looks as follows:
 +
 +<code>
 +12 */8 *         (mkdir -p /tmp/sda1; mount /dev/sda1 /tmp/sda1; rsync -av --one-file-system / /tmp/sda1/; umount /tmp/sda1)
 +</code>
 +
 +====rsync to fileserver====
 +
 +This worked handily until sokraits lost its boot drive (again! In 2 months time!) so I decided to investigate netbooting using an NFSroot.
 +
 +In the process, I may have finally made a breakthrough in my longtime desire to put the entire system IN the initial ramdisk (so it would be running in RAM from the get-go). Turns out, according to the manual page, you merely have to put the system IN the initrd file... obviously one needs adequate memory (2x at boot- enough for the initrd, and enough to decompress it).
 +
 +My cron job changed as follows:
 +
 +<code>
 +24 */8 *         (rsync -av --one-file-system / data.lair.lan:/export/tftpboot/netboot/halfadder/disk/)
 +</code>
 +
 +I plan to rig up either some daily autogeneration of the initrd, or have a script on standby that can use to make it. This will then become the method of booting both sokraits and halfadder (and potentially freeing up a still-working SSD in the process! Which I can use in data2).
 +
 +On the fileserver, I then obtain the latest copy of the hypervisor, kernel, and generate a new all-system initrd:
 +
 +<cli>
 +data1:/export/tftpboot/netboot/halfadder# cp disk/boot/xen-4.4-amd64.gz .
 +data1:/export/tftpboot/netboot/halfadder# cp disk/boot/vmlinuz-3.16-2-amd64 linux
 +data1:/export/tftpboot/netboot/halfadder# cd disk
 +data1:/export/tftpboot/netboot/halfadder/disk# find . | cpio -c -o | gzip -9 > ../initrd.gz
 +data1:/export/tftpboot/netboot/halfadder/disk# 
 +</cli>
 +
 +====pxeboot file for sokraits/halfadder====
 +On the fileserver, in **/export/tftpboot/pxelinux.cfg/** are two files, **0A50012E** (sokraits) and **0A50012F** (halfadder)... they are named according to the machine's IP address (only in hex).
 +
 +The file(s) contain:
 +
 +<code>
 +default netboot
 +prompt 1
 +timeout 2
 +
 +label netboot
 +    kernel mboot.c32
 +    append netboot/halfadder/xen-4.4-amd64.gz --- netboot/halfadder/linux console=tty0 root=/dev/ram0 ro --- netboot/halfadder/initrd.gz
 +
 +label memtest
 +    kernel distros/memtest/memtest86+
 +</code>
  
 =====References===== =====References=====
haas/system/sokraits_halfadder.offbyone.lan.1412430592.txt.gz · Last modified: 2014/10/04 13:49 by wedge