lsblk shows LVM volume as subcomponent of a partition
Given two physical drives, sda
and sdb
, I have:
- Used
fdisk
to makesda1
,sda2
,sdb1
andsdb2
- Created four physical volumes accordingly:
pvcreate /dev/sda1
etc - Created a volume group:
vgcreate datavg /dev/sda1 /dev/sda2 /dev/sdb1 /dev/sdb2
- Created a logical volume:
lvcreate -L 4096 -n datalv datavg
- Made a filesystem:
mkfs -t ext4 /dev/datavg/datalv
This seems to have worked fine as far as I can tell. However, the relevant output of lsblk
now looks like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 58.7G 0 disk
|-sda1 8:1 1 29.4G 0 part
`-sda2 8:2 1 29.3G 0 part
sdb 8:16 1 58.7G 0 disk
|-sdb1 8:17 1 29.4G 0 part
| `-datavg-datalv 254:0 0 4G 0 lvm /mnt/data
`-sdb2 8:18 1 29.3G 0 part
I don't quite get why datavg-datalv
would show up underneath sdb1
. Is this indicative of some error during my setup?
sda1
is a component device (a physical volume in LVM lingo) of datavg
volume. The output of lsblk
is perfectly normal given the command you issued.
Your LV is not large enough to span more than one PV.