Showing posts with label live upgrade. Show all posts
Showing posts with label live upgrade. Show all posts

Friday, 19 June 2009

Solaris Express Community Edition, build 116

This time it wasn't announced: Solaris Express Community Edition build 116 is available for download. Changelogs are here:
It seems there's no bug I'm hitting was fixed in build 116 (while yes, there's a bug I'm waiting build 117 for!). Nevertheless live upgrading is so easy that I'm not missing the opportunity of upgrading my system, as I already explained you in another post.

This time I've experienced a couple of glitches but nothing important: the result is perfectly functioning, as usual. I've hit some minor and inexplicable problems quickly solved:
The issues were partially solved and I'm now happily running my Solaris Express Community Edition build 116.

Haven't you downloaded Solaris or OpenSolaris yet? Don't know what you're waiting for.

Tuesday, 16 June 2009

Solaris Express Community Edition build 115 and a problem with Input Methods

It isn't apparent yet in the announce section of OpenSolaris website but Sun unsupported Solaris Express Community Edition build 115 has been released. You can see changelogs, as usual, at these addresses:
As far as it concerns myself, this release introduces no bug fixes nor RFE I was interested into and your interest may vary depending on the hardware you're running SXCE onto and the OS features you're using.

Nevertheless, I downloaded the DVD image and Live Upgraded my SXCE build 114. Everything went fine with no package installation errors and very little cleanup.

When I booted build 115 I noticed a renewed Volume Control User Interface and experienced a blocking problem: Input Methods weren't working anymore. They just didn't work.

A search on Google was fruitless so I posted a message on the i18n discussion mailing list at OpenSolaris.org and a Sun Engineer gave me a quick response: it's a bug introduced in build 115 and fixed in build 117 (http://defect.opensolaris.org/bz/show_bug.cgi?id=9109).

The workaround is very simple:
# touch /usr/lib/gtk-2.0/2.10.0/immodules/im-iiim.so
# svcadm restart desktop-cache/input-method-cache
and then just logout and login.

Wednesday, 6 May 2009

Housekeeping after live upgrading

As I told on a previous blog entry, I just live upgraded my Solaris Express Community Edition from build 110 to build 113. The live upgrade experience was very good: rapid, painless and pretty secure.

At the end of the live upgrade process, you are informed about the upgrade operation:
  • upgraded packages (/var/sadm/system/logs/upgrade_log)
  • failed upgrades (/var/sadm/system/data/upgrade_failed_pkgadds)
  • required housekeeping steps (/var/sadm/system/data/upgrade_cleanup)
In this case only package SUNWttf-fonts-core failed with the following message (I had to modify for blogger not to screw up the HTML):
Doing pkgadd of SUNWttf-fonts-core to /
pkgadd: ERROR: unable to create package object (/a/usr/openwin/lib/X11/fonts/TrueType/core).
file type (s) expected (d) actual
unable to remove existing directory at (/a/usr/openwin/lib/X11/fonts/TrueType/core)
32963 blocks
pkgadd: ERROR: unable to create package object (/a/usr/openwin/lib/X11/fonts/TrueType/core).
file type (s) expected (d) actual
unable to remove existing directory at (/a/usr/openwin/lib/X11/fonts/TrueType/core)

Installation of (SUNWttf-fonts-core) partially failed.
A bit of investigation and the help of the OpenSolaris community showed that a bug (6833967) is causing the observed failure. The following bug is the guilty:
6810237 - SUNWxwfnt upgrade is broken in 109 due to issues with bad *ph files delivery
If you experience fonts-related problems, here are the steps suggested by the community:
yes | pkgrm -R /a SUNWxwcft SUNWxwoft SUNWxwfnt SUNWttf-fonts-core
rm -rf /a/usr/X11/lib/X11/fonts/
100dpi
rm -rf /a/usr/X11/lib/X11/fonts/75dpi
rm -rf /a/usr/openwin/lib/X11/fonts/
100dpi
rm -rf /a/usr/openwin/lib/X11/fonts/
75dpi
yes | pkgadd -R /a -d /path/to/image/Solaris_11/
Product SUNWxwfnt SUNWxwoft SUNWxwcft SUNWttf-fonts-core
and, in the new ABE:
# rm /var/cache/fontconfig/*
# /usr/bin/fc-cache -f -s
I also tried to solve this problems observing the pkgmap file for that package. Near the end it says:
1 s none openwin/lib/X11/fonts/TrueType/core=../../../../../X11/lib/X11/fonts/TrueType/core
core, in my system, was an empty dir with some stale fonts.cache files. I just removed the directory and restored the link.

Cleaning up.
The last thing to do was examining the upgrade_cleanup file to apply the required cleanup operations. Basically, during live upgrade, two things are likely to happen:
  • Live upgrade does not replace a file because it had been modified
  • Live upgrade does replace a modified file and backs up the previous version
In both cases the administrator should examine the differences and apply the patches when necessary. In my case, for example, I had reconfigured the shipped Apache2 and simply had to check the differences between the two versions of the Apache2 configuration files.

Conclusions.
Upgrading Solaris with live upgrade it's a pretty easy procedure if you're using ZFS for your root pool. I really hope that live upgrade will continue to be a feature of the next generation Solaris. In my opinion, Live Upgrade and ZFS rock.

Monday, 4 May 2009

Live upgrading a Solaris Express Community Edition

It would really be difficult for me to tell the feature I love most in Sun Solaris OS.

Today, trying to troubleshoot a font problem I'm experiencing, I decided to live upgrade my Solaris Express Community Edition from build 110 to build 113.

If you're interested in discovering the details of the Solaris features of the day, you could easily check the extensive official documentation. Let's say that Live upgrade lets you upgrade your OS while the system is running, creating an alternate boot environment. This process, which could be used with UFS, it's even easier with ZFS.

Check your tools.
The first thing you should do is installing the Live Upgrade packages from the Solaris distribution you're going to install. I'll repeat: The first thing you should do is installing the Live Upgrade packages from the Solaris distribution you're going to install. If you're installing from a DVD, just insert into the drive bay. If you just downloaded an ISO image you can just:
# mkdir /mnt/iso
# lofiadm -a /path/to/solaris/iso
[lofiadm will print on standard output a lofi device number such as /dev/lofi/n]
# mount -F hsfs -o ro /dev/lofi/n /mnt/iso
Now you can upgrade your tools:
# pkgrm SUNWlucfg SUNWluu SUNWlur
# pkgadd -d /mnt/iso/Solaris_your-version-here/Product SUNWlucfg SUNWluu SUNWlur
Creating a boot environment.
The creation of a boot environment is a straightforward process, which is pretty instantaneous on ZFS:
# lucreate -n BEName
I usually use snv_buildnum as my boot environments' name and in this case it's snv_113. If you want to check that everything's OK you can issue a:
# lustatus
and check the output to see if your new boot environment has been correctly initialized. If you check your ZFS file systems and snapshots, you'll notice something like this (don't look at used space because these boot environments have already been upgraded):
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 115G 113G 35.5K /rpool
rpool/ROOT 21.9G 113G 18K legacy
rpool/ROOT/snv_110 19.1G 113G 12.2G /
rpool/ROOT/snv_110/var 6.84G 113G 6.84G /var
rpool/ROOT/snv_113 2.82G 113G 11.8G /a
rpool/ROOT/snv_113/var 102M 113G 6.85G /a/var
You have a couple of brand new file systems for your new boot environment. Your output may vary because I decided to have /var on a separate file system.
# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
rpool/ROOT/snv_110@snv_113 9.17M - 12.2G -
rpool/ROOT/snv_110/var@snv_113 1.94M - 6.84G -
What happened, basically, is that ZFS snapshotted your current boot environment and subsequently cloned it. That's ZFS in action! With traditional file systems, such as UFS, "snapshotting" or "cloning" the entire partition would have taken a great amount of time. With ZFS copy on write semantics, it takes fractions of a second and almost a null amount of additional storage.

Upgrading the boot environment.
The last, and longest, step in the procedure. I suggest you to read luupgrade man page but, basically, you can just issue a:
# luupgrade -u -n snv_113 -s /mnt/iso
and wait until the end. Please read luupgrade output, which usually is important, and save it to a file. You would probably need to revise it later. If everything went fine you can activate your new boot environment, reboot, and enjoy your new OS with just a:
# luactivate snv_113
# init 6
You will be told by luactivate but I'll repeat: use init or shutdown to reboot your system. Before switching boot environment, Solaris needs to execute the final configuration steps which are performed during a clean reboot.

The last suggestion.
Live Upgrade helps you upgrade your system without risk and downtimes but remember: time is a precious asset and I don't like to restart a long-running task because a remote connection has been reset. If you plan to live upgrade from a remote terminal, at least use screen or some equivalent tool. Don't lose your session!

Forewarned is forearmed.

In the next blog entry I'll tell you about housekeeping activities you must perform after live upgrading.