os/400 i5os IBM i remove stale LUN paths

This may need to happen if you remove/re-add NPIV mapping, if SAN topology changes, or if you have removed maps, ports, cables, or entire LUNs.

1. Change the configuration on the array to remove the extra ports, etc.
2. Physically remove any fibre cables if needed.
3. IPL the server.
4. Run the STRSST command., then Press ENTER
5. Option 1, Start a service tool, then Press ENTER
6. Option 4, Display/Alter/Dump, then Press ENTER
7. Option 1, Display/Alter storage, then Press ENTER
8. Option 2, Licensed Internal Code (LIC) data, then Press ENTER
9. Option 14, Advanced analysis (scroll down to see this option), then Press ENTER
a. Scroll down and type 1 by MULTIPATHRESETTER, then press ENTER
b. Options, -RESETMP -ALL -CONFIRM, then press ENTER

DISPLAY/ALTER/DUMP
Running macro: MULTIPATHRESETTER -CONFIRM -ALL
Reset the paths for Multiple Connections

********************************************************************
***CONFIRM RESET MULTIPATH UNIT PATHSTO NUMBER CURRENTLY ENLISTED***
********************************************************************

This service function should be run only under the direction of the
IBM Hardware Service Support.

You have selected to reset the number of paths on a multipath unit
to equal the number of paths that have currently enlisted.

Attempting to reset path for resource name: DMP004
Attempting to reset path for resource name: DMP075
...

*** Your request completed successfully ***
The number of paths connected to your multipath unit have been reset
to match the number of paths that are currently enlisted.
NOTE: If ALL paths are removed, the disk resource name will still show as DMPxxx rather than DDxxxx.NOTE: DMPxxx resources remaining in Hardware Service Manager removed paths will need manual cleanup.

REF: https://www.ibm.com/support/pages/reducing-or-removing-paths-multipath-lun
REF: https://www.ibm.com/support/pages/san-disks-missing-paths


AS/400 Training (Backdated)

All I can say is WOW… Just lots of different syntax. MOST of the commands are 3 letters for the verb, 3 letters for the noun, any options are in parenthesis, and special keywords are prepended by an asterisk (splat in as/400 land)

verbs include:
wrk = work
crt = create
del = delete
rmv = remove
dsp = display
chg = change

Nouns include:
job = job (a process)
obj = object (anything that can be created and deleted)
prf = user profile
val = value
rsc = resource

Pre-noun modifier:
dft = default
usr = user
act = active
sys = system
hdw = hardware
dup = duplicate

post-noun modifier:
d = description
L = List
E = Entry
Q = queue
F = file

All OS/400 standard (default) system objects, etc start with Q.
Often, users are created for certain types of jobs.

so the library QSYS is basically the system directory
QHST is the system history message queue

The problem is that not ALL things follow this convention, like WS is workstation.
Not all combos work, or some nouns only work with certain modifiers.

it’s all case insensitive.
there’s lots more than this.

Command examples:

DSPSYSVAL QTIME
this shows the system timestamp

ADDLIBLE
Add a library list entry (aka, add on to the end of the path for the current job)

CHGDFTLIB
Change the default library (current directory)

CPYF
copy a file

crtdupobj
create duplicate object (copy any object, not just a file)