[CentOS] Stripe vs Cylinder alignement...

2009-10-30 Thread John Doe
Hi,

I modified my kickstart to do some custom partioning and formating in a 
pre-install script.
I am trying to align the partitions on the RAID stripe (and format with a 
correct stride).
But, sfdisk complains that it does not start/end on a cylinder boundary (used 
-L option to limit complaining).
Since the cylinder size is not a multiple of the stripe size, I cannot align on 
both.
I tried to align the begining on the stripe and the end on the end of a 
cylinder, but sfdisk still compains...
Basicaly, I have a 128KB (256 sectors) stripe, and 255*32 = 8160 sectors 
cylinders.
What I am doing is:
begin = ( begin / 256 ) * 256
end = ( end / 8160 ) * 8160 -1
So, for my first partition (96MB):
  begin=256
  size = ( ( 96 * 1024 * 2 ) / 8160 ) * 8160 = 195840 sectors
  end = 195840 - 1 - 256 = 195583
Any idea what I am doing wrong in my calculations or logic?

Thx,
JD


  
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Stripe vs Cylinder alignement...

2009-10-30 Thread John Doe
 So, for my first partition (96MB):
   begin=256
   size = ( ( 96 * 1024 * 2 ) / 8160 ) * 8160 = 195840 sectors
   end = 195840 - 1 - 256 = 195583

Oops, I meant:

  begin = 256
  size = 96 * 1024 * 2 = 196608 sectors
  end = ( ( begin + size ) / 8160 ) * 8160 - 1 = 195839
  aligned_size = end - begin + 1 = 195584

Maybe... I am a bit confused  ^_^

JD


  
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Stripe vs Cylinder alignement...

2009-10-30 Thread Blake Hudson
Cylinders are largely logical - even in magnetic disks you have no way 
of knowing if the logical cylinder matches up with the physical 
construct of a cylinder on the disk medium - in any modern(15 years ?) 
disk they won't. Don't worry about cylinders, just align your fs to the 
stripe/sector.

Obviously, the concept of a cylinder starts to go out the window with 
RAID, SSD's, etc.

More information about partition alignment here - 
http://www.ocztechnologyforum.com/forum/showpost.php?p=335049postcount=134

--Blake

 Original Message  
Subject: [CentOS] Stripe vs Cylinder alignement...
From: John Doe jd...@yahoo.com
To: centos@centos.org
Date: Friday, October 30, 2009 9:45:59 AM
 Hi,

 I modified my kickstart to do some custom partioning and formating in a 
 pre-install script.
 I am trying to align the partitions on the RAID stripe (and format with a 
 correct stride).
 But, sfdisk complains that it does not start/end on a cylinder boundary (used 
 -L option to limit complaining).
 Since the cylinder size is not a multiple of the stripe size, I cannot align 
 on both.
 I tried to align the begining on the stripe and the end on the end of a 
 cylinder, but sfdisk still compains...
 Basicaly, I have a 128KB (256 sectors) stripe, and 255*32 = 8160 sectors 
 cylinders.
 What I am doing is:
 begin = ( begin / 256 ) * 256
 end = ( end / 8160 ) * 8160 -1
 So, for my first partition (96MB):
   begin=256
   size = ( ( 96 * 1024 * 2 ) / 8160 ) * 8160 = 195840 sectors
   end = 195840 - 1 - 256 = 195583
 Any idea what I am doing wrong in my calculations or logic?

 Thx,
 JD


   
 ___
 CentOS mailing list
 CentOS@centos.org
 http://lists.centos.org/mailman/listinfo/centos
   

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Stripe vs Cylinder alignement...

2009-10-30 Thread NiftyCluster Tom Mitchell
On 10/30/09, John Doe jd...@yahoo.com wrote:
 Hi,

 I modified my kickstart to do some custom partioning and formating in a
 pre-install script.
 I am trying to align the partitions on the RAID stripe (and format with a
 correct stride).
 But, sfdisk complains that it does not start/end on a cylinder boundary
 (used -L option to limit complaining).
 Since the cylinder size is not a multiple of the stripe size, I cannot align
 on both.
 I tried to align the begining on the stripe and the end on the end of a
 cylinder, but sfdisk still compains...
 Basicaly, I have a 128KB (256 sectors) stripe, and 255*32 = 8160 sectors
 cylinders.
 What I am doing is:
 begin = ( begin / 256 ) * 256
 end = ( end / 8160 ) * 8160 -1
 So, for my first partition (96MB):
   begin=256
   size = ( ( 96 * 1024 * 2 ) / 8160 ) * 8160 = 195840 sectors
   end = 195840 - 1 - 256 = 195583
 Any idea what I am doing wrong in my calculations or logic?


