How to find the disk where the Linux’s root(/) is on in Bash? The root may be on a LVM volume or on a raw disk.
# df -hT | grep /$ /dev/root ext4 48G 32G 14G 71% /
/dev/root is actually
For another example:
# df -hT | grep /$ /dev/mapper/fedora-root ext4 48G 45G 1.4G 98% /
The it is a LVM volume in LVM group ‘fedora’:
# lvs | grep fedora | grep root root fedora -wi-ao---- 48.83g
and ‘fedora’ is on the single disk partition ‘/dev/sda3’ of disk ‘/dev/sda’:
# pvs | grep fedora /dev/sda3 fedora lvm2 a-- 64.46g 4.00m
For both cases above, we want to find out ‘/dev/sda’.