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 504ff128-d990-4fed-8349-dc8a4ba611ad
echo '{"image_uuid": "504ff128-d990-4fed-8349-dc8a4ba611ad"}' | vmadm reprovision FIFO_ZONE_UUID
vmadm list # check to make sure vm state = running (may take a minute or two)
zlogin FIFO_ZONE_UUID
The upgrade to 0.8.3 includes changes to the howl configuration file as detailed in Upgrading FiFo. The following script should work for AIO users:
SED=/usr/bin/sed
CONFFILE=/data/howl/etc/howl.conf
cp ${CONFFILE} ${CONFFILE}.bak
$SED -i bak -e "s/^backend_server =/ddb_connection\.backend_server =/g" ${CONFFILE}
$SED -I bak -e "s/^max_read =/ddb_connection\.max_read =/g" ${CONFFILE}
$SED -I bak -e "s/^pool\.size =/ddb_connection\.pool\.size =/g" ${CONFFILE}
$SED -I bak -e "s/^pool\.max =/ddb_connection\.pool\.max =/g" ${CONFFILE}
$SED -I bak -e "s/^chunk =/dqe\.chunk =/g" ${CONFFILE}
$SED -I bak -e "s/^max_read =/dqe\.max_read =/g" ${CONFFILE}
$SED -I bak -e "s/^upload\.pool_max =/upload\.pool_overflow =/g" ${CONFFILE}
$SED -I bak -e "s/^download\.pool_max =/download\.pool_overflow =/g" ${CONFFILE}
After editing the configuration file, 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.
- 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
- 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 IMPORTAN 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 '{"indestructable_dataset":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
.
Old | New |
---|---|
/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 |
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.
Updated less than a minute ago