Skip to contentSkip to conversation

Software, Raid 5, Different Size Drives.

DISCUSSION Jon Hardcastle 7 participants 11 messages Aug 15, 2009 – Sep 7, 2009 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi quick Q.. I have a 6 drive array made up of 4 500GB's and 2 750GB's.

I know the array will only take on a size based on the smallest drive. To that end as I phase drives out based on usage etc I replace them with the best value drive I can lay my hands on (upto 1TB~ as i have read a raid 5 array of drives over that size approx start to cause problems with read failures on re-builds - but that is for another thread)

So my array is currently ~2.5GB with 2x250GB currently not in use and I am about to phase out a 500GB and replace with a 1TB. Now i have read that you are better of creating a auto detect raid partition on the drive and adding that rather than adding the entire drive (so sda1 not sda). This is where my question comes in. I have read that 2 1TB(or whatever size) can be different block sizes and hence adding a partition that is the entire drive can cause problems as these sizes will differ.

Can anyone tell me what truth there is in this? Should I actually create a partition that is always going to be a nice multiple size smaller so i can smooth over the bumps?

(also anyone know if raid5 to raid 6 native support is anywhere near?)

-----------------------
N: Jon Hardcastle
E: [email protected]
'Do not worry about tomorrow, for tomorrow will bring worries of its own.'
-----------------------

Send instant messages to your online friends http://uk.messenger.yahoo.com

#1 lore raw
Quoted 8 lines · Jon Hardcastle

Hi quick Q.. I have a 6 drive array made up of 4 500GB's and 2 750GB's.

I know the array will only take on a size based on the smallest drive. To that end as I phase drives out based on usage etc I replace them with the best value drive I can lay my hands on (upto 1TB~ as i have read a raid 5 array of drives over that size approx start to cause problems with read failures on re-builds - but that is for another thread)

Quoted 7 lines

So my array is currently ~2.5GB with 2x250GB currently not in use and I am about to phase out a 500GB and replace with a 1TB. Now i have read that you are better of creating a auto detect raid partition on the drive and adding that rather than adding the entire drive (so sda1 not sda). This is where my question comes in. I have read that 2 1TB(or whatever size) can be different block sizes and hence adding a partition that is the entire drive can cause problems as these sizes will differ.

This was a topic of a recent thread on this list. Apparently there is an industry standard which sets out exactly how many sectors a 1TB or 2TB drive should be, and it seems that all drive manufactures adhere to this.

Quoted 4 lines

Can anyone tell me what truth there is in this? Should I actually create a partition that is always going to be a nice multiple size smaller so i can smooth over the bumps?

Personally I never create a single partition for an md array. I either use the whole drive, or create a number of partitions for different arrays. I also avoid in-kernel autodetect.

The question of what "best" may well come down to the start up scripts that your distro uses and any hidden assumptions that might be in them...

I guess that isn't very helpful though... I can say that either approach can be made to work fine. The one issue that you particularly need to be careful off is the boot sector. Partitions always leave room for a boot sector. If you don't use partitions and you want a separate boot sector, then v1.2 metadata is the thing to choose....

Quoted 2 lines

(also anyone know if raid5 to raid 6 native support is anywhere near?)

Yes. It works with 2.6.30 (or preferrable 2.6.31) and the devel-3.1 branch from my git tree git://neil.brown.name/mdadm

NeilBrown

#2 lore raw
Quoted 8 lines
Quoted 1 line

Can anyone tell me what truth there is in this? Should I actually create

a

Quoted 2 lines

partition that is always going to be a nice multiple size smaller so i can smooth over the bumps?

Personally I never create a single partition for an md array. I either use the whole drive, or create a number of partitions for different arrays. I also avoid in-kernel autodetect.

