[Nottingham] SSD upgrade

Duncan notlug at pendinas.org.uk
Tue Feb 11 13:49:49 UTC 2014


On 2014-02-11 12:39, Jason Irwin wrote:
> On 11/02/14 12:31, Duncan wrote:
>> Assuming the list allows through attachments...
>> I've attached the perl script I use to work out partition alignments
>> and spit out the "parted" commands needed to create them.
>> I've added lots of comments to try and help but shout if they don't.
> It does, I shall give it a read. Thanks
>
>> For my 840 pro I started my partitions at 16MiB
> See, that's one thing I totally don't get; why do the partition have to
> start after the start of the disc?
> I've probably read it and simply not understood.
>
> I'm going to ask Samsung again - them not knowing how they put their own
> drive together is ridiculous.
>
>
You want the first partition offset because the partition table (PT) takes up space too.
The "apparent" start of the disk is actually the real start of disk + partition table size.

Without an offset you would get:

|<-Erasure Block 1-->|<-Erasure Block 2-->|<-.....->|<-Erasure Block N-->|<-Erasure Block M-->|
|<- PT ->|<------Partition 1 ---------------------------->|<-Partition 2 -------------------


16 MiB is a good starting point that aims to align disk blocks, erasure blocks and partitions
so you get best performance and wear and tear when you then overlay "data" on top of it, be that:
LVM logical extents;  raid chunk (multiples of 4KiB for md software RAID) or file system blocks
(1024, 2048 or 4096 byte for e[234]fs).

For a partition+filesystem you are aiming for something like:

|<-Erasure Block 1	-->|<-Erasure Block 2	-->|<--......	-->|<-Erasure Block N	-->|<-Erasure Block M	-->|
|<-- PT	-->|unallocated	-->|<------Partition 1 --					-->|<-Partition 2 --
	   |unused	-->|<------Filesystem 1 --					-->|<-Filesystem 2--


HTH

Have fun,
Duncan




More information about the Nottingham mailing list