User Tools

Site Tools


aix:vios_ssp

This is an old revision of the document!


Using Shared Storage Pools on VIOS

So here is a quick one line script “ncluster”

ncluster ()
{
/usr/ios/cli/ioscli cluster -status -verbose -fmt : -field "Node State" "Node Repos State" "Pool State" "Node Roles" "Node Upgrade Status" "Node Name" | \
awk -F: 'BEGIN { printf "No State Repos Pool Role ---Upgrade-Status--- Node-Name\n" ; } { printf "%2d %5s %5s %4s %4s %20s %s\n", NR, $1, $2, $3, $4, $5, $6; }'
}

And “nlu” to list shared pools

nlu ()
{
if [[ $(whoami) != "root" ]]
then
        command=$(whence $0)
        # echo DEBUG I am padmin so restart $command again as the root user
        echo "$command" $1 | oem_setup_env
else
        # echo DEBUG now I am root
        # lowercase the parameter with tr to avoid input case errors
        case `echo $1 | tr "[A-Z]" "[a-z]" ` in
        1 | -sizemb)            COLUMN="-nk 1" ;;
        2 | -usedmb)            COLUMN="-nk 2" ;;
        3 | -used | -used%)     COLUMN="-nk 3" ;;
        4 | -type)              COLUMN="-k 4" ;;
        5 | -tier)              COLUMN="-k 5" ;;
        6 | -name)              COLUMN="-k 6" ;;
        ? | -?)
        echo $0 "Nigel's lu command with improved layout and column ordering"
        echo $0 "[-sizemb | -usedmb | -used | -type | -tier | -name (default)]"
        exit 0
                ;;
        *)                      COLUMN="-k 6" ;;
        esac

        echo " SizeMB  UsedMB Used%  Type  Tier Name"

        /usr/ios/cli/ioscli \
        lu -list -field LU_SIZE LU_USED_SPACE LU_USED_PERCENT \
                LU_PROVISION_TYPE TIER_NAME LU_NAME -fmt : \
        | awk -F: '{ printf "%7d %7d %4d%% %5s %5s %s\n", $1,$2,$3,$4,$5,$6}' \
        | sort $COLUMN
fi
exit 0
}

And below the sample output

$ ncluster

No State Repos Pool Role ---Upgrade-Status--- Node-Name
 1    OK    OK   OK         2.2.4.10 UP_LEVEL indigovios1.aixncc.uk.ibm.com
 2    OK    OK   OK         2.2.4.10 UP_LEVEL rubyvios1.aixncc.uk.ibm.com
 3    OK    OK   OK         2.2.4.10 UP_LEVEL emeraldvios1.aixncc.uk.ibm.com
 4    OK    OK   OK         2.2.4.10 UP_LEVEL emeraldvios2.aixncc.uk.ibm.com
 5    OK    OK   OK         2.2.4.10 UP_LEVEL rubyvios2.aixncc.uk.ibm.com
 6    OK    OK   OK         2.2.3.52 ON_LEVEL purplevio1.aixncc.uk.ibm.com
 7    OK    OK   OK         2.2.4.10 UP_LEVEL purplevio2.aixncc.uk.ibm.com
 8    OK    OK   OK         2.2.4.10 UP_LEVEL limevios1.aixncc.uk.ibm.com
 9    OK    OK   OK         2.2.4.10 UP_LEVEL limevios2.aixncc.uk.ibm.com
10    OK    OK   OK         2.2.4.10 UP_LEVEL greenvios1.aixncc.uk.ibm.com
11    OK    OK   OK  DBN    2.2.4.10 UP_LEVEL greenvios2.aixncc.uk.ibm.com

DBN is the “database node” I think means it is the node that updates the repository.

Not the script does not colour the output RED - but that would be cool!!

Here is another example after the SSP5 has noticed all the VIOS are at the higher level

No State Repos Pool Role —Upgrade-Status— Node-Name 1 OK OK OK 2.2.4.10 ON_LEVEL bronzevios1.aixncc.uk.ibm.com 2 OK OK OK 2.2.4.10 ON_LEVEL silvervios1.aixncc.uk.ibm.com 3 OK OK OK 2.2.4.10 ON_LEVEL goldvios1.aixncc.uk.ibm.com 4 OK OK OK 2.2.4.10 ON_LEVEL orangevios1.aixncc.uk.ibm.com 5 OK OK OK DBN 2.2.4.10 ON_LEVEL redvios1.aixncc.uk.ibm.com $

The default format that zooms off the screen is below

$  cluster -status -verbose
Cluster Name:             globular
Cluster Id:               9230352855ff11e3ba5b0e0a51517820
Cluster State:            OK
Repository Mode:          EVENT
Number of Nodes:          11
Nodes OK:                 11
Nodes DOWN:               0

    Pool Name:            Pacific
    Pool Id:              0000000009893E510000000052939733
    Pool Mirror State:    SYNCED

    Node Name:            indigovios1.aixncc.uk.ibm.com
    Node Id:              bf999ca460fb11e492d200006cae8b6a
    Node MTM:             8231-E1C020659FDR
    Node Partition Num:   1
    Node State:           OK
    Node Repos State:     OK
    Node Upgrade Status:  2.2.4.10 ON_LEVEL
    Node Roles:
        Pool Name:        Pacific
        Pool Id:          0000000009893E510000000052939733
        Pool State:       OK

    Node Name:            rubyvios1.aixncc.uk.ibm.com
    Node Id:              796dc49ef4ad11e4b72000006cae8b6a
    Node MTM:             8408-E8E0221D494V
    Node Partition Num:   1
    Node State:           OK
    Node Repos State:     OK
    Node Upgrade Status:  2.2.4.10 ON_LEVEL
    Node Roles:
        Pool Name:        Pacific
        Pool Id:          0000000009893E510000000052939733
        Pool State:       OK

