The task: to calculate the exact size of the useful space on the PV-volume based on the size of the partition on which the PV is located.
Context: There is a PV partition, for it you can make pvs --unit B -o pv_name,pv_size and find out the exact size of PV in bytes at the moment. In this case, PV does not occupy the entire volume of the underlying partition / disk. There is a size of the underlying partition / disk in bytes.
It is necessary to calculate the useful PV volume after it is expanded to the entire underlying disk with the pvresize command, but without the actual extension (i.e., expanding and viewing does not fit - it is necessary to calculate in advance).
-t(--test) and-v(--verbose) not suitable? - aleksandr barakin