Re: mdadm striped parity RAID with Advanced Format drives

Re: mdadm striped parity RAID with Advanced Format drives

am 21.07.2011 13:18:07 von Stan Hoeppner

On 7/21/2011 5:27 AM, Mikael Abrahamsson wrote:
> On Thu, 21 Jul 2011, Stan Hoeppner wrote:
>
>> 1. Can one create a RAID5 from bare (partition-less) AF drives and
>> avoid the read-modify-write problem?
>
> Yes, that's what I always do.

Ok, good.

>> 2. Or is one required to assemble the array from properly aligned
>> partitions created on each drive?
>
> No.

Great.

Ok. Pol, keep in mind that all drives must be identical size when
creating an array on raw disks. You said you're now working with 6
identical WD drives so this shouldn't be an issue.

After you shutdown and delete the current array, wipe all existing
partitions and partition tables from these drives before creating the
raw disk array. Use:

~$ dd if=/dev/zero of=/dev/sdX bs=512 count=1

Do this once for each drive, replacing 'X' with the proper letter. Then
create your new RAID5 array using sd[a,b,c,d,e,f].

Good luck.

--
Stan
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: mdadm striped parity RAID with Advanced Format drives

am 21.07.2011 13:23:21 von Mikael Abrahamsson

On Thu, 21 Jul 2011, Stan Hoeppner wrote:

> Ok. Pol, keep in mind that all drives must be identical size when
> creating an array on raw disks. You said you're now working with 6
> identical WD drives so this shouldn't be an issue.

They don't have to be identical size. It'll use the smallest component
size and use that much data on all drives.

I recommend to use superblock v1.2, which is default in later versions of
mdadm.

--
Mikael Abrahamsson email: swmike@swm.pp.se
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: mdadm striped parity RAID with Advanced Format drives

am 23.07.2011 05:31:56 von Maurice

On 7/21/2011 5:18 AM, Stan Hoeppner wrote:
> ..Ok. Pol, keep in mind that all drives must be identical size when
> creating an array on raw disks.
That always makes me nervous.
I have seen the case before where a drive has been "kicked out" and when
you go to add it back, it is refused as "too small"
Grown defects have shrunk the device.

I find it is safer to make one big partition on each device, and make
this a bit smaller than the device.

--
Cheers,
Maurice Hilarius
eMail: /mhilarius@gmail.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: mdadm striped parity RAID with Advanced Format drives

am 23.07.2011 09:11:05 von Michael Tokarev

23.07.2011 07:31, maurice wrote:
> On 7/21/2011 5:18 AM, Stan Hoeppner wrote:
>> ..Ok. Pol, keep in mind that all drives must be identical size when
>> creating an array on raw disks.
> That always makes me nervous.

And this is not really correct statement.

If you want to be sure, use --size=xxx argument when creating the
array, and specify a size smaller than size of your drives. This
way, you can avoid possible problems with drive size fluctuations
and different size of a replacement drives from another manufacturer.
Also, the "fluctuations" - i mean, several drives in the same batch
may have slightly different size - will be masked out by mdadm itself,
due to rounding to chunk size.

Just use a few gigs less than your drive size is. Maybe the resulting
size will be a nice power-of-two value, as well.

> I have seen the case before where a drive has been "kicked out" and when
> you go to add it back, it is refused as "too small"
> Grown defects have shrunk the device.

This CAN NOT HAPPEN. Drive never changes its size. Newly
discovered defects gets remapped to _reserved_ space, not to
a space taken from other data. If the drive runs out of
reserved space (but you should replace it WAY before that),
it will stop remapping sectors.

> I find it is safer to make one big partition on each device, and make
> this a bit smaller than the device.

That works too, ofcourse. This way, it might be a bit easier to
identify your drives too - for example, you can use GPT partition
table there with proper labels for your partition.

/mjt
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: mdadm striped parity RAID with Advanced Format drives

am 23.07.2011 17:38:03 von Maurice

On 7/23/2011 1:11 AM, Michael Tokarev wrote:
> ..
>> I have seen the case before where a drive has been "kicked out" and when
>> you go to add it back, it is refused as "too small"
>> Grown defects have shrunk the device.
> This CAN NOT HAPPEN. Drive never changes its size.

