Saturday, March 28, 2009

Testing/upgrading new versions of EON

Testing new versions of EON ZFS NAS with a previous USB/CF install is simple. The risk is minimal and backing out to the previous working version is simple. Simply boot the previous verion and follow the steps. This should work with USB(tested), compact flash(tested) and virtual installs(untested). First, transfer the new eon-0.590-b110-64-cifs.iso to your storage pool. You can do a transfer using a CIFS share or winSCP or via sftp. Let's say we transferred it to /pool/eon-0.590-b110-64-cifs.iso. Then we would mount the new image:
lofiadm -a /pool/eon-0.590-b110-64-cifs.iso /dev/lofi/1
mkidr -p /mnt/new
mount /dev/lofi/1 /mnt/new
Preserve your previous version
cd /mnt/eon0/boot
mv x86.eon /pool/x86.eon.backup
tar -cvf - . | gzip > /pool/boot.tgz
Transfer the new version (still in /mnt/eon0/boot, which should be empty)
rm -rf amd64 grub platform
cd /mnt/new/boot
cp -pR * /mnt/eon0/boot
updimg.sh /mnt/eon0/x86.eon
The new contents of /mnt/eon0/boot should have amd64, grub, platform and the new x86.eon. Now, replace any custom changes you had in /mnt/eon0/boot/menu.lst. Also, do not run zpool or zfs upgrade until you're satisfied you like the new version as there is no way of going back to a previous zpool (currently v14) or zfs (currently v3) version. You can now reboot into the new EON ZFS NAS. From there you can re-run setup and updimg.sh to re-id your new version or mount your previous version and transfer any customizations.

Friday, March 27, 2009

EON 64-bit 0.59.0 based on SNV_110 is released!

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

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

tryitEON 32-bit x86 CIFS ISO image version 0.59.0 based on snv_110

tryitEON 32-bit x86 Samba ISO image version 0.59.0 based on snv_110New/Fix:
- install.sh should work with vdi/vmware disks properly.
- image footprint/runtime is smaller requires less RAM.

Tuesday, March 17, 2009

EON snv_109 is alive

Here is a beta preview of EON ZFS NAS based on snv_109. Yes, it is alive. There are 2 build bugs that I am trying to resolve. A core on rtc and some manifest-import at boot time control. I will try to resolve and release this image as soon as possible. Note that with release snv_109 we get ACL shares on CIFS. ACLs on shares brings better compatibility with the Microsoft implementation and allows more control over access than the CIFS server previously supported. The "shares" file /pool/fs/.zfs/shares is shown at the end of the video. I wanted to find out why multi-core CPU support is showing incorrectly (kstat, mpstat, psrinfo) for this release but that may have to wait.

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

Tuesday, March 3, 2009

Benchmarking your EON ZFS NAS

Being able to test the performance of your storage unit is always important. Creating real world application loads and recording accurate statistics is not easy. Or is it? Sun has a great tool for this, called Filebench. Filebench is a new framework for simulating applications on file systems. So let's use filebench to test our EON ZFS NAS. There's a wide range of tests that can be performed and a detailed howto (see example varmail run) is here. Download the filebench_opensolaris-1.3.4_x86_pkg.tar.gz here Unpack it on your zpool
gzip -dc filebench_opensolaris-1.3.4_x86_pkg.tar.gz | tar -xf -
Create the necessary link
(cd /usr ; ln -s ../ZPOOL/filebench/reloc  benchmarks)
(cd /opt ; ln -s ../ZPOOL/filebench/reloc/filebench filebench)
That's it. We are ready to test.

Testing my PIII, Dell 4100, 1Ghz w 512Mb, 2Gb swap and 3x36Gb raidz1 pool royal produced the following:
::::::::::::::
copyfiles.stats
::::::::::::::
Flowop totals:
closefile2 997ops/s 0.0mb/s 0.0ms/op 11us/op-cpu
closefile1 997ops/s 0.0mb/s 0.0ms/op 19us/op-cpu
writefile2 997ops/s 15.0mb/s 0.2ms/op 230us/op-cpu
createfile2 997ops/s 0.0mb/s 0.3ms/op 304us/op-cpu
readfile1 998ops/s 15.0mb/s 0.1ms/op 109us/op-cpu
openfile1 998ops/s 0.0mb/s 0.1ms/op 113us/op-cpu

IO Summary: 6002 ops 5983.2 ops/s, 998/997 r/w 29.9mb/s,
4373uscpu/op
::::::::::::::
createfiles.stats
::::::::::::::
Flowop totals:
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
closefile1 189ops/s 0.0mb/s 0.6ms/op 19us/op-cpu
writefile1 189ops/s 2.9mb/s 34.1ms/op 229us/op-cpu
createfile1 189ops/s 0.0mb/s 44.1ms/op 367us/op-cpu

