On Mon, 16 Dec 2013 08:13:16 -0600, Stan Hoeppner wrote:
> 
> Cool.  Make sure you partition the SSD so that your first, and all,
> partitions start on a 4KB boundary.  Many guides are available for your
> favorite partitioning tool.  Linux does all IO in 4KB pages including
> filesystem and swap.  If you don't align to 4KB you may get excessive
> erase cycles on the SSD, lowering performance, and cell life.  Most
> folks seem to start the first SSD partition at sector 2048, which falls
> immediately after the first 1MB of the device.  1,048,576/4,096=256.  So
> your first partition will start at 4KB "page 257", if you will.  If you
> create multiple partitions, make sure the size of each is evenly
> divisible by 4096 bytes, or they won't be aligned.

That's good to know.  But I really don't have much control over this
when I partition using the Debian installer.  When installing from
scratch on a system where I don't intend to keep anything from its
previous life, I delete all existing partitions using the Debian installer,
then create new partitions using the Debian installer.  When I create
a new partition with the Debian installer, I generally specify the size
(typically in megabytes), the partition type (primary or logical), and,
if the size is less than the amount of free space, whether I want it at
the beginning of the free space or the end of the free space.  Rounding
of sizes, boundary alignment, etc. is all controlled by the Debian installer
or the partitioning tools it uses (parted, generally).  And I have no
control over that.

As an example, my existing disk partitions, created by the Debian installer,
look like this:

# parted /dev/i2o/hda unit s print free
Model: I2O Controller (i2o)
Disk /dev/i2o/hda: 286748672s
Sector size (logical/physical): 512B/512B
Partition table: msdos

Number  Start       End         Size        Type      File system     Flags
        63s         2047s       1985s                 Free Space
 1      2048s       194559s     192512s     primary   ext3            boot
        194560s     196605s     2046s                 Free Space
 2      196606s     162306302s  162109697s  extended
 5      196608s     17772543s   17575936s   logical   linux-swap(v1)
 6      17774592s   56834047s   39059456s   logical   ext3
 7      56836096s   64647167s   7811072s    logical   ext3
 8      64647231s   162306302s  97659072s   logical   ext3
        162306303s  286748671s  124442369s            Free Space

#

As you can see, something, somewhere, has done a number on me.  The only
boundary requirement is that the starting sector be a multiple of 8 to make
4096-byte boundaries.  So why start the first partition at sector number
2048?  The only intentional free space is the free space at the end of the
disk.  The other free space entries were added by the partitioning program.
And for what purpose?  This is not a GPT disk, so no BIOS boot partition
needs to be created for GRUB.  (I'm not even using GRUB, I'm using LILO.
But the Debian installer would not have known what boot loader I planned
to use during the disk partitioning phase.  It would, however, have known
that this is an MBR disk, not a GPT disk.)  Furthermore, this is not a
UEFI-based system, so no EFI System partition (ESP) needs to be created
either.  So why did the Debian installer leave these two free spaces before
and after my first partition?  (Apparently, sectors 0-62 are considered part
of "meta data" and are therefore not included in the leading free space.)

Also, as you can see, the start of the next partition is not just one sector
number higher than the end of the previous partition.  In the case of adjacent
logical partitions inside the extended partition, I realize that it must
leave room for an Extended Boot Record before each logical partition, but it
leaves way more room than that would require.  Can you (or anyone) explain
why this wasted space has been built in?

-- 
  .''`.     Stephen Powell    
 : :'  :
 `. `'`
   `-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/1588134292.17319.1387253555768.javamail.r...@md01.wow.synacor.com

Reply via email to