Sun recently shipped their second revision of OpenSolaris. It defaults to installing to and booting from a ZFS zpool. Intrigued by ZFS’s effortless snapshotting I decided to install OpenSolaris in a VM and try out its abilities as a fileserver. As a part of my research I learned that Sun produces a GUI management tool for ZFS but that its not included. I set out to get it installed and this is how I was able to.
What You’ll Need
- A working installation of OpenSolaris 2008.11.
- A copy of the Solaris Community Edition.
- My Perl installation script.
Instructions
Sun doesn’t distribute the ZFS GUI tool with OpenSolaris, but it does come with the binary only Community Edition, possibly for licensing reason. However, OpenSolaris includes the package management tools that ship with regular Solaris so its relatively easy to bring the packages over. This site has a list of the packages required for the Java Web Console, which the ZFS manager plugs in to. Finally, a kindred spirit provided the package names for the ZFS plugin. With the help of the Solaris Package Companion I was able to sort out the dependencies I needed to install and I wrote the script below to do it.
The Script
The script needs to be run as root or as a user with administrative privileges. Change the $pkg_srv variable to point to the source of the packages if necessary. The “smcwebserver enable” line will cause the Java Web Console to be started at boot up, remove it if you want to trigger its start manually.
$pkg_src = "/media/SOL_11_X86/Solaris_11/Product";
@packages = (SUNWjhrt, SUNWjhdev, SUNWj5dev, SUNWj5rt, SUNWj6rt, SUNWjato, SUNWmcon, SUNWmconr, SUNWmcos, SUNWmcosx, SUNWmctag, SUNWmfrun, SUNWzfsgr, SUNWzfsgu);
foreach $package (@packages) {
system("cp -R $pkg_src/$package /var/spool/pkg");
}
system("pkgadd");
system("smcwebserver enable");
system("smcwebserver start");
system("firefox https://localhost:6789");