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.
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.
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" "