Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just installed ubuntu on my new intel SSD. Now I am not sure, whether paritions are properly aligned in respect to my specific SSD.

Here's my fdisk output.

$ fdisk -l

    Platte /dev/sda: 120.0 GByte, 120034123776 Byte
255 Köpfe, 63 Sektoren/Spur, 14593 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a6294

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sda1   *           1        1913    15360000   83  Linux
/dev/sda2            1913       14058    97558528   83  Linux
/dev/sda3           14058       14594     4300800   82  Linux Swap / Solaris

Also, do I still need to align my SSD at all, since I am using TRIM on the ext4 partitions by mounting them with the discard flag.

If it is the case, that my partitions are not properly aligned, what could I do to fix this without having to reinstall everything?

share|improve this question
    
What do you mean by "properly aligned"? –  Flimzy Jun 25 '11 at 8:03
3  
As much as I know, SSDs need to be aligned to provide maximum io. Here's an article on the topic. I am still not sure, how I set up alignment for my specific SSD. –  elementz Jun 25 '11 at 10:15
2  
Nope, none of those partitions are aligned. It's suggested (citation needed, but GParted does it that way and so does Windows 7) that the start blocks of your partitions (Anfang) are at a sector evenly dividable by 2048 (= 2048 sectors à 512 byte = 1 MiB). – htorqu –  htorque Sep 15 '11 at 9:26
    
@htorque AFAICT from an article about this, it depends on the segment size, which could be 8 MB or even larger. With a modern disk it would probably be easiest to align it to e.g. 32 MB, to fit with most common segment sizes. –  l0b0 Jan 11 '13 at 15:47
add comment

2 Answers

up vote 4 down vote accepted

Ensuring SSD alignment with parted tool looks like a pretty good guide for aligning your filesystem on the SSD:

  1. Get the block size of your SSD in bytes (there are heaps of tips, and I don't know which ones will work for which hardware).
  2. Start the partition editor:

    sudo parted
    
  3. Show the partition table:

    p
    
  4. Verify that the numbers in the Start and Size columns are divisible by the block size.
share|improve this answer
add comment

Parted has a align-check build in if iḿ not mistaken.

parted /dev/sda
align-check opt

something like that.

share|improve this answer
1  
Worked for me! +1 –  Grizly Apr 10 '13 at 1:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.