[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Recommendation for buy Hardware



On Fri, 28 Jan 2011, Henrique de Moraes Holschuh wrote:
> On Fri, 28 Jan 2011, Jochen Schulz wrote:
> > Henrique de Moraes Holschuh:
> > > On Fri, 28 Jan 2011, Alfonso Ruiz wrote:
> > >> The ST2000DL003 is 4096 bytes per sector, can this have problems with
> > >> squeeze?
> > > 
> > > Squeeze tries to align everything to 1MB boundaries, so it shouldn't cause
> > > problems.
> > 
> > Do you refer to the installer only, or does that apply to the usual
> > tools (parted/cfdisk, LVM, cryptseup) as well?
> 
> The installer, but get RC2 or newer.  And up-to-date squeeze.
> 
> fdisk will do the right thing, IF you press "u" and "c" first, to switch
> off the dos-brain-hemorrage default mode, and change to sectors.
> Alternatively, run it with fdisk -c -u.
> 
> parted will do the right thing AFAIK, at least on DOS disklabels.
> 
> cfdisk, I don't know.  Switch to sector mode, and see whether it wants
> to create partitions at multiples of 2048 (i.e. 1MB) or not.
> 
> cryptsetup does a 1:1 linear map, so it doesn't change alignment.
> 
> I just checked mdadm source, and it aligns nicely on all metadata
> formats when creating a new array.  It uses 1MB alignment when needed
> (formats 1.1 and 1.2).  So, I stand corrected (I previously claimed
> mdadm would screw up the alignment on formats 1.1 and 1.2).
> 
> lvm, well... it is actually pvcreate that is a problem.  I am not sure
> it autodetects anything, you probably have to give it the proper
> --dataalignment option, but at least now it has that easy-to-use option
> and you don't have to play games with metadatasize.
> 
> And nothing does anything sensible as far as alignment goes on GPT
> labels, last time I checked.

Ah, and mkfs.xfs and mke2fs will also align the filesystem properly to
_software_ RAID arrays (including stripe size, etc).  They could do so on
hardware raid too, but I doubt any of the hardware raid drivers export the
needed ioctls.  For SSDs, make sure you are using a stripe size that is a
multiple of the erase block size (it _can_ be the same size as the erase
block as well).

For hardware raid, you will need to align the filesystems manually (stripe
size and stride), but the partitions will be properly aligned as long as you
use a stripe size no bigger than 1MB in the RAID.  I don't think our
installer does something smart here, you may need to create the filesystems
manually if you want to optimize them for a hardware raid array.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


Reply to: