Dealing with slow lofs performance on opensolaris hosts

I went to update the Nevada image on my jumpstart server today, and noticed that my loopback mount was performing terribly:

                 extended device statistics              
    r/s    w/s   Mr/s   Mw/s wait actv wsvc_t asvc_t  %w  %b device
   11.5    0.0    0.0    0.0  0.0  1.0    0.0   86.5   0  99 lofi1



Ouch! 11 reads per second causes the loopback device to become 100% busy. It turns out this is bug #6806627, which is fixed in Nevada build 112. I got around the issue by using a Linux host to copy the CD contents, and then running setup_install_server from that location. Now I should be able to live upgrade the host to something a bit more current.

Getting live upgrade to work with a separate /var

While performing a live upgrade from Nevada build 54 to Nevada build 57, I bumped into the following error:

$ lucreate -n Nevada_B57 -m /:/dev/dsk/c1d0s0:ufs -m /var:/dev/dsk/c1d0s3:ufs -m -:/dev/dsk/c1d0s1:swap

Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Analyzing system configuration.
Comparing source boot environment file systems with the file 
system(s) you specified for the new boot environment. Determining which 
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Searching /dev for possible boot environment filesystem devices

Template entry /var:/dev/dsk/c1d0s3:ufs skipped.

luconfig: ERROR: Template filesystem definition failed for /var, all devices are not applicable..
ERROR: Configuration of boot environment failed.

The error message provided little information on what the actual problem was, and when I removed “-m /var:/dev/dsk/c1d0s3:ufs” from the lucreate command line, everything worked as expected. Being extremely baffled by this problem, I started reading through the opensolaris.org installation forum, and eventually came across a post from Nils Nieuwejaar. Nils mentioned that he had debugged an issue where the partition flags weren’t set to “wm”, and this had caused his live upgrade to fail. I used Nils feedback, and went into format to change the partitiong flags for the new “/var” file system to “wm”. Once I saved my changes and ran lucreate again, everything worked as expected:

$ lucreate -n Nevada_B57 -m /:/dev/dsk/c1d0s0:ufs -m /var:/dev/dsk/c1d0s3:ufs -m -:/dev/dsk/c1d0s1:swap

Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Analyzing system configuration.
Comparing source boot environment  file systems with the file 
system(s) you specified for the new boot environment. Determining which 
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Searching /dev for possible boot environment filesystem devices
                             
Updating system configuration files.
The device  is not a root device for any boot environment; cannot get BE ID.
Creating configuration for boot environment .
Source boot environment is .
Creating boot environment .
Checking for GRUB menu on boot environment .
The boot environment  does not contain the GRUB menu.
Creating file systems on boot environment .
Creating  file system for  in zone  on .
Creating  file system for  in zone  on .
Mounting file systems for boot environment .
Calculating required sizes of file systems for boot environment .
Populating file systems on boot environment .
Checking selection integrity.
Integrity check OK.
Populating contents of mount point .
Populating contents of mount point .
    < ..... >

Now to convince the live upgrade developers to clean up their error messages. :)