pvcreate to raid1 fails

Jerry Feldman gaf-mNDKBlG2WHs at public.gmane.org
Sun Mar 14 11:20:05 EDT 2010


I just want to add the response to my bugzilla submission. Note that 
there is an LVM2 as well as kernel issue. Both are fixed, but neither is 
in the latest Fedora 12 updates. When I have some time I will install 
LVM2 2.02.62 either by building from source or binary install from the 
repo. I may wait until Fedora 13 to try it again possibly by installing 
the beta.

----------
I believe there is a combination of failures here.

1) LVM2 had an issue where a pvcreate would fail if the underlying device (e.g.
/dev/md1) was misaligned (aka: alignment_offset=-1).  This has since been fixed
and is available in LVM2 2.02.62, see:
http://sources.redhat.com/git/gitweb.cgi?p=lvm2.git;a=commit;h=8cb8f65010c

(NOTE: please verify that /sys/block/md1/alignment_offset is -1)

2) The kernel (2.6.32.9-70.fc12.x86_64) does not contain the latest upstream
fixes that were made to blk_stack_limits().  Without these fixes the stacking
of limits (by MD) is prone to failure (resulting in alignment_offset=-1), see:
http://git.kernel.org/linus/81744ee44ab284
http://git.kernel.org/linus/fe0b393f2c0a0d     

-----------------------------------

On 03/01/2010 05:48 PM, Jerry Feldman wrote:
> I am migrating my system to a raid 1.
> Given:
> Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
> 255 heads, 63 sectors/track, 121601 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x0003a96c
>
>     Device Boot      Start         End      Blocks   Id  System
> /dev/sdc1               1          25      200781   fd  Linux raid
> autodetect
> /dev/sdc2              26      121601   976559220   fd  Linux raid
> autodetect
>
> ARRAY /dev/md0 UUID=4420140e:d8a9d5b5:91e28e81:d7bbf71d
> ARRAY /dev/md1 UUID=05a09bd8:f968bb0e:91e28e81:d7bbf71d
>
> [root at gaf gaf]# pvcreate -v -f /dev/md1
>    /dev/md1: pe_align (128 sectors) must not be less than pe_align_offset
> (36028797018963967 sectors)
>    /dev/md1: Format-specific setup of physical volume failed.
>    Failed to setup physical volume "/dev/md1"
>
> Nore that /dev/md1 is formatted ext4.
>
> Note that md0 contains 2 devices /dev/sda1 /dev/sdc1, but /dev/md1
> contains only /dev/sdc2
> What I am trying to do is to migrate my system (LVM on /dev/sda2) to raid1.
>
>    


-- 
Jerry Feldman<gaf-mNDKBlG2WHs at public.gmane.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846






More information about the Discuss mailing list