[Novalug] LVM On Top Of Software RAID

Mark Caudill flakblas@me.com
Mon Aug 9 19:23:28 EDT 2010


I've had a drive fail on a mdadm RAID 5 before and it was fairly trivial to get the issue resolved. I have thought about what I'd have to do to add capacity to this setup (my RAID-1 with LVM on top) and I think I'd have to add another RAID set of some sort and expand the LVM onto that. Anyone done something like that before?

On Aug 9, 2010, at 5:34 PM, Peter Larsen wrote:

> On Mon, 2010-08-09 at 22:22 +0300, Ken Kauffman wrote:
>> I would be interested in knowing if people ran into physical disc
>> problems in this configuration and have successfully
>> recovered/rebuilt.
> 
> Yes and yes. This isn't mystical. It's fairly straight forward. If a
> disk fails, you fix the software raid as you would ordinary do. The
> interesting discussion however would different; there may be some
> advantages dishing mdraid all together and just use LVM for
> mirror/striping. This would simplify the administration.
> 
> The LVM layer, when used on top of mdraid (or is it called dmraid? It's
> based on device mapper, so dmraid sounds more right) is used for
> flexibility. Mostly you'll simply add/remove logical volumes. For
> instance, to add space for a VM. You would add/remove snapshots etc.
> too. Once you're in LVM you're removed from the physical media, so
> there's no difference in how you manage/use LVM in that regard.
> 
> So if you have a disk-failure you replace the disk and rebuild the raid.
> LVM will not notice the difference. The LVM UUIDs will remain the same.
> Depending on how you setup your dmraid you may have to first partition
> the disk before rebuilding the RAID but that's standard software raid
> recovery procedure.
> 
> Without the dmraid, if a failure happens you would "simply" repeat the
> equiv. procedure for LVM for recovery. In most cases, you'll do a
> pvcreate with the same UUID and simply let LVM do the rest for you.
> 
> I've done recovery of failed raid1 systems. I don't use RAID5 with
> software raid. And that worked pretty well.
> 
> -- 
> Best Regards
>  Peter Larsen
> 
> Wise words of the day:
> How many chunks could checkchunk check if checkchunk could check chunks?
> 	-- Alan Cox
> 
>> 
>> It's one thing to never have an issue and another to be able to
>> recover under a failure.
>> 
>> 
>> Ken
>> 
>> On Mon, Aug 9, 2010 at 20:18, The Doctor <drwho@virtadpt.net> wrote:
>>        -----BEGIN PGP SIGNED MESSAGE-----
>>        Hash: SHA1
>> 
>> 
>>        Gopher wrote:
>> 
>>> If you are using a more modern motherboard (let's say within
>>        the last
>>> 4-5 years) there's a good chance it could have some type of
>>        on board HW
>>> RAID already, and if so, use that.  Otherwise I would say it
>>        really come
>> 
>> 
>>        Caveat: so long as it's real RAID and not fakeRAID, like
>>        nVidia does
>>        with their chipsets.
>> 
>>        - --
>> 
>>        The Doctor [412/724/301/703]
>> 
>>        PGP: 0x807B17C1 / 7960 1CDC 85C9 0B63 8D9F  DD89 3BD8 FF2B
>>        807B 17C1
>>        WWW: http://drwho.virtadpt.net/
>> 
>>        It is dark here.  You are likely to be eaten by a grue.
>> 
>>        -----BEGIN PGP SIGNATURE-----
>>        Version: GnuPG v2.0.14 (GNU/Linux)
>>        Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>> 
>> 
>>        iEYEARECAAYFAkxgOFsACgkQO9j/K4B7F8H/IQCfaV3fzxX65mzeCMq4FQqG42
>>        +k
>>        LOgAn3UNetBkjLZN1SUndn9vHkGaCdIU
>>        =3g1+
>>        -----END PGP SIGNATURE-----
>> 
>>        _______________________________________________
>>        Novalug mailing list
>>        Novalug@calypso.tux.org
>>        http://calypso.tux.org/mailman/listinfo/novalug
>> 
>> 
>> 
>> _______________________________________________
>> Novalug mailing list
>> Novalug@calypso.tux.org
>> http://calypso.tux.org/mailman/listinfo/novalug
> 
> 
> _______________________________________________
> Novalug mailing list
> Novalug@calypso.tux.org
> http://calypso.tux.org/mailman/listinfo/novalug




More information about the Novalug mailing list