User Tools

Site Tools


aix:vios_ssp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
aix:vios_ssp [2021/01/01 21:21]
127.0.0.1 external edit
aix:vios_ssp [2023/08/16 23:31] (current)
manu [Convert a LU thick to thin in a SSP]
Line 1: Line 1:
 ====== Using Shared Storage Pools on VIOS ====== ====== Using Shared Storage Pools on VIOS ======
 +
 +https://​github.com/​nigelargriffiths/​Shared-Storage-Pool-Tools
 +
 +https://​www.ibm.com/​support/​pages/​shared-storage-pool-ssp-best-practice
  
 So here is a quick one line script "​ncluster"​ So here is a quick one line script "​ncluster"​
Line 74: Line 78:
  
 Here is another example after the SSP5 has noticed all the VIOS are at the higher level Here is another example after the SSP5 has noticed all the VIOS are at the higher level
 +<cli prompt='​$'>​
 No State Repos Pool Role ---Upgrade-Status--- Node-Name No State Repos Pool Role ---Upgrade-Status--- Node-Name
  ​1 ​   OK    OK   ​OK ​        ​2.2.4.10 ON_LEVEL bronzevios1.aixncc.uk.ibm.com  ​1 ​   OK    OK   ​OK ​        ​2.2.4.10 ON_LEVEL bronzevios1.aixncc.uk.ibm.com
Line 81: Line 85:
  ​4 ​   OK    OK   ​OK ​        ​2.2.4.10 ON_LEVEL orangevios1.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  ​5 ​   OK    OK   ​OK ​ DBN    2.2.4.10 ON_LEVEL redvios1.aixncc.uk.ibm.com
-$+</​cli>​
  
    
Line 144: Line 148:
  
 As we no longer need a sort the LUs by name we can reduce the ksh script to just one line (4 for readability):​ As we no longer need a sort the LUs by name we can reduce the ksh script to just one line (4 for readability):​
 +<cli prompt='​$'>​
 echo "​SizeMB UsedMB Used%  Type    Tier Name" echo "​SizeMB UsedMB Used%  Type    Tier Name"
 /​usr/​ios/​cli/​ioscli lu -list -fmt :  \ /​usr/​ios/​cli/​ioscli lu -list -fmt :  \
 -field LU_SIZE LU_USED_SPACE LU_USED_PERCENT LU_PROVISION_TYPE TIER_NAME LU_NAME \ -field LU_SIZE LU_USED_SPACE LU_USED_PERCENT LU_PROVISION_TYPE TIER_NAME LU_NAME \
 | awk -F: '{ printf "%6d %6d %4d%% %5s %7s %s\n",​$1,​$2,​$3,​$4,​$5,​$6}'​ | awk -F: '{ printf "%6d %6d %4d%% %5s %7s %s\n",​$1,​$2,​$3,​$4,​$5,​$6}'​
 +</​cli>​
  
 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: 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 +<​code>​
- +
-  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  ​SizeMB ​ UsedMB Used%  Type    Tier Name
   32768       ​0 ​   0%  THIN    test testa   32768       ​0 ​   0%  THIN    test testa
Line 176: Line 167:
   40960    2562    6%  THIN    prod vm96boot   40960    2562    6%  THIN    prod vm96boot
    ​8256 ​     26    0%  THIN    prod vm96data    ​8256 ​     26    0%  THIN    prod vm96data
 +</​code>​
 Note: I have two Tiers here and they are ordered first. Note: I have two Tiers here and they are ordered first.
  
Line 193: Line 184:
  
    
 +<cli prompt='​$'>​
 $ nlu -? $ nlu -?
 /​home/​padmin/​nlu Nigel'​s lu command with improved layout and column ordering /​home/​padmin/​nlu Nigel'​s lu command with improved layout and column ordering
 /​home/​padmin/​nlu [-sizemb | -usedmb | -used | -type | -tier | -name (default)] /​home/​padmin/​nlu [-sizemb | -usedmb | -used | -type | -tier | -name (default)]
-$+</​cli>​
  
 Example default output by LU Name - my favourite default Example default output by LU Name - my favourite default
 +<cli prompt='​$'>​
 $ nlu $ nlu
  ​SizeMB ​ UsedMB Used%  Type  Tier Name  ​SizeMB ​ UsedMB Used%  Type  Tier Name
Line 211: Line 202:
   38912    2562    6%  THIN  test vm97boot   38912    2562    6%  THIN  test vm97boot
    ​8256 ​     23    0%  THIN  test vm97data    ​8256 ​     23    0%  THIN  test vm97data
-+</​cli>​
  
 Example output reordered by column Example output reordered by column
 +<cli prompt='​$'>​
 $ nlu -sizemb $ nlu -sizemb
  ​SizeMB ​ UsedMB Used%  Type  Tier Name  ​SizeMB ​ UsedMB Used%  Type  Tier Name
Line 245: Line 236:
   38912    2562    6%  THIN  test vm97boot   38912    2562    6%  THIN  test vm97boot
    ​8256 ​     23    0%  THIN  test vm97data    ​8256 ​     23    0%  THIN  test vm97data
 +</​cli>​
  
 Here is the actual ksh script for nlu that is Nigel'​s New lu command 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). Runnable as padmin, root or any padmin like user (restricted shell with oem_setup_env command).
 +
 +===== Alerting =====
 +
 +<cli prompt='​$'>​
 +$ alert -set -clustername demo1 -spname demosp -type threshold -value 75
 +$ Pool freespace is 47 percent.
 +$ alert -list -clustername demo1 -spname demosp -type threshold
 +PoolName: demosp
 +PoolID: 00000000097938230000000050E9B08C
 +ThresholdPercent:​ 75
 +$ alert -unset -clustername demo1 -spname demosp -type threshold
 +</​cli>​
  
 ===== Pb with SSP ===== ===== Pb with SSP =====
Line 266: Line 270:
 In the folder In the folder
   /​var/​vio/​SSP/​   /​var/​vio/​SSP/​
 +
 +===== Convert a LU thick to thin in a SSP =====
 +
 +Use nslim ...
 +
 +https://​www.ibm.com/​support/​pages/​shared-storage-pools-hands-fun-virtual-disks-lu-example
 +
 +<​code>​
 +$ ./nslim -?
 +Usage: ./nslim (v4) is a filter style program using stdin & stdout
 +        It will thinly write a file (only copy non-zero blocks)
 +        It uses 1MB blocks
 +        If a block is zero-filled then it is skipped using lseek()
 +        If a block has data then it will write() the block unchanged
 +Example:
 +        ./​nslim ​  <​AIX.lu ​  >​SSP-LU-name
 +Flags:
 +        -v for verbose output for every block you get a W=write or .=lseek on stderr
 +        -V for verbose output on each GB you get count of written or skipped blocks
 +                ./nslim -v   <​AIX.lu ​  >​SSP-LU-name
 +                 this gives you visual feedback on progress
 +        -t like verbose but does NOT actually write anything to stdout
 +                 this lets you passively see the mix of used and unused blocks
 +                ./nslim -t   <​AIX.lu
 +        -h or -? outputs this helpful message!
 +Warning:
 +         Get the redirection wrong and you will destroy your LU data
 +</​code>​
aix/vios_ssp.1609532495.txt.gz · Last modified: 2021/01/01 21:21 by 127.0.0.1