Fair question. On the same system, df -h gives:
Filesystem Size Used Avail Use% Mounted on
udev 465M 0 465M 0% /dev
tmpfs 99M 7.8M 91M 8% /run
/dev/mapper/vg0-root 15G 3.3G 12G 22% /
tmpfs 493M 0 493M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 493M 0 493M 0% /sys/fs/cgroup
/dev/mapper/vg1-data 98G 61M 93G 1% /mnt/data
/dev/mapper/vg0-var 5.0G 956M 4.1G 19% /var
tmpfs 99M 0 99M 0% /run/user/1000
Where '/' and 'var' are correct, but /mnt/data shows as 98G instead of 100G. I'm looking for the disk sizes, not the file system sizes.
This is actually a VM, and I can get the exact disk sizes from VMware... but not the mount points. And since / and /var are on the same disk, the VMware info lacks the detail I need.
Major device 253 seems to be used for LVM devices, so assuming that misses things like "sda2 8:2 0 2G 0 part /boot", which I'd also like to account for. Another system, for example, has
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 50G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 2G 0 part /boot
└─sda3 8:3 0 48G 0 part
├─ubuntu--vg-root 253:0 0 24G 0 lvm /
└─ubuntu--vg-var 253:1 0 24G 0 lvm /var
sr0 11:0 1 1024M 0 rom
And from that I would want
/boot 2G
/ 24G
/var 24G
which adds up to 50G (sda)
lsblk -e 7 | grep '/' | awk '{ print $NF, $4 }'
basically works (for my sample of two systems), but I don't know how reliable assuming grep '/' is going to be for what I want.