Although I am nowhere nearly the expert Neil is, I'm going to add my
support to his post. I'm much more familiar with flavors of Unix than with Linux, but my experience strongly suggests what he says is true. With a single drive system, partitions are effectively mandatory, but once one decides to implement a multiple drive system, in my estimation the paradigm changes. If your implementation requires more than one array to be built from several common disks, then partitioning is required, but if practical I prefer to build systems with the main data area supplied by an array of whole disks. Of course, there are a number of variations of even this theme, but personally I like to build a rather small OS disk containing the root, /var, /etc, and so forth. Sometimes I will create a separate partition for /boot. The rest I put on a single large RAID array of whole disks with no partitions under or above the array. Although RAID solutions are certainly possible for the OS areas, I personally prefer to not implement RAID for the OS, and simply keep a cold spare drive around with regular backups of the OS configuration kept online. It's also been my experience that, all things considered, it's generally best to limit the number of partitions as much as possible. Of course, there can be some performance penalty involved, and valid arguments can be made for creating specific partitions to meet various needs.

Quoted 8 lines

The question of what "best" may well come down to the start up scripts that your distro uses and any hidden assumptions that might be in them...

I guess that isn't very helpful though... I can say that either approach can be made to work fine. The one issue that you particularly need to be careful off is the boot sector. Partitions always leave room for a boot sector. If you don't use partitions and you want a separate boot sector, then v1.2 metadata is the thing to choose....

Yeah, what he said. What's more, booting from an array presents
it's own special requirements. While it is certainly possible to arrange to meet all the requirements for booting from an array, unless one is working with an embedded application, or an enclosure with limited power and / or drive slots, I much prefer to simply circumvent the issue by booting from a relatively small, very inexpensive drive and making the data area as simple, straightforward, and primitive as possible. If the drive dies, I replace it. 'No big deal.

#3 lore raw
In reply to NeilBrown
Quoted 17 lines · NeilBrown
Quoted 8 lines · Jon Hardcastle

Hi quick Q.. I have a 6 drive array made up of 4 500GB's and 2 750GB's.

I know the array will only take on a size based on the smallest drive. To that end as I phase drives out based on usage etc I replace them with the best value drive I can lay my hands on (upto 1TB~ as i have read a raid 5 array of drives over that size approx start to cause problems with read failures on re-builds - but that is for another thread)

Quoted 7 lines

So my array is currently ~2.5GB with 2x250GB currently not in use and I am about to phase out a 500GB and replace with a 1TB. Now i have read that you are better of creating a auto detect raid partition on the drive and adding that rather than adding the entire drive (so sda1 not sda). This is where my question comes in. I have read that 2 1TB(or whatever size) can be different block sizes and hence adding a partition that is the entire drive can cause problems as these sizes will differ.

Quoted 3 lines

This was a topic of a recent thread on this list. Apparently there is an industry standard which sets out exactly how many sectors a 1TB or 2TB drive should be, and it seems that all drive manufactures adhere to this.

Also note that raid on sda or sda1 both have exactly the same problem. You can not use a disk smaller than the minimum disk used in the raid. Really makes no difference if it is partitioned or not.

If you fear size problems then look up the industry standard size and check your disk follows that. I've never seen a disk smaller than that size, only bigger.

Quoted 8 lines
Quoted 3 lines

Can anyone tell me what truth there is in this? Should I actually create a partition that is always going to be a nice multiple size smaller so i can smooth over the bumps?

Personally I never create a single partition for an md array. I either use the whole drive, or create a number of partitions for different arrays. I also avoid in-kernel autodetect.

Quoted 8 lines

The question of what "best" may well come down to the start up scripts that your distro uses and any hidden assumptions that might be in them...

I guess that isn't very helpful though... I can say that either approach can be made to work fine. The one issue that you particularly need to be careful off is the boot sector. Partitions always leave room for a boot sector. If you don't use partitions and you want a separate boot sector, then v1.2 metadata is the thing to choose....

That is actually a verry important thing. Putting your raid on sda without leaving space for the bootloader is rather dangerous. Over time it is easy for the bootloader to get installed on the wrong disk because sda and sdb switched places or you forgot which drive is the boot drive and so on.

