Wednesday, February 25, 2009

EON boot chart

Bootchart is a tool for performance analysis and visualization of the boot process. With the help of some boot chart programs and process shared by Alex (1, 2), the creator of Milax I created a boot chart of EON. This shows the 32-bit CIFS version completely booted in under 28 secs. I need investigate why the CPU data on top isn't being plotted.

The original Opensolaris bootchart work was done by Erick Shrock and Dan Price in dtrace but the code was not released.
EON 32-bit CIFS Boot Chart: booted from USB < 28sec
EON 32-bit Samba: booted with 2 zpools (CPU data fixed)
EON 64-bit CIFS: booted with 2 zpools

Wednesday, February 18, 2009

EON 64-bit 0.58.9 based on SNV_104 is released!

Embedded Operating system/Networking (EON), RAM based live ZFS NAS appliance is released on Genunix! As always lots of thanks to Al and Genunix.org for download hosting.

It is available in a CIFS and Samba flavor
tryitEON 64-bit x86 CIFS ISO image version 0.58.9 based on snv_104
tryitEON 64-bit x86 Samba ISO image version 0.58.9 based on snv_104

Friday, February 13, 2009

Another way to add driver(s) to EON

This method uses a booted/running EON NAS to add a new driver to itself. Another simple method I overlooked to add a driver was to first transfer the driver binary(eg rtls, conf (eg rtls.conf) and 64-bit binary if applicable to eon. Place the files appropriately in /kernel/drv or /kernel/drv/amd64.
Test it using add_drv -v, for example I placed the file /kernel/drv/rtls
add_drv -v rtls
Current Method: Then edit /mnt/eon0/.backup entries to include the new driver files
/etc/name_to_major
/etc/driver_aliases
/kernel/drv/rtls
/kernel/drv/rtls.conf
/kernel/drv/amd64/rtls
Deprecated Method: Then edit the FILES section in updimg.sh to include this file
FILE="/etc/hosts
/etc/hostid
change to
FILE="/etc/hosts
/etc/hostid
/etc/name_to_major
/etc/driver_aliases
/kernel/drv/rtls
/kernel/drv/rtls.conf
/kernel/drv/amd64/rtls
End Deprecated Method

If the driver added is not listed in /etc/name_to_major, it (eg rtls, sfe, mega_sys)will need to be added to the last line and the number entry next to the driver incremented to a unique value. If the last line is
rtls 52
edit to be
rtls 52
sfe 53
To preserve this driver beyond reboots, run updimg.sh /mnt/eon0/boot/x86.eon

Thursday, February 12, 2009

Adding your own driver(s) to EON

Adding your own drivers to EON is possible in a couple of ways.
Method 1: This method uses another working opensolaris system to un-compress a copy of x86.eon image. Add the driver binary and driver.conf file to /kernel/drv/ and 64-bit binary to /kernel/drv/amd64 path where the image was unpacked. The image will then be repacked and transferred the back to the appliance.
/boot/solaris/bin/root_archive unpack x86.eon [path_to_unpacked_dir]
cp rtls [path_to_unpack_dir]/kernel/drv
cp rtls.conf [path_to_unpack_dir]/kernel/drv
For 64-bit EON you would also add
cp rtls [path_to_unpack_dir]/kernel/drv/amd64
add_drv -b [path_to_unpacked_dir] -n -v [driver_added_kernel_drv]
/boot/solaris/bin/root_archive pack x86-new.eon [path_to_unpacked_dir]
Method 2: On EON, enable virtual consoles and insert a pause in the updimg.sh script. Run the updimg.sh until the pause. Finally, switch consoles (ctrl+alt+FX, where X is the console number) and copy the driver binary and driver.conf to /mnt/upd/kernel/drv.
svccfg import /var/svc/manifest/system/vtdaemon.xml
svcadm enable vtdaemon
svcadm enable console-login:vt2
svcadm enable console-login:vt3
now you can use ctrl-alt-F1/F2/F3 to switch between terminals
edit updimg.sh and change:
backup_repository
undo_mnt_lofs
to:
backup_repository
echo -n "Press enter to continue after adding drivers " ; read x
undo_mnt_lofs
run (if default path_to_img=/mnt/eon0)
/usr/bin/updimg.sh [path_to_img]/x86.eon
When you see the mesg press ctrl-alt-F2, login and add your driver to /mnt/upd/kernel/drv. When done, ctrl-alt-F1 to switch back, login and press enter to complete updimg.sh. You should then have a new image with your added drivers.

Method 3: Get the current EON build kit and opensolaris DVD image and build your own appliance, including the needed drivers. This will require a working opensolaris install (snv_98 or higher, others should work) to run imgsol.sh. I will ask Al at Genunix to host these plus the 64 bit versions. I will add the rtls nic to the 64 bit image.

Monday, February 9, 2009

Using webmin to administer your EON NAS

Using webmin to administer your EON ZFS NAS is fairly simple. You can get and learn more about webmin here. The Solaris package was used in this example setup.

After being downloaded. Note this step has to be run on a system that has a working pkgtrans.
pkgtrans webmin-1.450.pkg /tmp all
This converted the package from a data stream to file system format and produced the directory containing the package in file system format.
/tmp/WSwebmin

I then created the following directories on my zpool:
mkdir pool/webmin
mkdir pool/varwebmin
then I symlinked the following:
cd /etc ; ln -s ../abyss/webmin webmin
cd /var ; ln -s ../abyss/varwebmin webmin
cd /opt ; ln -s ../abyss/WSwebmin/reloc webmin
cd /var/log ; ln -s ../../abyss/bandwidth bandwidth
finally, cd /opt/webmin (this is only needed once)
cd /opt/webmin
./postinstall
and to start
cd /etc/webmin
./start
Here's quick capture of the session:

Screenshot of running processes
Here you can see the 500MB ZFS swap
Service Management Facility

Wednesday, February 4, 2009

Adding ZFS swap to EON

Adding a ZFS swap, sized to your liking with EON is easy once you have built a zpool. This is very HIGHLY recommended for performance reasons. Doing so will also make it possible to run update image (updimg.sh) on systems that do not have enough memory(systems that freeze in the midst of updimg.sh). A good size for starters are 1.0X, 1.5X and 2.0X RAM. After your zpool is built, simply do
zfs create -V 1G pool/swap
This will build a 1G swap(in this case it's named swap, but could be named to your preference). Then simply add the following to /mnt/eon0/.exec to auto mount at boot
/usr/sbin/swap -a /dev/zvol/dsk/pool/swap
Optional: You can also add it to /etc/vfstab but this would require running updimg.sh to preserve the changes.
echo "/dev/zvol/dsk/pool/swap - - swap - no -" >> /etc/vfstab
Please note the flexibility here. Let's say you need 2Gb of swap instead of the previous 1Gb. Simply:
swap -d /dev/zvol/dsk/pool/swap
zfs destroy pool/swap
zfs create -V 2G pool/swap
swap -a /dev/zvol/dsk/pool/swap
Your new, improved and resized swap is ready!

Tuesday, February 3, 2009

Easy EON storage setup






To answer some recent questions:
- Can I set the my own hostname? Yes for USB/CF installs
- Will my changes survive a reboot? Yes for USB/CF installs

Wednesday, January 28, 2009

Sharing quick start guide

An updated version of this post can be seen here.
CIFS quick start guide

1. Create zpool and directory/zfs for user
(eg substitute your own zpool name for "pool", user for "username", stor or create new group for "guid"
zfs create -o casesensitivity=mixed -o sharesmb=on pool/username
zfs set sharesmb=name=sharename pool/user
zfs set compression=on pool/username or
zfs set compression=gzip pool/username
2. Step 1 of the Samba quick start guide and
passwd username
3 Set permissions on share directory/zfs
cd /pool
chown username:guid username
chmod 755 username
Samba quick start guide
1. Add user(s) to system account
useradd  -u uid -g guid -s /bin/false username
# useradd -u 551 -g 500 -s /bin/false user1
2. Add user(s) to samba account
smbpasswd -U username -a
# smbpasswd -U user1 -a
enter and confirm the password

On your windows machine
Start -> Run
\\IP\share
\\192.168.43.1\user1
enter username/password set from step 2 of Samba quick start

Tim Thomas has a good article on CIFS configuration for further understanding.
Alan Wright has a good blog entry on Client side Caching. More on Active Directory Integration, Shares and Permissions (ZFS acl settings)

More on building your own fileserver. Breden has a great article here.

Thursday, January 22, 2009

EON 0.58.9 based on SNV_104 is released!

Embedded Operating system/Networking (EON), RAM based live NAS appliance is released on Genunix! Much thanks to Al and Genunix.org for download hosting.

It is available in a CIFS and Samba flavor
tryitEON 32-bit x86 CIFS ISO image version 0.58.9 based on snv_104
tryitEON 32-bit x86 Samba ISO image version 0.58.9 based on snv_104

Tuesday, January 20, 2009

EON 0.58.9 based on snv_104 screens

EON 0.58.9 live image NAS, based on snv_104 32-bit is released!

ptree screenshot of the CIFS version

ptree screenshot of the Samba version

Wednesday, December 17, 2008

Quik start steps to cool ZFS storage

Requirements:
- Blank CD/DVD
- USB drive or CF flash + IDE adapter or Disk on Module
- A PC that can boot from USB and supports 3+ Hard Drives with 1GB or more RAM

To get started:
1. First step is to download and burn the latest iso (EON 0.58.9 snv_104)
2. Boot your target pc with the CD burned in step 1
3. Insert the USB drive you will install EON on(NOTE: All data on the USB drive will be LOST!).
4. Log in as user: "root" password: "eonsolaris" and run "/usr/bin/install.sh"
5. Choose the USB drive as the destination (NOTE: All data on the USB drive will be lost)
6. After the install completes ( < 5 min) , run "/usr/sbin/init 0" to halt EON.
7. Eject CD and reboot (CTRL-ATL-DEL) using the USB drive. Please be sure USB drive is before CD in the boot order in the system bios.

If all went well EON will begin booting from the USB drive.

Friday, November 21, 2008

EON Storage use and audience

EON is for an audience seeking an easy to use, rock solid (ZFS), no nonsense storage solution utilizing hardware you already own. It is a small live image OS built on Opensolaris that will help transform a system (optimal: 1Gb or more RAM) that can support 3 or more hard disks into a reliable home storage solution for all your digital data and memories.

The ideal install is a USB drive, IDE-CF adapter or Disk on Module. The live CD ISO is mostly for demonstration and testing purposes because of the read only nature. It also serves as an installation point to a USB, IDE-CF (compact flash) media or hard disk where changes and customizations can be preserved beyond reboots.

Note, with a hard disk install you give up the advantage of being one hard drive's worth of power consumption greener and you re-introduce the failure points associated with hard disks. A USB, CF or Disk on Module install is greener and just as efficient.

Thursday, November 13, 2008

EON 0.58.7 contest release


The EON (Embeddable ON) [ Small Solaris Network Attached Storage Live Image ] was awarded 3rd place in Sun's Opensolaris Community Innovation Award contest.

The contest image is downloadable here

Please check back for updates as the latest images will be made available in 32 and 64 bit versions

EON Storage Features

EON ZFS Storage (Embedded Operating system/Networking)


Introduction (updated):
EON is a small Solaris ZFS NAS (network attached storage) image based on opensolaris. This is a RAM based live/install image which runs from CD, USB or CF (compact flash) or Disk on Module. The appliance image provides a high performance 32/64-bit storage solution built on ZFS using cost effective disks. A build script provides the basis for building your own network attached storage appliance on x86 hardware from the Solaris Express Community Edition CD's.


Requirements to test/install the pre-built iso (updated):
- A blank CD to burn, demo and install the iso (eon.iso).
- A bootable USB drive, 128 Mb or larger (256 Mb or higher recommended).
- An IDE to compact flash adapter and 128Mb or larger compact flash drive (CF install).
- A x86 machine capable of booting from CD and USB.


Requirements to create your own iso:
- A standard working opensolaris installation, B72 or higher.
- Solaris Community Express Edition CD's (a.k.a Opensolaris) or ISO images, B84 or higher.
- EON build scripts (imgsol.sh) and root access on the working Solaris installation.


Tested Solaris Community Express versions :
- Solaris Community Express Edition B84 - B89.


Features (updated):
- Simple and Secure CLI (command line interface) administration. Web-based GUI/BUI possible as a future development port of the Freenas web admin
- Supports ZFS, iSCSI (target and client initiator), NFSv3, NFSv4, CIFS (Sun Microsystems Implementation) or Samba, SFTP, SSH, NTP, IP filtering, rsync
- Supports RAID levels:
RAID-0 (striping)
RAID-1 (mirroring)
RAID-Z (similar to RAID-5 with variable-width stripes to avoid RAID-5 write hole, requires 3 or more disks)
RAID-Z2 (RAID-6, double parity, requires 4 or more disks)
- Supports client OS, Windows 2000/XP/2003/Vista, Mac OS X, Unix and Linux
- provides transparent and dynamic filesystem compression (using zlib or gzip) to save space
- Capable of expanding the zpool by expanding each disk in the pool (since snv_117)
- allows thin provisioning (green) file systems
- unlimited files, links, directories and snapshots(version-ing)
- link aggregation
- IPfilter module and application to control/restrict access to the appliance/device
- DTrace, Perl and PHP
- multi-cast DNS client and server (since version 0.59.3)


The development of the busybox and squashfs project will help to further reduce the memory footprint and performance of the image. Further possible enhancements include using mkisofs to create iso images of a binary set. This binary set could be compressed and later mounted to the opensolaris storage appliance image (eg /usr/local) via lofiadm using gzip compression/decompression.


Quickstart guide:
After the image (eon.iso) is burned to a CD and booted. Login as root.
user: admin pass: eonstore
user: root pass: eonsolaris

Type and run the following. This script prompts the user through configuration questions like hostname, IP/DHCP, netmask, domain name and more. This step will ask questions to configure the image for live image use.
# /usr/bin/setup


This step is optional and requires a destination USB (inserted) or CF drive attached. The command will format and install the live image to a USB or CF drive.
# /usr/bin/install.sh

This step should be done after install.sh or, to preserve configuration changes made to the image. This preserves the original image to /boot/x86.eon.orig (bootable by the OEM choice from GRUB) and saves a new default boot image to /boot/x86.eon. It will move the live image to x86.eon.1, x86.eon.2 and so on each time it is run.
# /usr/bin/updimg.sh


Notes:
For size considerations, the network driver built into the image is intended solely for the machine the image will run on. This submitted image may or may not match the interface in your testing machine. In the submitted image, the test hardware (Dell Optiplex GX 280, 520, 620 745) had broadcom and intel cards so the driver (bge, iprb) package (SUNWbge) was installed. The user can substitute a suitable driver by building their own EON live/install image.


Build package command description:
- imgsol.sh: The script to build your own live storage image. It does this using Solaris Community Express Edition CD's.

- stripbnl.sh: This script strips binaries and libraries to reduce the size and RAM footprint of the image

- trimpkg.sh: This processes the del-SUNWxxx package files and removes any file not commented. The del-SUNWxxx package files a created using pkgchk -vn SUNWxxx > del-SUNWxxx 2>&1.

- chkdev.sh: This script automounts CD's, USB and CF drives.

- makecd.sh: This script creates the CD iso image at the end of the build.

- example.imgsol.sh: Is an example answer key output of imgsol.sh used to build the submitted EON live image


Open bug(s) and other errors:
*1 - CIFS via Samba only for now, because the solaris CIFS kernel module is not running on a ramfs. The /devices/pseudo/smbsrv@0 device entries do not get created. Last working version is on B84. This seems broken since B85, bug id CR #6700070 (http://bugs.opensolaris.org/view_bug.do?bug_id=6700070), thread (http://www.opensolaris.org/jive/thread.jspa?messageID=243767&#243767)

*2 - The "WARNING: add_spec: No major number for nv_sata, ahci, si3124, marvell88sx" at boot are harmless. CR #6486493 (http://opensolaris.org/os/community/on/flag-days/pages/2008030601/)

*3 - Multiple cpu cores not being shown by psrinfo. Noticed since B87. Last noted working in B84.