PowerVC

 View Only

VIOS Upgrade in PowerVM Novalink environment

By Ramakrishnan Ramasubbu posted Fri December 04, 2020 03:07 AM

  

Introduction

NovaLink Installer (ISO based) is designed for IBM power machines customers to utilize minimal resources, hence it has NovaLink logical volume within rootvg.

When you upgrade VIOS, the NovaLink logical volume (LV) is deleted and you must re-install NovaLink. In this blog, you will see how to upgrade VIOS without NovaLink logical volume getting deleted. The procedure involves the following steps.

  1. Copying NovaLink volume (novalinklv) to new volume group
  2. Upgrade VIOS
  3. Restore the Configuration
    1. Rebuilding the PowerVM NovaLink RAID array (Applicable for Dual VIOS with RAID)
    2. Copying NovaLink logical volume back to rootvg (Optional: If user wants to retain the NovaLink logical volume in the new Volume Group itself)

To achieve this, one more volume group must be created (preferably in another disk) where you can copy novalinklv.

Pre-requisite

  • One additional hard disk is required in the VIOS for creating the new VG (lspv). To check the pre-requisite disk availability run $ lspv

 Given below is an example of the output.

 NAME             PVID                                           VG               STATUS
hdisk0           000543ea8a09586b                     rootvg           active
hdisk1           none                                          none
hdisk2           none                                      none

As you see, hdisk0 has rootvg. hdisk1 and hdisk2 are free to create a volume group. In this example, we have taken hdisk2.

  • In a scenario where you have dual VIOS and the NovaLink LPAR is configured in raid mode, you do not see any disruption; and hence, you need not power-off or stop NovaLink LPAR.
  • For raid configuration, you can check the disk raid status using following command:

neo@neo45:~$ lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINT

Given below is an example of the output.

 NAME                 SIZE FSTYPE            TYPE  MOUNTPOINT
sda                   30G                   disk
sda1                 7M                   part
sda2               488M linux_raid_member part
│ └─md0            487.7M ext4              raid1 /boot
└─sda3              29.5G linux_raid_member part
  └─md1             29.5G LVM2_member       raid1
    pvmvg-root     8.6G ext4              lvm   /
    pvmvg-swap_1   3.8G swap              lvm   [SWAP]
    pvmvg-var      9.5G ext4              lvm   /var
    pvmvg-tmp      976M ext4              lvm   /tmp
    └─pvmvg-home       6G ext4              lvm   /home
sdb                   30G                   disk
sdb1                 7M                   part
sdb2               488M linux_raid_member part
│ └─md0            487.7M ext4              raid1 /boot
└─sdb3              29.5G linux_raid_member part
  └─md1             29.5G LVM2_member       raid1
    pvmvg-root     8.6G ext4              lvm   /
    pvmvg-swap_1   3.8G swap              lvm   [SWAP]
    pvmvg-var      9.5G ext4              lvm   /var
    pvmvg-tmp      976M ext4              lvm   /tmp
    └─pvmvg-home       6G ext4              lvm   /home
  • In case of a single VIOS, it is recommended to keep the NovaLink LPAR powered-off during entire operation (~3 to 4 hours depending on network speed and configuration in rootvg).

Copying NovaLink volume (novalinklv) to a new volume group

Perform the following steps to copy NovaLink logical volume to the new volume group (VG).

  1. Run $ mkvg -f -vg novalinkvg hdisk2 to create a new volume group where you can copy the novalinklv.
$ mkvg -f -vg novalinkvg hdisk2
hdisk2 changed
novalinkvg
0516-1254 mkvg: Changing the PVID in the ODM.


 
Note: LV should be inactive for it to be copied to another volume group. If the logical volume is connected to an LPAR through an adapter, then you must disconnect it before performing cplv.

  1. Run lsmap -all command to check the adapter connected to novalinklv
$ lsmap -all
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0          U8247.22L.211D9FA-V2-C2                      0x00000001
VTD                   vtscsi0
Status                Available
LUN                   0x8100000000000000
Backing device        novalinklv
Physloc              
Mirrored              N/A
  1. Disconnect the adapter ‘vtscsi0’ so that the novalinklv is disconnected.
$ rmdev -dev vtscsi0
vtscsi0 deleted
  1. Copy the novalinklv to another VG.
