linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RAID partition starting sector (... 63?)
@ 2010-02-17 15:13 Kristleifur Daðason
  2010-02-17 15:18 ` Mikael Abrahamsson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Kristleifur Daðason @ 2010-02-17 15:13 UTC (permalink / raw)
  To: linux-raid

Hi,

I remember seeing some discussion on what sector a partition starts
on. Many programs create partitions that start on sector 63, which
doesn't really make any intuitive sense to me. I just lost a disk from
of a RAID10 array and was thinking I'd try to understand this issue as
I have to do some disk/block/partition wrangling anyway.

From a discussion from linux-raid titled "Raid 10 LVM JFS Seeking
performance help", I found the following:

On Mon, Dec 21, 2009 at 12:56 PM, Goswin von Brederlow
<goswin-v-b@web.de> wrote:
>
> Also, on a lower level, make sure your raid does not start on a
> partition starting at sector 63 (which is still the default in many
> partitioning progs). That easily results in bad alignment causing 4k
> chunks to land on 2 sectors. But you need to test that with your
> specific drive to see if it really is a problem.
>

Hmm ... In short: Do I want to have a partition start on any
particular sector? Especially in the case where I want to ...
- build a RAID10 with partitions (i.e. not with raw devices)
- using ~256K chunks
- and have a nice JFS filesystem on top of it.

Starting on sector 64 feels conceptually "prettier" than Sector 63,
but I can't picture the case where it behaves any different. Except
perhaps when GRUB expects stuff to begin at sector 63, making a mess
if we're starting at sector 64. Though it *should* work OK, of course.

Anyways ... Any tips on a subtle matter most well appreciated.
Especially tell me if I'm overthinking, please. Thanks.

-- Kristleifur

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

* Re: RAID partition starting sector (... 63?)
  2010-02-17 15:13 RAID partition starting sector (... 63?) Kristleifur Daðason
@ 2010-02-17 15:18 ` Mikael Abrahamsson
  2010-02-17 15:23 ` Martin K. Petersen
  2010-02-17 15:25 ` Greg Freemyer
  2 siblings, 0 replies; 8+ messages in thread
From: Mikael Abrahamsson @ 2010-02-17 15:18 UTC (permalink / raw)
  To: Kristleifur Daðason; +Cc: linux-raid

[-- Attachment #1: Type: TEXT/PLAIN, Size: 412 bytes --]

On Wed, 17 Feb 2010, Kristleifur Daðason wrote:

> Starting on sector 64 feels conceptually "prettier" than Sector 63,
> but I can't picture the case where it behaves any different. Except

If you have WD20EARS drives with 4k sectors on-disk you'll get ~1/3 
performance if you start on sector 63 instead of an even 4k boundary.

Always go for even 4k boundary.

-- 
Mikael Abrahamsson    email: swmike@swm.pp.se

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

* Re: RAID partition starting sector (... 63?)
  2010-02-17 15:13 RAID partition starting sector (... 63?) Kristleifur Daðason
  2010-02-17 15:18 ` Mikael Abrahamsson
@ 2010-02-17 15:23 ` Martin K. Petersen
  2010-02-17 16:15   ` Goswin von Brederlow
  2010-02-17 15:25 ` Greg Freemyer
  2 siblings, 1 reply; 8+ messages in thread
From: Martin K. Petersen @ 2010-02-17 15:23 UTC (permalink / raw)
  To: Kristleifur Daðason; +Cc: linux-raid

>>>>> "Kristleifur" == Kristleifur Daðason <kristleifur@gmail.com> writes:

Kristleifur> Starting on sector 64 feels conceptually "prettier" than
Kristleifur> Sector 63, but I can't picture the case where it behaves
Kristleifur> any different. Except perhaps when GRUB expects stuff to
Kristleifur> begin at sector 63, making a mess if we're starting at
Kristleifur> sector 64. Though it *should* work OK, of course.

The alignment only matters if your underlying storage is using a block
size bigger than 512 bytes internally.  Common examples of that would be
one of the new SATA drives with 4KB physical blocks or a hardware RAID
device.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
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] 8+ messages in thread

