Hi, I am working on an assignment that requires me to be able to mount volumes from Dell PowerStore on AIX 7.2, and later remove them cleanly. I keep running into issues with LVM/ODM having bad configuration data after the remove. The main problem symptom is that a newly mapped volume on PowerStore does not create a pseudodisk in AIX, usually this can be worked around by cleaning up the old entries and rebooting the system, but that is a pain.
I made some notes on the procedure I am using for the delete below -- this has the 'normal' procedure in short form but is mostly about removing a 'dead' pseudodisk after the volume on PowerStore is no longer mapped.
If anyone can review this and make any suggestions I'd appreciate it, I need to get this working cleanly!
Thanks
Geoff
-----------------------------------------------------------------------
Removing a dead PowerStore pseudodisk in AIX
Geoff Bradford
June 2022
This is a procedure for removing a pseudodisk from an AIX host which was formerly associated with a PowerStore volume, in the case where the PowerStore volume is no longer mapped to the host, but where there is still a pseudodisk in AIX.
When a PowerStore volume is mapped to an AIX host, the representation on the host is as follows. The script output below shows that the pseudodisk hdiskpower5 is associated with the volume gb_dupvol04 which is part of the PowerStore volume group gb_dupvg04. The association is made using the logical device ID starting with '68…'.
hdiskpower5 : 00fb3c99c89d05d6 : gb_dupvg04 : 68CCF098005C0E2DAADD89BEE8BB095A : gb_dupvol04
The pseudodisk has 4 hdisks which are used for I/O paths:
powermt display dev=hdiskpower5
Pseudo name=hdiskpower5
PowerStore ID=1XXXX
Logical device ID=68CCF098005C0E2DAADD89BEE8BB095A
state=alive; policy=ADaptive; queued-IOs=0
==============================================================================
--------------- Host --------------- - Stor - -- I/O Path -- -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 fscsi1 hdisk3 A0-NA-f6 active alive 0 0
0 fscsi1 hdisk5 A0-NB-f7 active alive 0 0
1 fscsi3 hdisk20 A0-NA-f7 active alive 0 0
1 fscsi3 hdisk21 A0-NB-f6 active alive 0 0
Normally the procedure for removing the pseudodisks and unmapping the volumes from PowerStore would be:
- Capture the pseudodisk info for the volume group to be used later to delete them
- Unmount any mounted filesystems for the volume group
- Vary off the volume group with varyoffvg
- Export the volume group with exportvg, this removes the volume group entry
- Use the pseudodisk info to remove each hdisk
- Remove the pseudodisk
- Unmap the host from the PowerStore volume (script uses REST API for this)
- Optionally, remove the PowerStore volume group and associated volumes (script uses REST API for this)
Here is a pseudodisk on test host which does not map to any volume on the PowerStore, this is output from a script which uses the logical device ID in AIX to look up the volume in PowerStore, in this case there is no matching volume:
hdiskpower9 : none : None : 68CCF0980088400175C56E68419ACF61 : NONE
Powermt display for this 'dead' pseudodisk:
powermt display dev=hdiskpower9
Pseudo name=hdiskpower9
PowerStore ID=1XXXX
Logical device ID=68CCF0980088400175C56E68419ACF61
state=dead; policy=ADaptive; queued-IOs=0
==============================================================================
--------------- Host --------------- - Stor - -- I/O Path -- -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 fscsi3 hdisk26 A0-NB-f7 active dead 0 0
1 UNKNOWN unknown A0-NA-f7 active dead 0 0
1 UNKNOWN unknown A0-NB-f6 active dead 0 0
The hisk which is active/dead cannot be directly removed with rmdev:
rmdev -Rdl hdisk26
Method error (/usr/lib/methods/ucfgdevice):
0514-062 Cannot perform the requested function because the
specified device is busy.
The following commands can be used to change the hdisk mode:
odmget -q "name like hdisk26" CuDv
CuDv:
name = "hdisk26"
status = 1
chgstatus = 0
ddins = "scsidisk"
location = "44-T1-01"
parent = "fscsi3"
connwhere = "7"
PdDvLn = "disk/fcp/PowerStore"
Use this output to create a file which has "status=0":
CuDv:
name = "hdisk26"
status = 0
chgstatus = 0
ddins = "scsidisk"
location = "44-T1-01"
parent = "fscsi3"
connwhere = "7"
PdDvLn = "disk/fcp/PowerStore"
Delete the existing ODM entry which has status=1:
odmdelete -q "name like hdisk26" -o CuDv
0518-307 odmdelete: 1 objects deleted.
Import the file with status=0 (file name is 'out2'): odmadd out2
This does not return anything but creates an ODM entry with status=0
Once this is done, delete the hdisk:
# rmdev -Rdl hdisk26
hdisk26 deleted
The pseudodisk can now be deleted:
# rmdev -Rdl hdiskpower9
hdiskpower9 deleted
# # #
------------------------------
Geoff Bradford
------------------------------