If you say so.
;>}

I have seen this exact issue happen at least twice.The arrays were
originally built.
After a failure they could not be rebuilt as one or more drives had
become too small.
If you have an explanation for that, I am all ears..

At that point it is a lot of work to recover as one needs to go and find
a drive that is bigger , to facilitate the recovery.


--
Cheers,
Maurice Hilarius
eMail: /mhilarius@gmail.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: mdadm striped parity RAID with Advanced Format drives

am 23.07.2011 17:58:12 von Mikael Abrahamsson

On Sat, 23 Jul 2011, maurice wrote:

>> This CAN NOT HAPPEN. Drive never changes its size.
>
> After a failure they could not be rebuilt as one or more drives had become
> too small.

I'd like to see text that indicates this. I agree with the original poster
that this just doesn't happen.

--
Mikael Abrahamsson email: swmike@swm.pp.se
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: mdadm striped parity RAID with Advanced Format drives

am 23.07.2011 20:03:15 von Maurice

On 7/23/2011 9:58 AM, Mikael Abrahamsson wrote:
> ..
> I'd like to see text that indicates this. I agree with the original
> poster that this just doesn't happen.
>
I no longer have the details at hand, as I have fixed it, and it was
about 8 months ago last time I saw it.


--
Cheers,
Maurice Hilarius
eMail: /mhilarius@gmail.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: mdadm striped parity RAID with Advanced Format drives

am 25.07.2011 10:41:07 von Nikolay Kichukov

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I can confirm this has happened to me once. The drive went just a bit smaller than it was originally. Unfortunately I
have no evidence of this at this stage. It was real strange. Whatever I tried did not bring the same size back. It kept
being reported as a few sectors less.

Cheers,
- -Nik

On 07/23/2011 09:03 PM, maurice wrote:
> On 7/23/2011 9:58 AM, Mikael Abrahamsson wrote:
>> ..
>> I'd like to see text that indicates this. I agree with the original poster that this just doesn't happen.
>>
> I no longer have the details at hand, as I have fixed it, and it was about 8 months ago last time I saw it.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOLSwjAAoJEDFLYVOGGjgXnB8IANbQH6knVjEWq9+Q5XOT 0R6H
blRSxD8p2Vby6Yoh6N9kzL2rYls5yeQlqaMCSmD4ojk7qL+A6yWDXpEPd02X Jlsr
E6MlaSZK3AQMMCcegnZQkmCSbshG8t/+plqNJLq9FO4h4rEQgoa6TuyJzSBh EWkT
QNOLqSA/84prPuGTgr7fgf7OQGnB1GEPd5uu1jxWMwbSZ4bhIOikv5/XAgiH ZGuJ
ed9lRBTMIWfwtaMnLhrjIW6UgeyJQfIC0VFEao1/ze1+WeLReErKwGm7c0me Hs4v
NgZImsUQUZOFJRwzgoXy+fVxcBGtWCUlSIQSaGyRhfARyug+2Dk2e132jVZv SfY=
=huL0
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: mdadm striped parity RAID with Advanced Format drives

am 25.07.2011 20:57:18 von Michael Tokarev

25.07.2011 12:41, Nikolay Kichukov wrote:
> I can confirm this has happened to me once. The drive went just a bit smaller than it was originally. Unfortunately I
> have no evidence of this at this stage. It was real strange. Whatever I tried did not bring the same size back. It kept
> being reported as a few sectors less.

It's possible to get smaller size at one point, by enabling HPA area
in a drive. I think all modern (desktop) drives support this feature.

/mjt

> Cheers,
> -Nik
>
> On 07/23/2011 09:03 PM, maurice wrote:
>> On 7/23/2011 9:58 AM, Mikael Abrahamsson wrote:
>>> ..
>>> I'd like to see text that indicates this. I agree with the original poster that this just doesn't happen.
>>>
>> I no longer have the details at hand, as I have fixed it, and it was about 8 months ago last time I saw it.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html