Eric Boutilier

Systems Administrator, OpenSolaris Engineering

profile page

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.

Like this post? del.icio.us | furl | slashdot | technorati | digg
Comments:

YMMV, but if you're not going to upgrade anything in /opt then just use -x /opt for the lucreate. Has worled for me so far.

Posted by Mads on July 04, 2008 at 01:26 PM CDT #

@mads: I used lumake in this case, which doesn't have the -x option - which I didn't know about actually. Also, upgradeing to build 88 (From b64a) did have stuff to upgrade in /opt, and I'm thinking it might not have been a good idea to skip them in my situation.

BTW, cool that you're too are into blues. Here's on of my favorite sites: http://roadhousepodcast.com/

Posted by 69.17.24.209 on July 04, 2008 at 07:24 PM CDT #

Post a Comment:
Comments are closed for this entry.