HA storage, diskless booting, clustering

Filip Valder filip at valder.cz
Fri Dec 16 15:05:04 UTC 2011

Hi everyone!

It seems that I brought diskless booting back to life in FreeBSD 7.2 and
now I'm about to try it in 8.2 together with HAST. It seems that nothing
relevant has changed in diskless since 7.2. The official docs also seem
outdated, so it's a good playground for my experiments and I'm very
happy about my quick and dirty hacks. Or clean...? Who knows? :-)

First of all prepare your HAST environment with this guide:
- SSD disks and gigE are fast enough, so don't be afraid of it! Just use
attached ifstated.conf instead of the devd.conf in order to avoid
split-brain situations.
- Configure all that HAST, pfsync, CARP and other stuff to get this
"Gemini" system working.

When your HA storage is alive, go ahead and:
- prepare your PXE environment (incl. DHCP) and tftpboot, like:
/hast/pxe/tftpboot/pxeboot -> /hast/pxe/tftpboot/boot/pxeboot

- sysinstall your diskless machine into /hast/pxe/diskless-box, and
separate /, /usr and /var according to the fstab (below)
- configure NFS in order to export that HAST wonder
- pay attention that CARP and UDP are not friends. You have to configure
rpcbind, nfsd a mountd to listen on the CARP interface instead of a
wildcard address.
- hack some files in the /hast/pxe/diskless-box/root/etc:

Add to rc.conf:
netfs_types="nfs4:NFS4 smbfs:SMB portalfs:PORTAL nwfs:NWFS"

Comment out theese lines in rc:
dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
if [ ${dlv:=0} -ne 0 -o -f /etc/diskless ]; then
      sh /etc/rc.initdiskless

Comment out rc.d/mountcritremote from this line (incl.) until the end of
. /etc/rc.subr

my-hast:/hast/pxe/diskless-box/root      /       nfs     -L,noauto,rw    0
my-hast:/hast/pxe/diskless-box/usr       /usr    nfs     -L,rw   0       0
my-hast:/hast/pxe/diskless-box/var       /var    nfs     -L,rw   0       0

When it all seems ready, launch your diskless box and see what happens!

TODOs: I will try it with 8.2, will introduce a template system, so that
diskless-boxes will have / and /usr in common, with separated
/etc/rc.conf and /var. If it all works you will get some low- or mid-end
clustering solution.
Hint: export PATH_FSTAB via /etc/rc could help with individual fstabs
according to hostnames e.g.
******** NEWS: I've tried it already. It works great! ********

Some detailed docs should come from me sooner or later. This is just a
nightly draft...


filip at valder.cz | +420 608 123 966 | http://www.valder.cz/

More information about the freebsd-cluster mailing list