* Re: RAID partition starting sector (... 63?)
  2010-02-17 15:13 RAID partition starting sector (... 63?) Kristleifur Daðason
  2010-02-17 15:18 ` Mikael Abrahamsson
  2010-02-17 15:23 ` Martin K. Petersen
@ 2010-02-17 15:25 ` Greg Freemyer
  2 siblings, 0 replies; 8+ messages in thread
From: Greg Freemyer @ 2010-02-17 15:25 UTC (permalink / raw)
  To: Kristleifur Daðason; +Cc: linux-raid

On Wed, Feb 17, 2010 at 10:13 AM, Kristleifur Daðason
<kristleifur@gmail.com> wrote:
> Hi,
>
> I remember seeing some discussion on what sector a partition starts
> on. Many programs create partitions that start on sector 63, which
> doesn't really make any intuitive sense to me. I just lost a disk from
> of a RAID10 array and was thinking I'd try to understand this issue as
> I have to do some disk/block/partition wrangling anyway.
>
> From a discussion from linux-raid titled "Raid 10 LVM JFS Seeking
> performance help", I found the following:
>
> On Mon, Dec 21, 2009 at 12:56 PM, Goswin von Brederlow
> <goswin-v-b@web.de> wrote:
>>
>> Also, on a lower level, make sure your raid does not start on a
>> partition starting at sector 63 (which is still the default in many
>> partitioning progs). That easily results in bad alignment causing 4k
>> chunks to land on 2 sectors. But you need to test that with your
>> specific drive to see if it really is a problem.
>>
>
> Hmm ... In short: Do I want to have a partition start on any
> particular sector? Especially in the case where I want to ...
> - build a RAID10 with partitions (i.e. not with raw devices)
> - using ~256K chunks
> - and have a nice JFS filesystem on top of it.
>
> Starting on sector 64 feels conceptually "prettier" than Sector 63,
> but I can't picture the case where it behaves any different. Except
> perhaps when GRUB expects stuff to begin at sector 63, making a mess
> if we're starting at sector 64. Though it *should* work OK, of course.
>
> Anyways ... Any tips on a subtle matter most well appreciated.
> Especially tell me if I'm overthinking, please. Thanks.
>
> -- Kristleifur

I believe a better choice is to start at 1 MB regardless of sector
size.  This was initiated by Vista moving to that a few years ago so
you will almost always find hardware, etc.  That assumes your sector
size is still based on a power of two.

If you do get a 4K sector drive be sure it is 1MB aligned (ie. Vista mode).

The only shipping drives I know of are the WD ones and they have a
jumper for sector 63 aligned and 1MB aligned.  In a raid using sector
63 alignment would really make it hard to keep track of things.

There are rumors the future drives may come from the factory
pre-configured for one or the other, so if that turns into reality be
sure to buy the 1MB aligned drives.

Greg
-- 
Greg Freemyer
Head of EDD Tape Extraction and Processing team
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
Preservation and Forensic processing of Exchange Repositories White Paper -
<http://www.norcrossgroup.com/forms/whitepapers/tng_whitepaper_fpe.html>

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.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

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

* Re: RAID partition starting sector (... 63?)
  2010-02-17 15:23 ` Martin K. Petersen
@ 2010-02-17 16:15   ` Goswin von Brederlow
  2010-02-17 16:24     ` Martin K. Petersen
  0 siblings, 1 reply; 8+ messages in thread
From: Goswin von Brederlow @ 2010-02-17 16:15 UTC (permalink / raw)
  To: linux-raid

"Martin K. Petersen" <martin.petersen@oracle.com> writes:

>>>>>> "Kristleifur" == Kristleifur Daðason <kristleifur@gmail.com> writes:
>
> Kristleifur> Starting on sector 64 feels conceptually "prettier" than
> Kristleifur> Sector 63, but I can't picture the case where it behaves
> Kristleifur> any different. Except perhaps when GRUB expects stuff to
> Kristleifur> begin at sector 63, making a mess if we're starting at
> Kristleifur> sector 64. Though it *should* work OK, of course.
>
> The alignment only matters if your underlying storage is using a block
> size bigger than 512 bytes internally.  Common examples of that would be
> one of the new SATA drives with 4KB physical blocks or a hardware RAID
> device.

