[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

questions about LVM on RAID1 array



Hello all,

I've been setting up LVM on top of a RAID1 array.

So I mkraid to create /dev/md0, and then I pvcreate, vgcreate and
lvcreate using /dev/md0 as the physical device to stack on top of.

Having done all that, I then create an ext2 fs on the lv I've created.

All seems to work fine ... however ... pvdisplay shows me something I
really didn't expect ...

--- Physical volume ---
    PV Name               /dev/hdd
    VG Name               backup_volume_group
    PV Size               186.30 GB / not usable 0
    Allocatable           yes
    PE Size (KByte)       4096
    Total PE              47694
    Free PE               78
    Allocated PE          47616
    PV UUID
    RStvlf-8TNQ-tRmK-3sZQ-3AT5-1IB9-CGWgNJ

It shows me that the physical volume undelying my lv is /dev/hdd (one of
the two disks that form /dev/md0).  Now the question becomes, is it just
a strange accident that it knows this, or is it simply drilling through
the raid and seeing the disks instead of the RAID1 device /dev/md0 ?

Slightly more concerning to me, is that when I cat'd /proc/mdstat before
I created the pv,vg and lv I saw the RAID device and the disks it was
using all shown correctly, however after I stacked on LVM I see this :

Personalities : [raid1] [multipath]
unused devices: <none>

Which worries me that the RAID is getting knocked off by LVM.

What I'm trying to achieve is an LVM underpinned by a RAID1 array.  The
reason I need to stack LVM on top is because I will need to extend the
amount of space I have quite soon, and LVM is the easiest way to do
this.

Any help is greatly appreciated,
Thanks
Dave



Reply to: