Tuesday, March 10, 2009

Customizing and optimizing EON

EON provides a method to allow customizing and optimizing your storage through a simple and easy to maintain process. There is a legacy startup script /etc/rc3.d/S99local that enables this. At boot it searches for /mnt/eon0/.exec and /mnt/eon0/.remove. This resides on the USB drive or CF and allows to automate and add your own commands at run level 3. It also allows you to reduce the RAM footprint of the image, leaving more for when ZFS gets hungry.

This was done so it was not necessary to run /usr/bin/updimg.sh everytime a simple change was needed, for example adding or modifying a script. It also allows the image to include NFS which everyone may not use. It would be a waste for that person to always have the /usr/lib/nfs binaries around, so to give back control to that person, they can simply add /usr/lib/nfs to /mnt/eon0/.remove and all those binaries will be removed at boot giving back the memory for other use. Similarly for other binaries (/usr/sfw/sbin/swat) and kernel drivers not applicable to your needs or hardware.

The thing to remember when making entries to /mnt/eon0/.exec is that it should be a non-interactive command. Commented entries are ignored. Exerpt listing of .exec
/usr/sbin/swap -a /dev/zvol/dsk/abyss/swap
/usr/sbin/ucodeadm -u /platform/i86pc/ucode/intel-ucode.txt
/usr/sbin/ndd -set /dev/tcp tcp_time_wait_interval 30000
For /mnt/eon0/.remove entries you can go wild and experiment because you are erasing it from RAM so if you remove something you realize you need, simply remove the entry from .remove, reboot and all should be back. I have included a default set and commented some that I have found safe to remove in some cases. Exerpt listing of .remove
/platform/i86pc/ucode/intel-ucode.txt
#/kernel/crypto/aes
#/kernel/crypto/arcfour
#/kernel/crypto/blowfish
#/kernel/crypto/des
#/kernel/crypto/ecc
#/kernel/crypto/rsa
#/kernel/crypto/sha2
/etc/svc/repository-boot*
/kernel/drv/amd64/elxl
/kernel/drv/amd64/iprb
#/kernel/drv/amd64/kmdb
#/kernel/drv/amd64/intel_nb5000
/kernel/drv/power*
/kernel/drv/amd64/power

7 comments:

darrenmackay said...

Cool. A copy of your build environment (scripts / etc) would be ideal. I know I am certainly keen to add to the project - surely others are also interested too

Perhaps an updated master image of eon would suffice (snv_109 / the next osol, etc) may also work - I have attempted to get a copy of snv_104 (I have 101,103,108,109, osol0805,0911,0906_107,0906_108) from sun without success (including through the local channel manager's connections).

Darren

blake said...

DM, iso's are here:

http://www.genunix.org/

darrenmackay said...

Thanks, but I already have all of these, I am after the missing bits...as per my post above.

Andre Lue said...

DM,

I haven't forgotten your request. Just haven't had the time to get to it but I will. I did a quick look at 109 as requested though.

Unknown said...

How do we enable NFS on eon ? can anybody help me

SunOS eon 5.11 snv_114 i86pc i386 i86pc

Andre Lue said...

vdesibab,

It's the same way to enable it on solaris so you can google that as well for other's perspective on thigns like NFSv3 or v4, etc but here's 2 quick ways. The 2second method enables everything and is not recommended unless that is what you want but it can be used to discover/learn what you want.

cd /var/svc/manifest/network/nfs
svccfg -v import (each filename in dir)
svcadm enable (each service name)

at the end ps/ptree should show:
540 /usr/sbin/rpcbind
542 /usr/lib/nfs/statd
544 /usr/lib/nfs/nfsmapid
553 /usr/lib/nfs/lockd
557 /usr/lib/nfs/nfs4cbd

Another way, (less recommended) is to comment #exit at line 27 in /lib/svc/method/manifest-import and then run it.

Andre Lue said...

An updated NFS server/client services howto has been added to the FAQ. Please use that to start NFS services.