cplv -vg novalinkvg -lv novalv novalinklv
cplv: Logical volume novalinklv successfully copied to novalv .
  1. Now, attach the adapter back to the new logical volume novalv
$ mkvdev -vdev novalv -vadapter vhost0
vtscsi0 Available
  1. Delete the novalinklv from rootvg
$ rmlv -f novalinklv
rmlv: Logical volume novalinklv is removed.

At this stage, the NovaLink LPAR will be operating from this VIOS LPAR from the new LV.

 

Upgrade VIOS

Refer to the ‘Viosupgrade’ blog or ‘viosupgrade process’ for details on upgrading VIOS.

  

Restore the configuration

a. Rebuilding the PowerVM NovaLink RAID array (Applicable for Dual VIOS with RAID)

By default, the PowerVM NovaLink partition uses two 30 GB logical volumes, each of which is hosted by an instance of Virtual I/O Server. The logical volumes are mirrored by using RAID 1. Each time you reboot or take down for maintenance one of the instances of Virtual I/O Server, the RAID array puts one of the disks into failure mode. The RAID array is rebuilt automatically every 15 minutes. However, if you want to rebuild the RAID array immediately after a Virtual I/O Server comes up, enter the following command at the PowerVM NovaLink command line.

neo@neo45:~$ sudo /usr/sbin/pvm-rebuild-raid
[sudo] password for neo:
- Device /dev/md/0 needs repair - attempting...
gettext: unrecognized option '-- Repairing array $label ($md_name)...'
gettext: unrecognized option '-- Adding $blkid to array device $md_name'
gettext: unrecognized option '---- # mdadm $mdname -a $blkid'
---- mdadm: added /dev/sda2
- Device /dev/md/1 needs repair - attempting...
gettext: unrecognized option '-- Repairing array $label ($md_name)...'
gettext: unrecognized option '-- Adding $blkid to array device $md_name'
gettext: unrecognized option '---- # mdadm $mdname -a $blkid'
---- mdadm: added /dev/sda3
For details, refer to Recovering the PowerVM NovaLink partition topic.

 This rebuilding of raid must be performed if you are planning to switch between VIOSes within the specified time limits (~15 Minutes + time required to sync up).

 Now, you can follow the same approach for the redundant VIOS (Or this can be done later also)

b. Copying NovaLink logical volume back to rootvg

(Can be skipped: If you want to retain the NovaLink logical volume in the new Volume Group itself)

At this point, you will be copying the temporary NovaLink LV created in the temporary VG to the rootvg.

  1. Check for the adapter to novalv mapping by using the command ‘lsmap -all’.
$ lsmap -all
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0          U8247.22L.211D9FA-V2-C2                      0x00000001
VTD                   vtscsi0
Status                Available
LUN                   0x8100000000000000
Backing device        novalv
Physloc              
Mirrored              N/A
  1. Detach the adapter from novalv.
$ rmdev -dev vtscsi0
vtscsi0 deleted
  1. Copy novalv back to novalinklv.
$ cplv -vg rootvg -lv novalinklv novalv
cplv: Logical volume novalv successfully copied to novalinklv
  1. Attach the adapter back to novalinklv.
$ mkvdev -vdev novalinklv -vadapter vhost0
vtscsi0 Available

Now, the NovaLink LPAR will be using novalinklv freeing up novalv.

$ lsmap -all
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0          U8247.22L.211D9FA-V2-C2                      0x00000001
VTD                   vtscsi0
Status                Available
LUN                   0x8100000000000000
Backing device        novalinklv
Physloc              
Mirrored              N/A

You can delete the novalv and novalinkvg created for this upgrade process

Deletion of novalv

$ rmlv -f novalv
rmlv: Logical volume novalv is removed.

Deletion of novalinkvg (Do this step if the VG was explicitly created for VIOS Upgrade)

$ reducevg novalinkvg hdisk2
ldeletepv: Volume Group deleted since it contains no physical volumes.
hdisk2 changed

Now the system status reverts to original where novalinklv resides within rootvg.

So, we have seen how simple it is to upgrade VIOS without disturbing the NovaLink LPAR.

Happy reading, stay tuned with us.

Keep watching our social outlets for more interesting information about PowerVC! Find us on Facebook and LinkedIn

1 comment
30 views

Permalink

Comments

Tue August 17, 2021 08:47 AM

The minimum current VIOS level required for this approach is 2.2.6.51 because of known issue/limitation  with cplv command.