This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:system:sokraits_halfadder.offbyone.lan [2014/08/08 19:55] – [/etc/drbd.conf AFTER OCFS2 is ready] wedge | haas:system:sokraits_halfadder.offbyone.lan [2014/10/04 14:41] (current) – [rsync to fileserver] wedge | ||
---|---|---|---|
Line 4: | Line 4: | ||
^ hostname | ^ hostname | ||
- | | sokraits.lair.lan | + | | sokraits.lair.lan |
| ::: | ::: | 500GB + 500GB RAID1 (/ | | ::: | ::: | 500GB + 500GB RAID1 (/ | ||
^ hostname | ^ hostname | ||
- | | halfadder.lair.lan | + | | halfadder.lair.lan |
| ::: | ::: | 500GB + 500GB RAID1 (/ | | ::: | ::: | 500GB + 500GB RAID1 (/ | ||
Line 21: | Line 21: | ||
* Re-re-reinstalled sokraits with Debian Wheezy -> Jessie, due to failed boot drive (20140806) | * Re-re-reinstalled sokraits with Debian Wheezy -> Jessie, due to failed boot drive (20140806) | ||
* Re-installed halfadder with Debian Jessie (20140806) | * Re-installed halfadder with Debian Jessie (20140806) | ||
+ | * Re-re-re-resetup sokraits as a clone of halfadder and netbooting with entire system in initrd, due to (another) failed boot drive (20141004) | ||
=====TODO==== | =====TODO==== | ||
- | * rig up ramdisk /var and /tmp w/ periodic writes (since we have an SSD /). | + | * <del>rig up ramdisk /var and /tmp w/ periodic writes (since we have an SSD /).</ |
* find 3.5" to 5.25" drive brackets and remount sokraits data drives in case. | * find 3.5" to 5.25" drive brackets and remount sokraits data drives in case. | ||
* on next halfadder reboot, verify that OCFS2 /export gets mounted automatically (last time I had to run "/ | * on next halfadder reboot, verify that OCFS2 /export gets mounted automatically (last time I had to run "/ | ||
Line 122: | Line 123: | ||
=====apt configuration===== | =====apt configuration===== | ||
+ | ====use LAIR apt proxy==== | ||
+ | To reduce traffic caused by package transactions, | ||
+ | |||
+ | < | ||
+ | Acquire:: | ||
+ | </ | ||
+ | |||
+ | ====no recommends==== | ||
I wanted a small installation footprint, so I disabled the installation of recommended packages by default. | I wanted a small installation footprint, so I disabled the installation of recommended packages by default. | ||
Line 157: | Line 166: | ||
smartmontools | smartmontools | ||
firmware-realtek | firmware-realtek | ||
+ | qemu-system-x86-64 | ||
=====GRUB Configuration===== | =====GRUB Configuration===== | ||
Line 269: | Line 279: | ||
## | ## | ||
arch = amd64 | arch = amd64 | ||
- | # | ||
mirror | mirror | ||
mirror_squeeze | mirror_squeeze | ||
- | # | + | mirror_wheezy |
- | mirror_wheezy | + | mirror_jessie |
- | # | + | |
- | #mirror_jessie | + | ###################################################################### |
- | mirror_jessie | + | ## |
+ | ## Proxy Settings for repositories | ||
+ | ## | ||
+ | apt_proxy | ||
###################################################################### | ###################################################################### | ||
Line 542: | Line 554: | ||
With the tools installed, we need to configure some files. | With the tools installed, we need to configure some files. | ||
- | ====/ | + | ====/ |
- | First up, we need to get the peers talking so we can form the volume and get OCFS2 established. Let's make the **/ | + | First up, we need to get the peers talking so we can form the volume and get OCFS2 established. Let's make the **/etc/drbd.d/ |
< | < | ||
Line 571: | Line 583: | ||
protocol C; | protocol C; | ||
} | } | ||
+ | </ | ||
+ | This is only an intermediate step. Further changes are needed before we can bring it up in dual-primary mode. | ||
+ | |||
+ | ====/ | ||
+ | And the resource configuration (doesn' | ||
+ | |||
+ | < | ||
resource xen_data | resource xen_data | ||
{ | { | ||
+ | device | ||
+ | disk /dev/md0; | ||
+ | meta-disk | ||
+ | |||
on sokraits | on sokraits | ||
{ | { | ||
- | | + | address |
- | disk /dev/md0; | + | |
- | | + | |
- | meta-disk | + | |
} | } | ||
on halfadder | on halfadder | ||
{ | { | ||
- | | + | address |
- | disk /dev/md0; | + | |
- | | + | |
- | meta-disk | + | |
} | } | ||
} | } | ||
</ | </ | ||
- | |||
- | This is only an intermediate step. Further changes are needed before we can bring it up in dual-primary mode. | ||
- | |||
====bootstrapping DRBD==== | ====bootstrapping DRBD==== | ||
Getting DRBD initially up-and-running has always has a bit of voodoo behind it... trying a number of commands and eventually stumbling upon something that works. I may have finally gotten the procedure down: | Getting DRBD initially up-and-running has always has a bit of voodoo behind it... trying a number of commands and eventually stumbling upon something that works. I may have finally gotten the procedure down: | ||
Line 773: | Line 787: | ||
</ | </ | ||
- | This **/ | + | This **/etc/drbd.d/ |
+ | |||
+ | Recognizing the changes does not require a reboot! The following command (run on both DRBD peers), will update the config: | ||
+ | |||
+ | < | ||
+ | machine:~# drbdadm adjust xen_data | ||
+ | </ | ||
====Bringing OCFS2 online==== | ====Bringing OCFS2 online==== | ||
Assuming **/ | Assuming **/ | ||
Line 858: | Line 878: | ||
- | ====Configuring xen-tools to create Debian jessie VMs==== | + | ====Historical: |
+ | **This is no longer needed, but may well be in the future.** | ||
There are two changes needed to successfully create jessie VMs, and both are symlinks: | There are two changes needed to successfully create jessie VMs, and both are symlinks: | ||
Line 1086: | 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' | ||
+ | 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' | ||
+ | |||
+ | < | ||
+ | 12 */8 * | ||
+ | </ | ||
+ | |||
+ | ====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: | ||
+ | |||
+ | < | ||
+ | 24 */8 * | ||
+ | </ | ||
+ | |||
+ | 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:/ | ||
+ | data1:/ | ||
+ | data1:/ | ||
+ | data1:/ | ||
+ | data1:/ | ||
+ | </ | ||
+ | |||
+ | ====pxeboot file for sokraits/ | ||
+ | On the fileserver, in **/ | ||
+ | |||
+ | The file(s) contain: | ||
+ | |||
+ | < | ||
+ | default netboot | ||
+ | prompt 1 | ||
+ | timeout 2 | ||
+ | |||
+ | label netboot | ||
+ | kernel mboot.c32 | ||
+ | append netboot/ | ||
+ | |||
+ | label memtest | ||
+ | kernel distros/ | ||
+ | </ | ||
=====References===== | =====References===== | ||
Line 1120: | Line 1195: | ||
====DRBD+OCFS2==== | ====DRBD+OCFS2==== | ||
* http:// | * http:// | ||
+ | |||
+ | ====Debian from RAM==== | ||
+ | * http:// | ||
+ | * debirf: | ||
+ | * http:// | ||
+ | * http:// | ||
+ | |||
+ | ====/tmp as noexec==== | ||
+ | * http:// | ||
+ | |||
+ | ====netboot system to nfsroot==== | ||
+ | * http:// | ||
+ | * this led me to the initrd man page which indicated we might be able to stick the entire system in the initrd and PXE boot that. So many things become simpler at that point. |