Or disks (flash, SSD, ...) with 64k erase block size.

Newer windows starts the first partition at 1M, which gives good
alignment in nearly every situation. Raids usualy have a chunk size
between 4k and 1M so they align too.

For grub(2) it can make a difference to start the first partition later
as it then has more space for its second stage.

MfG
        Goswin

--
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] 8+ messages in thread

* Re: RAID partition starting sector (... 63?)
  2010-02-17 16:15   ` Goswin von Brederlow
@ 2010-02-17 16:24     ` Martin K. Petersen
  2010-02-17 18:13       ` Greg Freemyer
  0 siblings, 1 reply; 8+ messages in thread
From: Martin K. Petersen @ 2010-02-17 16:24 UTC (permalink / raw)
  To: Goswin von Brederlow; +Cc: linux-raid

>>>>> "Goswin" == Goswin von Brederlow <goswin-v-b@web.de> writes:

Goswin> Newer windows starts the first partition at 1M, which gives good
Goswin> alignment in nearly every situation.

Correction: Windows aligns the first partition at 1MB + whatever
alignment is reported by the storage device.

Recent fdisk and parted to do the same.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: RAID partition starting sector (... 63?)
  2010-02-17 16:24     ` Martin K. Petersen
@ 2010-02-17 18:13       ` Greg Freemyer
  2010-02-17 18:42         ` Martin K. Petersen
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Freemyer @ 2010-02-17 18:13 UTC (permalink / raw)
  To: Martin K. Petersen; +Cc: Goswin von Brederlow, linux-raid

On Wed, Feb 17, 2010 at 11:24 AM, Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>>>>>> "Goswin" == Goswin von Brederlow <goswin-v-b@web.de> writes:
>
> Goswin> Newer windows starts the first partition at 1M, which gives good
> Goswin> alignment in nearly every situation.
>
> Correction: Windows aligns the first partition at 1MB + whatever
> alignment is reported by the storage device.
>
> Recent fdisk and parted to do the same.
>
> --
> Martin K. Petersen      Oracle Linux Engineering

Martin,

I assume this is through the relatively new /sysfs interface.  Is
mdraid now advertising its preferred stripe alignments through /sysfs?

Thanks
Greg
-- 
Greg Freemyer
Head of EDD Tape Extraction and Processing team
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
Preservation and Forensic processing of Exchange Repositories White Paper -
<http://www.norcrossgroup.com/forms/whitepapers/tng_whitepaper_fpe.html>

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.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

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

* Re: RAID partition starting sector (... 63?)
  2010-02-17 18:13       ` Greg Freemyer
@ 2010-02-17 18:42         ` Martin K. Petersen
  0 siblings, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2010-02-17 18:42 UTC (permalink / raw)
  To: Greg Freemyer; +Cc: Martin K. Petersen, Goswin von Brederlow, linux-raid

>>>>> "Greg" == Greg Freemyer <greg.freemyer@gmail.com> writes:

>> Recent fdisk and parted to do the same.

Greg> I assume this is through the relatively new /sysfs interface.  

Or block device ioctls, libblkid, etc.  Pick your poison.


Greg> Is mdraid now advertising its preferred stripe alignments through
Greg> /sysfs?

Yep.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2010-02-17 18:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-17 15:13 RAID partition starting sector (... 63?) Kristleifur Daðason
2010-02-17 15:18 ` Mikael Abrahamsson
2010-02-17 15:23 ` Martin K. Petersen
2010-02-17 16:15   ` Goswin von Brederlow
2010-02-17 16:24     ` Martin K. Petersen
2010-02-17 18:13       ` Greg Freemyer
2010-02-17 18:42         ` Martin K. Petersen
2010-02-17 15:25 ` Greg Freemyer

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).