Mixing 512 bytes and 4K sector harddrives in a raid1?

4 messages, 3 authors, 2011-02-07 · open the first message on its own page

Mixing 512 bytes and 4K sector harddrives in a raid1?

From: Henrik Olsson <hidden>
Date: 2011-02-07 11:41:13

Hi,

One of the drives in my raid1 recently crashed and it looks like all
the replacement disks (2TB) i can find use 4K sectors, but the old
ones were 512 bytes.
Are there any issues with having a raid1 array with different sector
sizes for the drives?

Regards,
Henrik

Re: Mixing 512 bytes and 4K sector harddrives in a raid1?

From: David Brown <hidden>
Date: 2011-02-07 13:56:04

On 07/02/2011 12:41, Henrik Olsson wrote:
Hi,

One of the drives in my raid1 recently crashed and it looks like all
the replacement disks (2TB) i can find use 4K sectors, but the old
ones were 512 bytes.
Are there any issues with having a raid1 array with different sector
sizes for the drives?

Regards,
Henrik
I can't answer for sure, but I would think there would be no problem as 
long as you make sure your partitions are 4 KB aligned.  AFAIUI, Linux 
always writes in 4K blocks to the disks anyway, so alignment is the only 
issue - and that's a performance issue, not a correctness one.

Re: Mixing 512 bytes and 4K sector harddrives in a raid1?

From: Henrik Olsson <hidden>
Date: 2011-02-07 14:08:17

On Mon, Feb 7, 2011 at 14:56, David Brown [off-list ref] wrote:
On 07/02/2011 12:41, Henrik Olsson wrote:
quoted
Hi,

One of the drives in my raid1 recently crashed and it looks like all
the replacement disks (2TB) i can find use 4K sectors, but the old
ones were 512 bytes.
Are there any issues with having a raid1 array with different sector
sizes for the drives?

Regards,
Henrik
I can't answer for sure, but I would think there would be no problem as long
as you make sure your partitions are 4 KB aligned.  AFAIUI, Linux always
writes in 4K blocks to the disks anyway, so alignment is the only issue -
and that's a performance issue, not a correctness one.
Yes, that's the impression i've gotten after reading about it too.
As long as i create a 4KB aligned partition on the new drive that is
at least as large as the old one and replace the old one with it in
the array, it should just work?

I run dmcrypt and then lvm on top of the raid array though, trying to
figure out what needs to be done with alignment with those...

Worst case i should be able to create a new properly aligned
array/dmcrypt/lvm on the new drive, copy the old data over and add the
old working drive to the new array since if it's 4K aligned it should
also be 512B aligned?

/Henrik
--
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: Mixing 512 bytes and 4K sector harddrives in a raid1?

From: Roberto Spadim <hidden>
Date: 2011-02-07 15:07:39

speed problem =) (i tested eeheheh)
i was talking about it in this list
i don´t know yet what the internal raid1 sector size (i think it´s the
chuck size defined on mdadm --create, but i´m not sure)
if you use 4k ssd you can see read/write when making <4kb read on ssd,
if it's a hd no problem, ssd will degrade max ssd speed with wrong
sector size (read/write not aligned)
i'm waiting the chunck size answer if you want wait the list to answer...

2011/2/7 Henrik Olsson [off-list ref]:
Hi,

One of the drives in my raid1 recently crashed and it looks like all
the replacement disks (2TB) i can find use 4K sectors, but the old
ones were 512 bytes.
Are there any issues with having a raid1 array with different sector
sizes for the drives?

Regards,
Henrik
--
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


-- 
Roberto Spadim
Spadim Technology / SPAEmpresarial
--
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help