[linux-lvm] LVM label lost on MD RAID5 reshape?

Vesa-Pekka Palmu palmu at aski.hut.fi
Wed Sep 24 16:53:29 UTC 2008


On Tue, 23 Sep 2008, Peter A. Castro wrote:

> > > My understanding of RAID5 is that once you configure the set of disks to
> > > the array, you can't just add an additional disk to it.  Attempting to do
> > > so does more than just "reshape" the array, it changes the logical layout
> > > of the sectors completely.  It's no wonder that LVM can't find anything,
> > > since it's data (if it survived the reorg) is no longer where it should
> > > be.  And, once you've done this, there's really no going back to recover.
> > > This is assuming my understanding of RAID5 is correct.
> >
> > I disagree, because assuming the md reshape operates intuitively, the old
> > 320 GB of data should still be visible as the first 320 GB of data on the
> > new VIRTUAL 640GB device. And LVM should know nothing about the underlying
> > RAIDing, so it should be happy to look there. However, I have no idea what
> > "bumped the values in /proc/sys/dev/raid/" means, or if it causes LVM to
> > look in the wrong places for things.
>
> I don't believe the MD/RAID5 operates in this way.  He started with a
> 2-disk RAID5 (effectively having the data logically interleaved between
> the two drives), then he added an additional disk.  The way RAID works,
> it doesn't just add the disk space to the end of the array (that would
> not create a recoverable scenario should it or one of the others fail),
> it re-integrates and effectively re-interleaves the logical sectors to
> re-spread the data across all three drives.  The trouble is, I don't
> think you can actually do this with current MD tech (I could be wrong).
>
> Perhaps a better question would be to ask how, exactly, Bob create his
> array initially (what commands) and what steps he took to add the new
> drive (again, what commands did he issue).  That would give us a better
> idea of how the array looked before and after.
>
> All of this is orthogonal to LVM, however.  I suspect a RAID/MD email
> list would be a better forum to discuss this.
>

Current linux MD-raid can reshape raid-5 arrays, the operation just takes
really long time and there is a critical section at the start, which means
if your computer crashes during the first second or two at the start all
data is pretty much lost.

The raid-5 reshape is quite new feature in md-raid and I don't know how
stable it is.




More information about the linux-lvm mailing list