getVolumeSize on block storage is implemented using fseek() and ftell() on the /dev device file when the storage is active: with open(devPath, "rb") as f: f.seek(0, os.SEEK_END) return f.tell() and it falls back to examining LVM LV metadata when storage is not active. Hope that helps.