[TriLUG] Problem with LVM
T. Bryan
tbryan at python.net
Sun Apr 30 23:23:40 EDT 2006
On Sunday 30 April 2006 04:12 pm, Rick DeNatale wrote:
> Well here's some more information on my setup. I've got my root fs
> and a swap "volume" as logical volumes on a raid1 array
>
> $ cat /proc/mdstat
> Personalities : [raid1]
> md0 : active raid1 sda5[0] sdb5[1]
> 8634816 blocks [2/2] [UU]
>
> unused devices: <none>
>
> $ sudo lvmdiskscan -v
> /dev/md0 [ 8.23 GB] LVM physical volume
Thanks for the comparison. That's pretty much what I expected to see. I just
wish that I had run and captured the output from these commands when it
looked like things were working.
> I'm a little suspicious about those lines in your output:
> > /dev/hde1 [ 111.79 GB] LVM physical volume
> > Found duplicate PV 7LOs90S2Ff8W7Tq8ZGRsT41lphbExsLh: using /dev/hdg1
> > not /dev/hde1
> > /dev/hdg1 [ 111.79 GB] LVM physical volume
Me, too. :)
> To me this looks like, instead of building a raid array with two
> physical partitions and then making that a PV, you tried to make a
> raid array from two LVM PVs.
That's not what I attempted. My journal says that I set this up with
mke2fs -j /dev/hde1
mke2fs -j /dev/hdg1
mdadm --create --verbose /dev/md0 --level=1 \
--raid-devices=2 /dev/hde1 /dev/hdg1
mdadm -S /dev/md0
mdadm -As /dev/md0
pvcreate /dev/md0
vgcreate localvg /dev/md0
lvcreate -L20G -nlv_local1 localvg
mke2fs -j /dev/localvg/lv_local1
I wasn't sure whether I needed to mke2fs both on the underlying device and on
the logical volumes, but it seemed to work well for a while, and I was
reading and writing data to the logical volume. It would be nice to get it
working again. :)
> My setup has LVM on top of raid. I know that way works, I'm not sure
> whether or not raid on top of LVM does.
Another question. What is your partition type for /dev/sda5 and /dev/sdb5?
None of the HOWTOs mentioned changing it, but I notice that partition type 8e
is Linux LVM, but mine is 83 (Linux) for ext3.
---Tom
More information about the TriLUG
mailing list