Upgrading FiFo AIO Dataset

FiFo Upgrade Guide

❗️

It is highly advisable that you make a snapshot of your FiFo Zone delegated dataset before updating. While the procedure should be safe it is always better to remain on the side of caution.

Zone

Upgrading a FiFo AIO zone is as easy as reprovisioning.

imgadm avail | grep fifo
imgadm import b67e58ba-b4f1-4a99-98d4-0df132a57343
echo '{"image_uuid": "b67e58ba-b4f1-4a99-98d4-0df132a57343"}' | vmadm reprovision FIFO_ZONE_UUID
vmadm list # check to make sure vm state = running (may take a minute or two)
zlogin FIFO_ZONE_UUID

Start the fifo services:

svcadm enable epmd
svcadm enable snarl
svcadm enable howl
svcadm enable sniffle
sleep 10 #wait for services to try starting
svcs -xv

Hypervisors

There are two ways to update the server on the hypervisor.

  1. Connect to the hypervisor and run:
/opt/chunter/bin/update -u

It's always good to confirm Chunter is running:

svcs chunter
STATE          STIME    FMRI
online         21:16:28 svc:/network/chunter:default
  1. Use fifoadm to update a hypervisor by running:
fifoadm hypervisors update

This will trigger all hypervisors to update.

Converting from older installations

Older installations don't have a delegate dataset and don't store data in the /data/ partition. While this makes a direct update vie the AIO dataset not possible there is a procedure to convert a old dataset to one that can be upgraded via the AIO dataset.

The process involves multiple steps and it's IMPORTANT to make a backup of the data prior to starting it!

Adding a delegate

While vmadm does not support adding delegates it is possible with the following commands

ZONE=0d2b7f71-e4f8-ca89-bfc5-d9017220e19f
zfs create zones/${ZONE}/data
cat <<EOC | zonecfg -z ${ZONE}
add dataset
set name=zones/${ZONE}/data
end
verify
commit
EOC
echo '{"indestructible_delegated":true}' | vmadm update ${ZONE}
vmadm reboot ${ZONE}

Notice that the vm needs to be rebooted for this.

Moving the data onto the delegate

At this point all FiFo services need to be disabled on the node.

❗️

existing /data folder

Make sure before mounting the data directory the 'old' /data is out of the way! this can be done by running mv /data /data.old. And then copying the old content back onto the new mount!

How to put the delegate into the right place can be found in the Installing FiFo. Once the delegate is in place the next task is to move the data. In the old system FiFo put the data in /var/db/ and /var/log/ now it's in /data.

OldNew
/var/db/sniffle/data/sniffle/db
/var/log/sniffle/data/sniffle/log
/var/db/snarl/data/snarl/db
/var/log/snarl/data/snarl/log
/var/db/howl/data/howl/db
/var/log/howl/data/howl/log
/var/log/leo_*/data/leo_*/log
/var/db/leo_*/data/leo_*/db

The directories in /data/ and all their subdirectories need to be owned by the respective user and the home directories in /etc/passwd should be adjusted accordingly.

Updating the config

The config file in /data/<serivce>/etc/<service>.conf will still point to the /var/db and /var/log directories, this needs to be changed too. Once that is done the can be started manually one by one using <service> console to verify everything is working, CTRL+C+C

Once verified everything works the services can be enabled again.