I now actually put the bootloader on all my drives and all are setup to have space there. That way the system boots even if I rearange disks or the boot drive fails and so on.

MfG
Goswin

#4 lore raw
In reply to NeilBrown
Quoted 80 lines · NeilBrown

From: NeilBrown <[email protected]>
Subject: Re: Software, Raid 5, Different Size Drives.
To: [email protected]
Cc: [email protected]
Date: Sunday, 16 August, 2009, 11:45 PM

Quoted 1 line · Jon Hardcastle

Hi quick Q.. I have a 6 drive array made up of 4

500GB's and 2 750GB's.

Quoted 2 lines

I know the array will only take on a size based on the

smallest drive. To

Quoted 1 line

that end as I phase drives out based on usage etc I

replace them with the

Quoted 1 line

best value drive I can lay my hands on (upto 1TB~ as i

have read a raid 5

Quoted 1 line

array of drives over that size approx start to cause

problems with read

Quoted 1 line

failures on re-builds - but that is for another

thread)

Quoted 2 lines

So my array is currently ~2.5GB with 2x250GB currently

not in use and I am

Quoted 1 line

about to phase out a 500GB and replace with a 1TB. Now

i have read that

Quoted 1 line

you are better of creating a auto detect raid

partition on the drive and

Quoted 1 line

adding that rather than adding the entire drive (so

sda1 not sda). This is

Quoted 1 line

where my question comes in. I have read that 2 1TB(or

whatever size) can

Quoted 1 line

be different block sizes and hence adding a partition

that is the entire

Quoted 1 line

drive can cause problems as these sizes will differ.

This was a topic of a recent thread on this list. Apparently there is an
industry standard which sets out exactly how many sectors a 1TB or 2TB
drive should be, and it seems that all drive manufactures adhere to this.

Quoted 2 lines

Can anyone tell me what truth there is in this? Should

I actually create a

Quoted 1 line

partition  that is always going to be a nice

multiple size smaller so i

Quoted 1 line

can smooth over the bumps?

Personally I never create a single partition for an md array.  I either
use the whole drive, or create a number of partitions for different
arrays.  I also avoid in-kernel autodetect.

The question of what "best" may well come down to the start up scripts
that your distro uses and any hidden assumptions that might be in them...

I guess that isn't very helpful though... I can say that either approach
can be made to work fine.  The one issue that you particularly need to be
careful off is the boot sector.  Partitions always leave room for a boot
sector.  If you don't use partitions and you want a separate boot sector,
then v1.2 metadata is the thing to choose....

Quoted 2 lines

(also anyone know if raid5 to raid 6 native support is

anywhere near?)

Yes. It works with 2.6.30 (or preferrable 2.6.31) and the devel-3.1 branch
from my git tree git://neil.brown.name/mdadm

Quoted 8 lines

NeilBrown

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

Any idea where i find out this 'industry standard'?

My setup is build on drives that have a partition on them, so the finer points over the pro's and con's of this are moot for me.. until i come to replace the array. Perhaps someone can tell me tho. If I do use a partition on the 1TB drive, and it is is x blocks big. If i add another 1TB drive that is x +/- 10 blocks in size. Will the array just use the size of the smaller and grow accordingly?

-----------------------
N: Jon Hardcastle
E: [email protected]
'Do not worry about tomorrow, for tomorrow will bring worries of its own.'
-----------------------

Send instant messages to your online friends http://uk.messenger.yahoo.com
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

Hi,

2009/8/17 Jon Hardcastle <[email protected]>:

Quoted 3 lines

Any idea where i find out this 'industry standard'?

My setup is build on drives that have a partition on them, so the finer points over the pro's and con's of this are moot for me.. until i come to replace the array. Perhaps someone can tell me tho. If I do use a partition on the 1TB drive, and it is is x blocks big. If i add another 1TB drive that is x +/- 10 blocks in size. Will the array just use the size of the smaller and grow accordingly?

You might want to check out that linux-raid thread,
http://www.issociate.de/board/post/497059/Adding_a_smaller_drive.html
. It seems to be one of IDEMA standards. I cannot say I've seen it myself, but the list seems to be pretty confident about it. And, it appears that standard defines *exact* block count. It would be pointless if it was just a minimum, as you might've built an array with "more than minimum" drives, and then couldn't replace them with drives with exact block count.

On top of that, my personal opinion is that having a partition doesn't change anything in that matter. You could still, theoretically assuming there's no IDEMA standard, find a smaller drive, and make a partition that is smaller than partitions on other drives.

Cheers,
Mike

#7 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"John" == John Robinson <[email protected]> writes:

John> On 17/08/2009 15:07, Jon Hardcastle wrote: [...]

Quoted 1 line
Quoted 1 line

Any idea where i find out this 'industry standard'?

John> Here:
John> http://www.idema.org/_smartsite/modules/local/data_file/show_file.php?cmd=download&data_file_id=1066

I should add that there's a more up-to-date LBA spec with more detail. Not sure why version 3 hasn't been published on the IDEMA website--it's over a year old by now. I'll see if I can nudge the right people...

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#8 lore raw
In reply to Jon Hardcastle
Quoted 6 lines · Jon Hardcastle

My setup is build on drives that have a partition on them, so the finer points over the pro's and con's of this are moot for me.. until i come to replace the array. Perhaps someone can tell me tho. If I do use a partition on the 1TB drive, and it is is x blocks big. If i add another 1TB drive that is x +/- 10 blocks in size. Will the array just use the size of the smaller and grow accordingly?

The effective size of the drive is rounded to the chunk size which defaults to 64K.

If you try to add a drive or partition to an array and it does not have enough space for the data plus metadata, then md will not accept the drive.
If you add a drive or partition that has more space than is needed, the extra will simple not be used.
If you eventually replace all drives with drives that have more space, then every drive will have space on it that is unused.
You can, if you choose, then expand the array to use that extra space with --grow --size=max.

I hope that answers your question.

NeilBrown

#9 lore raw
In reply to NeilBrown

--- On Sun, 16/8/09, NeilBrown <[email protected]> wrote:

...

Quoted 10 lines
Quoted 2 lines

(also anyone know if raid5 to raid 6 native support is

anywhere near?)

Yes. It works with 2.6.30 (or preferrable 2.6.31) and the devel-3.1 branch
from my git tree git://neil.brown.name/mdadm

NeilBrown

I am probably being a bit thick here, but I am running 2.6.8 as per

http://packages.gentoo.org/package/sys-fs/mdadm

Does this imply that I already have these features.. as i am pretty sure i don't (unless it is undocumented)

I want to add 2 more drives to my array and grow it/reshape from raid 5 to 6...

-----------------------
N: Jon Hardcastle
E: [email protected]
'Do not worry about tomorrow, for tomorrow will bring worries of its own.'
-----------------------

#10 lore raw
Quoted 15 lines · Jon Hardcastle

--- On Sun, 16/8/09, NeilBrown <[email protected]> wrote:

...

Quoted 10 lines
Quoted 2 lines

(also anyone know if raid5 to raid 6 native support is

anywhere near?)

Yes. It works with 2.6.30 (or preferrable 2.6.31) and the devel-3.1 branch
from my git tree git://neil.brown.name/mdadm

NeilBrown

Quoted 6 lines

I am probably being a bit thick here, but I am running 2.6.8 as per

http://packages.gentoo.org/package/sys-fs/mdadm

Does this imply that I already have these features.. as i am pretty sure i don't (unless it is undocumented)

No you don't.
2.6.8 is < 3.1, so your mdadm doesn't have the required support And you need a kernel which is at least 2.6.30.

Quoted 3 lines

I want to add 2 more drives to my array and grow it/reshape from raid 5 to 6...

You'll need to be a bit more patient.

NeilBrown