Being sneaky with luupgrade when /opt is a zfs filesystem
Thursday Jul 03, 2008
Hacking around with luupgrade on a Nevada SXCE (OpenSolaris) server when /opt is a ZFS filesystem but the root file system is UFS. In this example the file system (mounted at /opt) is called optpool:
YMMV...
comments, corrections, improvements welcome...
Disable services that use /opt and any others that make sense.
Backup /opt (e.g. with rsync)
Unmount (zfs unmount) the optpool filesystem
Run luupgrade
Change the mountpoint property (zfs set) of optpool to a temporary mountpoint. And make sure it mounted there, or zfs mount it manually.
Go to that mountpoint and rename directories that need to be moved out of the way, e.g. perhaps SUNWmlib.
Mount the new BE (lumount)
Note that luupgrade, being a bit confused, probably created a new /opt and installed some stuff there. Copy that stuff over to where you temporarily mounted optpool. E.g:
cd /.alt.new_be/opt && /bin/tar -cpf - SUNWmlib | (cd /tmpmountpoint && /bin/tar -xpvf -) # YMMV
Repeat as necessary, some possibilities (i.e. these showed up in /opt in a b64a->b88 luupgrade for example): SUNWtvnc SUNWvgl SUNWjavadb TurboVNC VirtualGL
Now do luactivate and reboot (init 6)
Move (mv) the bogus /opt directory out of the way.
Change the mountpoint property (zfs set) of optpool back to /opt, and make sure it mounted.
init 6 again
Review the state of SMF services, svcs -x, etc. of course.











YMMV, but if you're not going to upgrade anyt...
@mads: I used lumake in this case, which doesn't h...