Skip to main content

Upgrade Ubuntu to version 16

This is an online upgrade of Ubuntu. Make sure you have an active internet connection. These steps are common for upgrading Motadata master server and Motadata RPE server.

  1. Stop motadata and clickhouse-server services:

    service motadata stop //wait till all services are stopped.
    service clickhouse-server stop //wait till all services are stopped.
  2. Perform apt-get update and upgrade commands:

    apt-get update
    apt-get -f install
    apt-get upgrade //system will ask for confirmation. Select Y.
    apt-get dist-upgrade //system will ask for confirmation. Select Y.
  3. Reboot the server and stop clickhouse service again:

    reboot //wait till server is up again.
    service clickhouse-server stop
    apt-get clean //clears the cache memory
  4. Download the upgrade ubuntu 14 to 16.zip file. Extract the zip file.

    //upload location path:
    cd /motadata

Following files and folders should be uploaded:

  • motadata-datanode
  • motadata-master
  • motadata-observer
  • motadata-rpe
  • clickhouse.tar.gz
  • UbuntuUp16Packages.tar.gz
  1. From extracted files, copy the UbuntuUp16Packages.tar.gz to archives directory.

    cp -pr UbuntuUp16Packages.tar.gz /var/cache/apt/archives
  2. Extract UbuntuUp16Packages.tar.gz:

    cd /var/cache/apt/archives
    tar -zxvf UbuntuUp16Packages.tar.gz
  3. Perform ubuntu 14 to 16 upgrade process and give necessary input during upgrade process

    cd /var/cache/apt/archives
    do-release-upgrade

    //system will ask for below inputs. Use your custom inputs or select the default inputs:
    ask for another ssh daemon, select yes
    ask for continue, press enter
    ask for package, upgrade process select yes
    ask for remove statistics data files, select yes
    ask for Restart services during upgrades without asking, select yes
    ask for Configuring unattended-upgrades, select 2nd option "keep local version"
    ask for Remove obsolete packages, select yes
    ask for system restart when upgrade is done, select yes

You may get an error in downloading linux header package. This is because, linux frequently upgrades its header package.

Error in Downloading Linux Header Package

To solve this issue, you need to download the package manually. Ubuntu shows the path of file from where you have to download the package.

File Path to Download Package Manually

Use wget command followed by the path shown in error to download the file.

cd /var/cache/apt/archives
wget <file_path shown in error message>
do-release-upgrade //run the command again.
  1. Verify the Ubuntu version:

    lsb_release -a
  2. Stop the clickhouse service:

    service clickhouse-server stop
  3. Copy the clickhouse.tar.gz in opt directory:

    cd /motadata
    cp -pr clickhouse.tar.gz /opt
  4. Extract clickhouse.tar.gz:

    cd /opt
    tar -zxvf clickhouse.tar.gz
  5. Go to clickhouse directory created:

    cd /opt/clickhouse
  6. Run de-package command. Make sure you select N during installation. Else, you will loose all your clickhouse data.

    dpkg -i *.deb
    note

    Select default option N during installation so that config.xml doesn’t get overwritten with default settings.

  7. Verify clickhouse version:

    dpkg -l | grep -i clickhouse

    // current clickhouse version is 1.1.54370 in (all components)
  8. Copy following services in system directory.

  • motadata.service

  • motadata-cluster.service

      cd /motadata/motadata-master
    cp -pr motadata.service motadata-cluster.service /lib/systemd/system
  1. Remove following service files from init.d.
  • motadata
  • motadata-ha
  • motadata-cluster
    cd /etc/init.d
    rm -rf motadata
    rm -rf motadata-ha
    rm -rf motadata-cluster
  1. Reload systemctl daemon:

    systemctl daemon-reload
  2. Start clickhouse and motadata services:

    service clickhouse-server start