IO Summary: 149974 ops 566.2 ops/s, 0/189 r/w 2.9mb/s, 4
9326uscpu/op
::::::::::::::
deletefiles.stats
::::::::::::::
Flowop totals:
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
deletefile1 2725ops/s 0.0mb/s 3.9ms/op 140us/op-cpu

IO Summary: 50000 ops 2725.3 ops/s, 0/0 r/w 0.0mb/s,
0uscpu/op
::::::::::::::
mongo.stats
::::::::::::::
Flowop totals:
deletefile1 499ops/s 0.0mb/s 0.2ms/op 204us/op-cpu
closefile2 500ops/s 0.0mb/s 0.0ms/op 13us/op-cpu
readfile1 500ops/s 7.0mb/s 0.1ms/op 115us/op-cpu
openfile2 500ops/s 0.0mb/s 0.1ms/op 105us/op-cpu
closefile1 500ops/s 0.0mb/s 0.0ms/op 18us/op-cpu
appendfilerand1 500ops/s 4.0mb/s 0.3ms/op 292us/op-cpu
openfile1 500ops/s 0.0mb/s 0.1ms/op 84us/op-cpu

IO Summary: 7006 ops 3496.4 ops/s, 500/500 r/w 11.0mb/s,
4771uscpu/op
::::::::::::::
multistreamread.stats
::::::::::::::
Flowop totals:
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqread4 2ops/s 1.8mb/s 455.4ms/op 13636us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqread3 2ops/s 2.0mb/s 428.7ms/op 24988us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqread2 2ops/s 1.7mb/s 473.3ms/op 27942us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqread1 1ops/s 1.4mb/s 556.6ms/op 27728us/op-cpu

IO Summary: 83 ops 7.2 ops/s, 7/0 r/w 6.9mb/s, 13323
21uscpu/op
::::::::::::::
multistreamreaddirect.stats
::::::::::::::
Flowop totals:
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqread4 3ops/s 2.7mb/s 348.3ms/op 16887us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqread3 3ops/s 3.2mb/s 269.0ms/op 20442us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqread2 3ops/s 2.6mb/s 270.5ms/op 18601us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqread1 3ops/s 2.9mb/s 303.6ms/op 23271us/op-cpu

IO Summary: 128 ops 11.8 ops/s, 12/0 r/w 11.4mb/s, 8253
65uscpu/op
::::::::::::::
multistreamwrite.stats
::::::::::::::
Flowop totals:
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqwrite4 6ops/s 5.9mb/s 160.7ms/op 8830us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqwrite3 5ops/s 5.4mb/s 174.0ms/op 8889us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqwrite2 6ops/s 6.0mb/s 157.6ms/op 8765us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqwrite1 6ops/s 6.2mb/s 150.0ms/op 9035us/op-cpu

IO Summary: 248 ops 23.8 ops/s, 0/24 r/w 23.4mb/s, 332
054uscpu/op
::::::::::::::
multistreamwritedirect.stats
::::::::::::::
Flowop totals:
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqwrite4 6ops/s 5.4mb/s 170.1ms/op 9011us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqwrite3 6ops/s 5.5mb/s 167.2ms/op 8884us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqwrite2 6ops/s 6.2mb/s 148.6ms/op 8877us/op-cpu
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqwrite1 6ops/s 5.4mb/s 167.6ms/op 9260us/op-cpu

IO Summary: 249 ops 22.9 ops/s, 0/23 r/w 22.5mb/s, 347
543uscpu/op
::::::::::::::
randomread.stats
::::::::::::::
Flowop totals:
rand-rate 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
rand-read1 11269ops/s 88.0mb/s 0.1ms/op 67us/op-cpu

IO Summary: 112852 ops 11269.1 ops/s, 11269/0 r/w 88.0mb/s, 8
63uscpu/op
::::::::::::::
randomwrite.stats
::::::::::::::
Flowop totals:
rand-rate 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
rand-write1 8569ops/s 66.9mb/s 0.1ms/op 95us/op-cpu

IO Summary: 85813 ops 8569.1 ops/s, 0/8569 r/w 66.9mb/s,
1139uscpu/op
::::::::::::::
singlestreamread.stats
::::::::::::::
Flowop totals:
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqread 45ops/s 45.1mb/s 21.3ms/op 7863us/op-cpu

IO Summary: 472 ops 45.2 ops/s, 45/0 r/w 45.1mb/s, 2169
77uscpu/op
::::::::::::::
singlestreamwrite.stats
::::::::::::::
Flowop totals:
limit 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
seqwrite 25ops/s 25.2mb/s 36.5ms/op 8801us/op-cpu

IO Summary: 280 ops 25.3 ops/s, 0/25 r/w 25.2mb/s, 341
069uscpu/op

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