ZFS, Indiana, VirtualBox and a bunch of memory sticks
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: