The Source for Java Technology Collaboration
User: Password:



Lucas Torri's Blog

March 2008 Archives


ZFS, Indiana, VirtualBox and a bunch of memory sticks

Posted by lucastorri on March 30, 2008 at 09:57 PM | Permalink | Comments (1)

After installing Solaris in my machine, I'm trying to learn more about ZFS, that, in the words found at OpenSolaris website, "is a new kind of file system that provides simple administration, transactional semantics, end-to-end data integrity, and immense scalability".

In the end of last year, I saw some slides from a presentation about ZFS from Sun, using a bunch of memory sticks to create a file system, and thought that very cool. Today, I found an article called "Playing with ZFS, USB memory disks and VMware Fusion" and decided to try it myself, but in a different way, using VirtualBox instead of VMware.

First of all, I installed VirtualBox in Ubuntu Linux. After enabling the respective repository, just did an "sudo apt-get install virtualbox-ose" and added my user to the "vboxusers" group. Then created a virtual machine for a Solaris installation and installed the preview 2 of project Indiana. I was having problems to install Indiana every time I gave information for creating a new user, but when I gave just root password everything went fine.

For this test, I got two pendrives: one with 1Gb from PQI and a USB memory card adapter from Nokia, with a 512Mb mini SD card. VirtualBox was presenting some problems to use USB devices, but after some googling I found the solution here (Portuguese) and here.

With VirtualBox working, was time to create my first ZFS pool.

With the command "rmformat", I discovered that the two memory sticks were the devices "/dev/rdsk/c9t0d0p0" and "/dev/rdsk/c10t0d0p0". Therefore, created the pool with command "zpool create -f usbdisk c9t0d0p0 c10t0d0p0".

Now, with "df -h", there was a new file system called "usbdisk" with 1.4GB (the adition of the two memory sticks :).

But I was curious to see if it was really working, so I created a new file in "/usbdisk" with 1200Mb (bigger than the bigger memory stick capacity), and there it was:

Rebooted the system to check it was really true, and the file still was there. That's Great! Fantastic for projects like to create "A Home Fileserver using ZFS".

But after closing the virtual machine and openning it again the file wasn't there anymore. This got me upset, but just for a few seconds before I saw that still there was something in the pool, using "zpool list".

Then executing "zpool export usbdisk" and "zpool import usbdisk" all got back again. Must be something related with the usb devices, but now I know there is no problem removing the devices or even mixing them.

There are alot of features available in ZFS, like creating file system with RAID redundace, use the available GUI and many more. Here are some additional information:

* Solaris Operating System - ZFS Learning Center
* BigAdmin Feature Article: ZFS Overview and Guide



Tri-Boot System: Linux, Solaris and Windows

Posted by lucastorri on March 18, 2008 at 07:52 AM | Permalink | Comments (3)

I just finished to setup my laptop with a Tri-Boot System with Ubuntu Linux, Solaris 10 and Windows Vista. Here are some tricks I discovered during this process.

Linux is the OS that I use the most and usually I create a different partition for the "/home" directory, cause it's more practice if I decide to reinstall the entire system. With Solaris, I'm still learning about this OS, preparing myself for Indiana and trying to learn more about the amazing tools on it (ZFS, Zones, DTrace, etc). Windows I keep mostly for some software tests and games =P.

So, at that moment I had to start creating the disk partitions. There is a partition for the Linux root directory ("/"), one for Linux home, Linux swap, one for Solaris and the last for Windows. Briefly, I would divide my disk in five pieces.

For the disk partitioning process, I used GParted Live CD. At this moments I learned something: when trying to create an logical partition for each of this pieces and was receiving an error message from GParted. Then, I discovered that "a PC hard disk can contain either as many as four primary partitions, or 1-3 primaries and a single extended partition" in a Wikipedia Disk Partitioning article. Therefore, I changed my strategy. I've created a logical partition for Solaris and Windows, and a extended one to Linux. Here is the result:



In the image, the last partition, where Solaris 10 is installed, you can see that GParted displays it as Linux Swap. This happens because every partition type is identified by one byte at the MBR, and Solaris and Linux swap identifier are the same (x86: Change to Solaris fdisk Identifier).

After the disk partitioning, was time to install the Operating Systems. I'm not going to write about installing them, because I believe there are no complications at this steps, you just have to select the right partitions you've created for each OS. I started with Windows, them Linux and finished with Solaris (if you are following this steps, please keep reading before you try this).

After this steps, GRUB was loading the menu placed in the Solaris partition. It didn't detected the Linux installation, so there was no option in the GRUB menu for booting Linux when. Like I said before, I use mostly Linux, so I prefer that the menu that was in Linux to be shown. To recover it, I followed the steps at an Ubuntu Tutorial, called Recovering Ubuntu after installing Windows, to fix the MBR. If you prefer this too, I really recommend that you install Solaris before Linux, so you can skip the recovering process.

But with the Linux GRUB menu running, I wasn't able to boot Solaris. To fix that, just add the following lines at the end of your menu.lst (/boot/grub/menu.lst):

title Solaris
rootnoverify (hd0,1)
chainloader +1


Next time you reboot you computer, there will be another option in the GRUB menu, called "Solaris", that when is selected it calls the Solaris GRUB menu.



I passed SCJA ;)

Posted by lucastorri on March 12, 2008 at 11:59 AM | Permalink | Comments (5)

Good news. Yesterday I took the Sun Certified Java Associate exam and passed! Now, I would like to share this experience with you...

First, to get prepared for the exam, I started reading some material about it's content that I found at the Internet. For example:

http://www.scja.de/index.html
http://ejavaguru.com/scjafreemockexam.php
http://www.whizlabs.com/articles/scja-article.html
http://cafe4java.com/mockexams/scja/mock1/q1.php
http://www.javacertificate.net/interview_qns.htm

Every Sun Campus Ambassadors has the possibility of earn free vouchers for Sun Certifications and pay nothing to take the exams. The only requisite is to do a test at Learning Connection (http://learningconnection.sun.com)*¹ and pass it. So, after I did the exercises at the websites I mentioned, I went to Learning Connection and took a test exam called "Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0 (WGS-PREX-J019C)". In this test, you have to do 4 exams with 51 questions each, covering the content necessary for SCJA and you have to answer correctly at least 35 of this questions in each exam. Done that, I requested my free voucher.

Then, I went to Prometric website, created an account, chose the date and one available center in my city, Florianópolis. That's it, I just had to wait a few days and come to the appointment.

So, yesterday, like I told before, I went to SENAC, here in Florianópolis to took the exam. The appointment was at 6h pm, but I arrived at 4h30 pm. Please, don't do that, cause you will have to sit and wait :P. When was time, I was asked for two documents with signature and photo. I presented my drivers license and my passport. After that, I was conducted to a tiny room (2x1 meters, I think), where there is only a computer inside e two vigilance cameras (I think it's not a good idea try cheating :).

You sit and start the exam process. First, I had to answer a little survey about the knowledge level I believe I have (basic, advanced, etc). Then, the real exam starts, but you don't really have to be scared, cause the exam questions looks pretty much like the questions that are available in Internet and Learning Connection about SCJA. Also, there are plenty time to answer the 51 questions, a little less than two hours.

In the beginning, I stayed a little nervous. Answered the first, the second... (now you start to see there is no mystery at all), end in the 51th. You can now check your answers. It's everything OK? You finish the exam and a message appears telling that your result is in the registry room. this is the tense moment, where you leave the room and have to go back and check how well you did. When you arrive there, the Secretary will give you a mysterious look, just to try get you nervous :P. Don't worry, in few moments she will show your results and you will realize that everything was all right.


I passed with 96%! Even the security guy gave me a smile =)

This text was all about showing you that there is no complication in taking a Certification, only benefits. For example: now, I'm sure that my Curriculum looks better. I think I spent about 6 hours studying. I just payed attention at the exercises and every time I missed a question I tried to understand why I was wrong.

Now, good luck to you! I will start to study to SCJP...

*¹ Learning Connection has several courses about Sun Technologies. To be able to access it, your University should be part of Sun Academic Initiative.

--
;)

Lucas B. Torri
[00:12:62:F8:E1:0C]





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds