# Quick advice on partitioning SSD for Gentoo

## Punchcutter

Hi... I'd just like to say that I'm not looking for detailed help, necessarily, but just want to test the water  :Smile: 

I've got an SSD (Samsung 850 EVO 250GB) that I want to swap into my old Thinkpad. I've been trying to read up on partitioning and so on - how to set up an SSD correctly - and a lot of the info on the web seems old-ish... still I'm taking it seriously. Trying to figure out how to partition properly on an erase block size boundary, etc.

I must say, it's really making my head hurt. I can't find what seems to be straightforward advice about how to proceed. Is there any such thing as straightfwd advice on this question? The drive is now close on 1 year old, because I've been too preoccupied with other things to install it. Do I even need to worry about such technicalities for an SSD bought in 2015? Does it matter whether I use fdisk or cfdisk or parted? Should I drive myself crazy to get the performance tuning just right when the machine is already old enough that the performance boost of just having an SSD will blow me away, and anyway I'll probably be replacing the drive before it gets worn out?

Any high level help on these questions is much appreciated, for the time being  :Smile: 

----------

## eccerr0r

If you have a newish fdisk (probably with the past 5-8 years or so), it will handle this automatically, just make sure you're using LBAs and partition on 1MiB boundaries (instead of C/H/S sector boundaries) which should be default.  Parted should handle this automatically as it uses MiB boundaries.  Even if you didn't do this, you probably wouldn't notice much of a difference anyway, it's those 4K sector mechanical HDDs that really hurt if you don't set it up just right.  What you want is to make sure the clusters on your filesystem do not straddle a write block boundary.  I don't think there's anything you really can do about erase boundaries anyway as over time you'll still have to do garbage collection.

Yes you'll likely waste some space between the first/boot block and the first partition, but it's less than 1MiB...

----------

## Ant P.

Alignment is easy, just round to 1MiB and it's almost guaranteed to be aligned. First partition starts at sector 2048, etc. In my experience getting GPT right is more hassle than getting alignment right...

It's worth doing it right, you only have to do it once after all.

----------

## Punchcutter

Thanks for the replies. Follow up:

What are LBAs?

I found this post that vaguely suggests to me that my erase (write?) block size might be 1.5MiB. Should I take that very seriously?

"Start first partition at sector 2048" sounds like the kind of concrete advice I'd like to get  :Smile:  but does that number depend on number of heads and/or sectors per track or something? I'm generally pretty good with numbers, but this stuff makes my head spin...

----------

## Punchcutter

 *Ant P. wrote:*   

> In my experience getting GPT right is more hassle than getting alignment right...

 

I don't know if I should read into this, but I'm setting this up as an MBR partition, not GPT. 

I tried GPT on another install on a different machine recently (HDD, not SSD), and could not get the thing to boot (find its root partition, if I recall). Gave up on GPT after getting advice on the forum. This is a different machine, but older than the aforementioned one.Last edited by Punchcutter on Sun Oct 30, 2016 5:01 am; edited 1 time in total

----------

## mjbjr

you may want to take a look at...

https://wiki.gentoo.org/wiki/SSD

http://chmatse.github.io/SSDcronTRIM/

https://sites.google.com/site/easylinuxtipsproject/ssd

----------

## Punchcutter

Finding some good info by continuing to search the Net, and even what looks like a very good post from this very forum. Will follow up with those links after I've had a chance to digest it and get my own job done. Thanks again.

----------

## eccerr0r

Most hard drives use Linear Block Addresses (LBA) which each block on the disk can be referred to a single number instead of a cylinder, head, sector (CHS).  CHS has not really made sense for many years now but kept for legacy purposes.  LBA ignores the real geometry of the disk and just gives each block a number and by definition the 2048th block of 512 byte blocks is 1MiB, and 1MiB is a multiple of most write and erase block sizes of SSDs and definitely a multiple of 4096 bytes for "advanced format" HDDs, thus making things aligned.  As long as you stay on multiples of 1MiB you'll keep alignment.

----------

