1

i've got strange situation with identical drives:

     pvdisplay 
  --- Physical volume ---
  PV Name               /dev/sda5
  VG Name               group1
  PV Size               465.52 GiB / not usable 1.81 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              119173
  Free PE               12
  Allocated PE          119161
  PV UUID               OLjgd0-83Ya-dxKM-llAV-a5mi-wJ1H-bHs59E

  --- Physical volume ---
  PV Name               /dev/md1
  VG Name               group1
  PV Size               465.40 GiB / not usable 1.81 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              119141
  Free PE               119141
  Allocated PE          0
  PV UUID               w7jO7I-cfkj-9aXk-3hke-wWr6-PmW1-2IXBer

/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   976771071   488134657    5  Extended
/dev/sda5          501760   976771071   488134656   8e  Linux LVM

/dev/sdb1   *        2048      499711      248832   fd  Linux raid autodetect
/dev/sdb2          501758   976771071   488134657    5  Extended
/dev/sdb5          501760   976771071   488134656   fd  Linux raid autodetect

I've got problem to copy all data from /dev/sda5 to /dev/md1 via pvmove because first disk has size 465.52 and second one 465.40 . Why this happens? no HPA is active.

Any idea how to fix it? (live migration on mirror raid)


#cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md1 : active raid1 sdb5[1]
      488003392 blocks super 1.2 [2/1] [_U]

md0 : active raid1 sdb1[1]
      248640 blocks super 1.2 [2/1] [_U]

/dev/sda1 - ext2 /dev/sda5 - LVM (root -ext4 + swap)

1 Answer 1

0

Looks like you forgot to take the md superblock into account: "The available size of each device is the amount of space before the super block, so between 64K and 128K is lost when a device in incorporated into an MD array" ( http://linux.die.net/man/4/md ) 0.12 GiB is about 128KiB.

Since /dev/sda5 has 12 PE (48 MiB) free you could shrink it with pvresize. I'd make a backup first.

2
  • 0.12 GiB = 120 MiB
    – Alex P.
    Apr 1, 2013 at 19:34
  • Oops! Looks like something else may be taking that space. Can you post the output of cat /proc/mdstat and the partition tables of the relevant disks? Apr 1, 2013 at 20:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .