IBM Support

Why can't i perform viosupgrade on my alternate disk ?

Question & Answer


Question

When running the viosupgrade command you need to choose the target disk where you want either to clone your current install, or either where you want to install your new VIOS 3.1.

It's a common idea to use the alternate rootvg disk from VIOS as target of the viosupgrade command.

For instance, in such setup :

   $ lspv
   NAME             PVID                                 VG               STATUS
   hdisk0           00f610e1a43cfdde                     rootvg           active
   hdisk1           00f610e1e9680469                     old_rootvg
   hdisk2           none                                 None             
   hdisk3           00f610e1a9f85046                     caavg_private    active
   hdisk4           none                                 None             
   hdisk5           none                                 None             
   hdisk6           none                                 None             
   hdisk7           none                                 None             
   hdisk8           none                                 None             
   hdisk9           00f610e1c92f3a11                     None             
   hdisk10          00f610e1dd180035                     None             
   hdisk11          00f610e1dd0b98e0                     None             
   hdisk12          none                                 None             
   hdisk13          none                                 None              

We would like to use hdisk1 as the target disk of our viosupgrade command.

One of the first step of the viosupgrade process is to check this target disk is not in use by anything on the VIOS. If the disk is considered in use, we'll see the following error message :

   $ viosupgrade -t bosinst -n polaris -m VIOS_INST_31 -p VIOS_SPOT_31 -a hdisk1 -e Milky_hosts -c
   Welcome to viosupgrade tool.
   Operation triggered for given node(s).
   Check log files for more information,
   Log file for 'polaris' is: '/var/adm/ras/ioslogs/polaris_10027334_Thu_Nov__8_14:33:28_2018.log'.
   Please wait for completion..
   polaris: The provided disk 'hdisk1' is in use.
   -----------------------------------
   Installation failed for VIO Servers:
   polaris
   -----------------------------------

Answer

The viosupgrade process is using the following command to check if disk is free :
   $ lspv -free
   NAME            PVID                                SIZE(megabytes)
   hdisk9          00f610e1c92f3a11                    12288           

The viosupgrade command will fail with similar error until hdisk1 is listed in previous command output.

Here the disk is not listed because there's a VGDA on it, and so it is considered in use.
So we first need to do the cleanup on this disk, to do so :

   $ oem_setup_env
   # alt_rootvg_op -X old_rootvg

   --> This will remove ODM entries from our VIOS, but the VGDA will remain on disk, so we first have to clear it

   # chpv -C hdisk1
   # exit
   $ lspv -free
   NAME            PVID                                SIZE(megabytes)
   hdisk1          00f610e1e9680469                    51200
   hdisk9          00f610e1c92f3a11                    12288           

Note : Running this set of command will delete the content on this disk, so make sure this disk is not in use by any client lpar or other VIOS purpose.

Special consideration when using NVMe drive.

There is a known defect in viosupgrade when using NVMe drive :
  APAR IJ10549 ios.cli.rte 6.1.9.402 Adding support for NVMe disk in viosupgrade tool.

If you are using NVMe drive, please first check this APAR is installed. (It is included in VIOS 2.2.6.32).
Once installed you can go ahead and follow previous procedure. (for NVMe drive, use the command "lspv -unused" instead of "lspv -free").


Note : This problem will not happen if you try to use one of disk copy of your mirrored VIOS.
       When running unmirrorios, the reducevg will get rid of the VGDA on the removed disk, and thus the disk should appear in the lspv -free output.

 

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSPHKW","label":"PowerVM Virtual I\/O Server"},"Component":"viosupgrade","Platform":[{"code":"PF002","label":"AIX"}],"Version":"2.2.6.30;3.1","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
03 June 2021

UID

ibm10739277