[TriLUG] Ubuntu FakeRAID or Software

Rodney Radford rradford at mindspring.com
Fri Nov 5 22:32:45 EDT 2010


As I mentioned earlier, when you create a new RAID, it starts off in a degraded state and is then rebuilt - possibly taking hours to complete.  It does this as it initially lists one of your drives as a spare, writing just to the other drives, and then incorporates the spare in during the rebuild.

You can over-ride this as shown in this link:

http://serverfault.com/questions/43575/how-to-create-a-software-raid5-array-without-a-spare

-----Original Message-----
>From: Rodney Radford <rradford at mindspring.com>
>Sent: Nov 5, 2010 9:56 PM
>To: Triangle Linux Users Group General Discussion <trilug at trilug.org>
>Subject: Re: [TriLUG] Ubuntu FakeRAID or Software
>
>
>Did you examine /proc/mdstat before you rebooted? I suspect you were already in a degraded mode then as the system was still building the RAID. So when you rebooted, it started back again rebuilding the drive, you removed the drive (but it it still writing to it), so you get a busy when you try to add it back.
>
>Repeat the steps again, but this time check /proc/mdstat and verify it is complete (all UUUU) before the reboot. If you do happen to reboot before it is rebuilt, just be patient and wait for it to complete before changing it.
>
>Depending on the drive speed, RAID size, and RAID tuning parameters, it can take several hours for the initial build to complete.
>
>Also, check out this link for info on how to decrease the RAID rebuild time. I played with this about a year ago and was able to reduce a RAID rebuild on a 2TB array from several hours down to less than 30 minutes.
>
>http://www.ducea.com/2006/06/25/increase-the-speed-of-linux-software-raid-reconstruction/
>
>Good luck...
>
>-----Original Message-----
>>From: Brian Blater <brb.lists at gmail.com>
>>Sent: Nov 5, 2010 9:39 PM
>>To: Triangle Linux Users Group General Discussion <trilug at trilug.org>
>>Subject: Re: [TriLUG] Ubuntu FakeRAID or Software
>>
>>> On Fri, Nov 5, 2010 at 9:28 AM, Jimmy Dorff <jdorff at phy.duke.edu> wrote:
>>>> On 11/05/2010 09:00 AM, Brian McCullough wrote:
>>>>>
>>>>> You might want to try setting the partition type correctly.
>>>>
>>>> Correct. Also populate /etc/mdadm.conf so your not relying on auto assembly.
>>>>
>>>> Once you have things running correctly, mdadm will print out your config in
>>>> the right format for the config file.
>>>>
>>>> -Jimmy
>>
>>Ok, It can't be this difficult to setup a software RAID and have it
>>work after a reboot etc.
>>
>>Tonight I get home and blow away all the partitions on the 4 drives
>>I'm using for the RAID. I recreate the partitions using type=fd for
>>linux raid member. I then create the array with:
>>
>># mdadm -C /dev/md0 -c 256 -l 5 -n 4 /dev/sdb2 /dev/sdc2 /dev/sdd2 /dev/sde2
>>
>>and that works fine. I then assemble with:
>>
>># mdadm -A /dev/md0 /dev/sdb2 /dev/sdc2 /dev/sdd2 /dev/sde2
>>
>>and it starts sync'ing. I format /dev/md0 with ext4 and mount the
>>partition to /data and I'm golden.
>>
>>I then modify /etc/mdadm/mdadm.conf with:
>>
>>ARRAY /dev/md0 UUID=d93fc355-4c3d-4733-6a23-c49e9513d009
>>
>>hoping that will make it persistent. I reboot thinking all is great
>>only to find out that the array is not active.
>>
>># cat /proc/mdstat
>>Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
>>[raid4] [raid10]
>>md_d0 : inactive sdb2[0](S)
>>      36700416 blocks
>>
>>unused devices: <none>
>>
>>So, I run:
>># mdadm -A --scan
>>mdadm: /dev/md0 has been started with 3 drives (out of 4)
>>
>>Great, so now the array is degraded. So, I run:
>>
>># cat /proc/mdstat
>>Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
>>[raid4] [raid10]
>>md0 : active raid5 sdc2[1] sde2[3] sdd2[2]
>>      110101248 blocks level 5, 256k chunk, algorithm 2 [4/3] [_UUU]
>>
>>md_d0 : inactive sdb2[0](S)
>>      36700416 blocks
>>
>>unused devices: <none>
>>
>>I guess that is telling me sdb2 is down. So, I fail /dev/md0 and
>>remove /dev/sdb2. Now if I try to re-add it to the array I get:
>>
>># mdadm /dev/md0 --re-add /dev/sdb2
>>mdadm: Cannot open /dev/sdb2: Device or resource busy
>>
>>So, am I to assume there are problems with that hard drive? Is that
>>why I'm having so many problems making this work?
>>
>>Why did it not automatically start the array after the reboot?
>>
>>I'm getting frustrated, but I'm determined to make this work.
>>
>>Thanks for being patient with me. I think my head is starting to hurt
>>from all this banging against the wall.
>>
>>Brian
>>-- 
>>This message was sent to: Rodney Radford <rradford at mindspring.com>
>>To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
>>TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
>>Unsubscribe or edit options on the web	: http://www.trilug.org/mailman/options/trilug/rradford%40mindspring.com
>>TriLUG FAQ          : http://www.trilug.org/wiki/Frequently_Asked_Questions
>
>-- 
>This message was sent to: Rodney Radford <rradford at mindspring.com>
>To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
>TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
>Unsubscribe or edit options on the web	: http://www.trilug.org/mailman/options/trilug/rradford%40mindspring.com
>TriLUG FAQ          : http://www.trilug.org/wiki/Frequently_Asked_Questions




More information about the TriLUG mailing list