[TriLUG] Problem with LVM

Rick DeNatale rick.denatale at gmail.com
Sun Apr 30 16:12:19 EDT 2006


On 4/30/06, T. Bryan <tbryan at python.net> wrote:
> Should the RAID device be being seen as a physical volume?
>
> # lvmdiskscan -v
>   /dev/md0  [      111.79 GB]
>   /dev/hda1 [      101.94 MB]
>   /dev/hdc1 [        5.59 GB]
>   /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
>   /dev/hda2 [        7.71 GB]
>   /dev/hdc2 [        2.28 GB]
>   /dev/hda5 [       37.26 GB]
>   /dev/hda6 [       37.26 GB]
>   0 disks
>   7 partitions
>   0 LVM physical volume whole disks
>   2 LVM physical volumes
>
>
> To review, /dev/md0 is a RAID1 of /dev/hde1 /dev/hdg1.
>
> When I originally cerated the volume group, I created it on the RAID device
> #  vgcreate localvg /dev/md0
>
> I'm not sure whether the display from lvmdiskscan above is normal and expected
> when using LVM on top of a software RAID device.

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
  /dev/sda1 [      243.14 MB]
  /dev/hdc1 [        9.54 GB]
  /dev/hdc2 [      139.50 GB]
  /dev/sda5 [        8.23 GB]
  /dev/sdb1 [      243.14 MB]
  /dev/sdb5 [        8.23 GB]
  /dev/hdd1 [       15.66 MB]
  /dev/hdd2 [       38.16 GB]
  /dev/hdd3 [       38.16 GB]
  0 disks
  9 partitions
  0 LVM physical volume whole disks
  1 LVM physical volume

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

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.

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.

--
Rick DeNatale

Visit the Project Mercury Wiki Site
http://www.mercuryspacecraft.com/



More information about the TriLUG mailing list