linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Mixing 512 bytes and 4K sector harddrives in a raid1?
@ 2011-02-07 11:41 Henrik Olsson
  2011-02-07 13:56 ` David Brown
  2011-02-07 15:07 ` Roberto Spadim
  0 siblings, 2 replies; 4+ messages in thread
From: Henrik Olsson @ 2011-02-07 11:41 UTC (permalink / raw)
  To: linux-raid

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Mixing 512 bytes and 4K sector harddrives in a raid1?
  2011-02-07 11:41 Mixing 512 bytes and 4K sector harddrives in a raid1? Henrik Olsson
@ 2011-02-07 13:56 ` David Brown
  2011-02-07 14:08   ` Henrik Olsson
  2011-02-07 15:07 ` Roberto Spadim
  1 sibling, 1 reply; 4+ messages in thread
From: David Brown @ 2011-02-07 13:56 UTC (permalink / raw)
  To: linux-raid

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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Mixing 512 bytes and 4K sector harddrives in a raid1?
  2011-02-07 13:56 ` David Brown
@ 2011-02-07 14:08   ` Henrik Olsson
  0 siblings, 0 replies; 4+ messages in thread
From: Henrik Olsson @ 2011-02-07 14:08 UTC (permalink / raw)
  To: David Brown; +Cc: linux-raid

On Mon, Feb 7, 2011 at 14:56, David Brown <david@westcontrol.com> wrote:
> 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.
>
>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Mixing 512 bytes and 4K sector harddrives in a raid1?
  2011-02-07 11:41 Mixing 512 bytes and 4K sector harddrives in a raid1? Henrik Olsson
  2011-02-07 13:56 ` David Brown
@ 2011-02-07 15:07 ` Roberto Spadim
  1 sibling, 0 replies; 4+ messages in thread
From: Roberto Spadim @ 2011-02-07 15:07 UTC (permalink / raw)
  To: Henrik Olsson; +Cc: linux-raid

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 <henrik@fixme.se>:
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-07 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-07 11:41 Mixing 512 bytes and 4K sector harddrives in a raid1? Henrik Olsson
2011-02-07 13:56 ` David Brown
2011-02-07 14:08   ` Henrik Olsson
2011-02-07 15:07 ` Roberto Spadim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).