Logic!  Well not logic but knowledge about the physical layer inside the disk.

Most disks today do not have a constant number of blocks
per track/ cylinder.   Most disk partitioning tools just guess
and do some rounding.   There can be one, two or even three
zones on the surface with different blocks per track on each.

One strategy is to look at the buffer setup and size of a disk
and match stripe sizes to work with memory not blocks per cylinder.
Note that a drive with an 8MB buffer uses some for read and some
for write.   Some research or testing can expose the ratio.

Another strategy is to partition devices exactly the same.

LBA (Logical block addressing) hides the physical layer




-- 
NiftyCluster

T o m   M i t c h e l l
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Stripe vs Cylinder alignement...

2009-10-30 Thread Robert Heller
At Fri, 30 Oct 2009 11:14:54 -0500 CentOS mailing list centos@centos.org 
wrote:

 
 Cylinders are largely logical - even in magnetic disks you have no way 
 of knowing if the logical cylinder matches up with the physical 
 construct of a cylinder on the disk medium - in any modern(15 years ?) 
 disk they won't. Don't worry about cylinders, just align your fs to the 
 stripe/sector.

Cylinders only ever existed (as a *physicly mapped* thing) with MFM,
RLL, and early IDE hard drives (IDE drives grew out of 'hard cards',
which were MFM/RLL drives bolted to a XT (pre/early ISA) expansion card
with a MFM/RLL drive controller). (And yes, floppies. Not sure about
CD/DVD-ROMS, but that is a completely different can of worms.)  SCSI
disks *never* had any physical mapping for cylinders, heads, OR
sectors.  The SCSI command protocol uses LBA addressing and has from
day one.  At this point, CHS addressing is pretty much a BIOS 'fantasy'
for any modern disks.

 
 Obviously, the concept of a cylinder starts to go out the window with 
 RAID, SSD's, etc.
 
 More information about partition alignment here - 
 http://www.ocztechnologyforum.com/forum/showpost.php?p=335049postcount=134
 
 --Blake
 
  Original Message  
 Subject: [CentOS] Stripe vs Cylinder alignement...
 From: John Doe jd...@yahoo.com
 To: centos@centos.org
 Date: Friday, October 30, 2009 9:45:59 AM
  Hi,
 
  I modified my kickstart to do some custom partioning and formating in a 
  pre-install script.
  I am trying to align the partitions on the RAID stripe (and format with a 
  correct stride).
  But, sfdisk complains that it does not start/end on a cylinder boundary 
  (used -L option to limit complaining).
  Since the cylinder size is not a multiple of the stripe size, I cannot 
  align on both.
  I tried to align the begining on the stripe and the end on the end of a 
  cylinder, but sfdisk still compains...
  Basicaly, I have a 128KB (256 sectors) stripe, and 255*32 = 8160 sectors 
  cylinders.
  What I am doing is:
  begin = ( begin / 256 ) * 256
  end = ( end / 8160 ) * 8160 -1
  So, for my first partition (96MB):
begin=256
size = ( ( 96 * 1024 * 2 ) / 8160 ) * 8160 = 195840 sectors
end = 195840 - 1 - 256 = 195583
  Any idea what I am doing wrong in my calculations or logic?
 
  Thx,
  JD
 
 

  ___
  CentOS mailing list
  CentOS@centos.org
  http://lists.centos.org/mailman/listinfo/centos

 
 ___
 CentOS mailing list
 CentOS@centos.org
 http://lists.centos.org/mailman/listinfo/centos
 
  

-- 
Robert Heller -- 978-544-6933
Deepwoods Software-- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
hel...@deepsoft.com   -- http://www.deepsoft.com/ModelRailroadSystem/

 
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos