OpenSolaris and ZFS
I use VirtualBox to run various Unix distributions on my home desktop. I had an OpenSolaris installation that somehow got unbootable during a regular package upgrade, and unfortunately I had some files (package info files) on my home directory, that I really wanted back. Since I couldn't figure out how to make this installation bootable again, I started with a fresh OpenSolaris installation (under VirtualBox), hoping that I could somehow mount the old VDI. And yes, it did work, after some experimentation with the zfs and zpool command line utilities.
The first thing I had to do was to configure VirtualBox to make the old VDI (disk partition) available to the new OpenSolaris installation. This is really easy to do, so I'm not going to go into details here. Once that is done, the new disk showed up as "c0d1", so now I had to figure out how to activate the ZFS pool. Since this pool has the same name (and mount point) as my new OpenSolaris installation, it turned out to be a bit trickier than I thought. First of all, I had to find the pool ID of the pool, which you get by simply running zpool import. This is the easy part, and in my case, the ID was "9894566475259874708". Now, to import this pool, we have to rename it as well:
# zpool import -f 9894566475259874708 lpool
The -f was necessary to force it to do the import, since it still seemed to think that I wanted to import over the existing rpool name. And, I also got warnings about this with the -f option, but it seemed to be harmless. Once this was done, I had to change the mountpoint of the home directory to something else (e.g. "/OLD"), and finally I could mount it:
# zfs set mountpoint=/OLD lpool/export/home
# mount /OLD
Voila!