IBM Support

lspv -free Does Not List Expected Unused Hdisk

Troubleshooting


Problem

"lspv -free" does not return expected unused disk.
hdisk1 is expected.

Symptom

Disk not listed after being used as target disk for VIOS upgrade.
 
I previously used hdisk1 as the target disk with viosupgrade command on the VIOS to upgrade VIOS from 2.2.6.51 to 3.1.  The viosupgrade was unsuccessful, so I then performed the following:
1. Booted back from the original disk, hdisk0 (old_rootvg)
2. Cleaned up the alternate disk volume group (alt_rootvg_op -X).
    or via alt_root_vg command at VIOS V4
    $ alt_root_vg -remove old_rootvg
3. Cleared the boot record:
    # chpv -c hdisk1
 
  Now, 'lspv -free' does not report hdisk1.
 
Other things I tried:
4. Cleared the PVID and assigned new one:
  # chdev -l hdisk1 -a pv=clear
  # chdev -l hdisk1 -a pv=yes
5. Created a test volume group on hdisk1, then exported it.
 

Environment

PowerVM VIOS version 2.2.6, 3.1, and 4.1

Diagnosing The Problem

From lspv command documentation
 
The Non-Volatile Memory express (NVMe) type of disks are not listed by running the lspv command, along with the flags -free, -capable, and -avail. However, NVMe type of disks can be listed by running the lspv command, without any flags.
 
-free     Lists physical volumes that can be used as a backing device. The physical volume is unavailable and it does not appear in the list in any of the following cases:
  • The physical volume is already used as a backing device.
  • The physical volume is assigned to a shared memory pool that can be used as a paging space device by a shared memory partition.
  • The physical volume is a part of a volume group that has a Logical Volume Manager (LVM) signature on the disk.

NVMe storage is not supported as a backing device.  To list this storage type, run:
$ lspv -unused

Resolving The Problem

Clear storage pool or cluster signature from the disk.  As padmin, run:
$ cleandisk -r hdisk#               
 
CAUTION: use this command with care.  You will be prompted to answer y/n.  Answering 'y' is destructive to any data that exists on the physical volume.  Ensure that the correct hdisk is specified by verifying the disk contents are no longer needed prior to running cleandisk command.
 
If problem continues, next, clear Logical Volume Manager (LVM) record on disk using chpv command from oem_setup_env shell. 
 
$ oem_setup_env
# chpv -C hdisk#
 
CAUTION:  Ensure the disk is not part of a volume group and its contents are no longer needed before clearing LVM record.

Related Information

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSPHKW","label":"PowerVM Virtual I\/O Server"},"ARM Category":[{"code":"a8m3p000000PCZnAAO","label":"IOSCLI"}],"ARM Case Number":"TS021649017","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"3.1.0;3.1.1;3.1.2;3.1.3;3.1.4;4.1.0;4.1.1;4.1.2"}]

Document Information

Modified date:
12 March 2026

UID

ibm15695755