Fortunately, the SSP designers are very clever. The lu options allow you a raw format. As an example:

$  lu -list -field LU_SIZE LU_NAME -fmt :
32768:testa
40960:testb
38912:vm97boot
8256:vm97data
8192:testc
8192:v23456789012345678901234567890
38912:vm96boot
8256:vm96data

OK, not pretty but nothing awk can’t sort out.

As we no longer need a sort the LUs by name we can reduce the ksh script to just one line (4 for readability):

echo “SizeMB UsedMB Used% Type Tier Name” /usr/ios/cli/ioscli lu -list -fmt : \ -field LU_SIZE LU_USED_SPACE LU_USED_PERCENT LU_PROVISION_TYPE TIER_NAME LU_NAME \

This works on BOTH VIOS 2.2.3 (random order) and the future VIOS 2.2.4 (Tier then LU name order) and you get:

VIOS 2.2.3.x

SizeMB  UsedMB Used%  Type    Tier Name

1048576 971779 92% THIN SYSTEM purple3files

 65536   65536  100% THICK  SYSTEM orange5a
 32768   19956   60%  THIN  SYSTEM vm34
 32768   32768  100%  THIN  SYSTEM vm61b 
 32768    3392   10%  THIN  SYSTEM AIX735_b
 32768   27016   82%  THIN  SYSTEM vm16boot
 65536   26563   40%  THIN  SYSTEM ruby32data1
 65536       0    0%  THIN  SYSTEM emerald3
 25600       0    0%  THIN  SYSTEM volume-orange5_data1

VIOS 2.2.4

SizeMB UsedMB Used% Type Tier Name

32768       0    0%  THIN    test testa
40960       0    0%  THIN    test testb
38912    2562    6%  THIN    test vm97boot
 8256      23    0%  THIN    test vm97data
39936   39936  100% THICK    prod testc
 8192       0    0%  THIN    prod v23456789012345678901234567890
40960    2562    6%  THIN    prod vm96boot
 8256      26    0%  THIN    prod vm96data

Note: I have two Tiers here and they are ordered first.

A good start for two lines of ksh script but not good enough for me.

I actually need to sort the output differently for different views of the data like:

  All LUs in alphabetical order so I can simply find the one I want in one go.
  Which LU has the larger size?
  Which LU is  actually taking the most storage?
  Order on tiers then name when I want too.

etc. So here is my NEW and Improved nlu ksh script where we can order the output with options and it works on VIOS 2.2.3 and VIOS 2.2.4 with Tiers (when or if they arrive :-).

$ nlu -? /home/padmin/nlu Nigel's lu command with improved layout and column ordering /home/padmin/nlu [-sizemb | -usedmb | -used | -type | -tier | -name (default)] $

Example default output by LU Name - my favourite default

$ nlu SizeMB UsedMB Used% Type Tier Name

32768       0    0%  THIN  test testa
40960       0    0%  THIN  test testb
39936   39936  100% THICK  prod testc
 8192       0    0%  THIN  prod v23456789012345678901234567890
40960    2562    6%  THIN  prod vm96boot
 8256      26    0%  THIN  prod vm96data
38912    2562    6%  THIN  test vm97boot
 8256      23    0%  THIN  test vm97data

$

Example output reordered by column

$ nlu -sizemb SizeMB UsedMB Used% Type Tier Name

 8192       0    0%  THIN  prod v23456789012345678901234567890
 8256      23    0%  THIN  test vm97data
 8256      26    0%  THIN  prod vm96data
32768       0    0%  THIN  test testa
38912    2562    6%  THIN  test vm97boot
39936   39936  100% THICK  prod testc
40960       0    0%  THIN  test testb
40960    2562    6%  THIN  prod vm96boot

$ nlu -usedmb SizeMB UsedMB Used% Type Tier Name

 8192       0    0%  THIN  prod v23456789012345678901234567890
32768       0    0%  THIN  test testa
40960       0    0%  THIN  test testb
 8256      23    0%  THIN  test vm97data
 8256      26    0%  THIN  prod vm96data
38912    2562    6%  THIN  test vm97boot
40960    2562    6%  THIN  prod vm96boot
39936   39936  100% THICK  prod testc

$ nlu -tier SizeMB UsedMB Used% Type Tier Name

39936   39936  100% THICK  prod testc
 8192       0    0%  THIN  prod v23456789012345678901234567890
40960    2562    6%  THIN  prod vm96boot
 8256      26    0%  THIN  prod vm96data
32768       0    0%  THIN  test testa
40960       0    0%  THIN  test testb
38912    2562    6%  THIN  test vm97boot
 8256      23    0%  THIN  test vm97data

Here is the actual ksh script for nlu that is Nigel's New lu command

Runnable as padmin, root or any padmin like user (restricted shell with oem_setup_env command).

Pb with SSP

Remove cluster:

# odmget -q name=vioscluster0 CuAt
# rmdev -dl vioscluster0 -R

Then you can remove hanging vhost maps

Then reboot

Where is store the config of SSP

In the folder

/var/vio/SSP/
aix/vios_ssp.1609532495.txt.gz · Last modified: 2021/01/01 21:21 by 127.0.0.1