Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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)

share|improve this question

1 Answer 1

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.

share|improve this answer
    
0.12 GiB = 120 MiB –  Alex P. Apr 1 '13 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? –  Mark Wagner Apr 1 '13 at 20:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.