Check disks not in a volume group?

Hello,

How can I obtain a lists of disks with their size (anytype: SAN LUNs, internal disks, etc.) attached to the system and not being extended inside a volume group?

The purpose of this list is to be part of a function of a script that I'm doing in order to resize filesystems and in the case the vg attached to the lvol attached to the filesystem has no free PE's available, I want to display the list of disks susceptible of not being used (not in an VG).

So how can I obtain this list?

The other question is if it is possible that a filesystem type is vxfs and if possible how do I know if that filesystem type can be resized online.

Thank you.

Hello.

The lspv command shows all disks in use. Also at clustering.

But the lspv wasn't an AIX command? I need native RHEL commands to solve my questions.

Thank you anyway!

You can get a list of all initialized PVs known to the system (regardless of being used) by running pvdisplay or pvs .

pludi I know that

pvdisplay

or

pvs

will display all disks that have been initialized via pvcreate and they can be part/or not of an VG.

But I'm also asking how can I list disks that are not initialized via pvcreate and, in consequence, not inside any volume group.

Can I get this information via

fdisk -l

and checking if the System column there is no 'Linux LVM'?

My first post also asked about the vxfs question.

Thank you.

You need to write a script to do this. First gather information about all your disks and partitions into a list. Then remove swap devices (or partitions) from this list. Then remove devices (or partitions) which are currently assigned to LVM or VxFS.

I know that I have to write a script, that's my goal.

To do what you mention, is that correct?:

fdisk -l | grep -v "swap" | grep -v "Linux LVM" | grep -vi "vxfs" | grep -v "*" | grep "Linux" 

fdisk -l -> list all disk partitions
grep -v "swap" -> remove swap partitions from the list
grep -v "Linux LVM" -> remove partitions that have been "pvcreated" and "vgextended" from the list?!?!
grep -vi "vxfs" -> remove partitions that have been englobed inside VxVM ?!?!
grep -v "*" -> remove boot partitions
grep "Linux" -> remove rest of partition types not being Linux like from the list. For example with this I ensure removing "Extended" like partitions that cannot be "pvcreated"

And what about being aware of /dev/dm-X type partitions? I need it to be generic enough to list:

"Disk partitions/entire disks of any type capable of doing to them "pvcreate" + "vgextend" "

Thank you again