[Solved] Checking SSD alignment under LM 13

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
cloggyjohn
Level 1
Level 1
Posts: 20
Joined: Fri Jul 01, 2011 5:22 am

[Solved] Checking SSD alignment under LM 13

Postby cloggyjohn » Wed Sep 26, 2012 2:24 pm

I gather the installer should correctly align the SSD but how can I check it ? I´ve looked through various posts but I´m none the wiser I´m afraid.
Any help appreciated.
Last edited by cloggyjohn on Thu Sep 27, 2012 3:20 pm, edited 1 time in total.

User avatar
xenopeek
Level 24
Level 24
Posts: 21462
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Checking SSD alignment under LM 13

Postby xenopeek » Wed Sep 26, 2012 3:11 pm

Indeed, the installer aligns to 1 MiB boundary by default.

You can check by running the following command from the terminal:

Code: Select all

sudo fdisk -l

After giving your password to run the command as root, you get an output similar to:

Code: Select all

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e1ed0

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   156301311    78149632   83  Linux

Note the line that tells the sector size (512 bytes in my case), and the line for my partition /dev/sda1 where it says what the start sectors is (2048 in my case). The sector size multiplied with the start sector gives the start byte (512 * 2048 = 1048576). You want a partition boundary that is a whole multiple of 1048576 (which is 1 MiB).
Image

cloggyjohn
Level 1
Level 1
Posts: 20
Joined: Fri Jul 01, 2011 5:22 am

Re: Checking SSD alignment under LM 13

Postby cloggyjohn » Thu Sep 27, 2012 12:51 pm

Hi Vincent,

This is the output of the fdisk command:

Disk /dev/sda: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008ace1

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 63141887 31467520 7 HPFS/NTFS/exFAT
/dev/sda3 63141888 479145983 208002048 7 HPFS/NTFS/exFAT
/dev/sda4 479148030 500117503 10484737 5 Extended
/dev/sda5 496451584 500117503 1832960 82 Linux swap / Solaris
/dev/sda6 479148032 496451583 8651776 83 Linux

Partition table entries are not in disk order

As you can see partition sda1 ( the Windows 7 boot partition ) starts at sector 2048 which, with a sector size of 512 bytes ( as in your case ), means it's aligned correctly. Partition sda6 however doesn't appear to aligned, assuming I'm doing the calculations correctly. Could you be so kind as to check this for me. Thanks a lot.

User avatar
xenopeek
Level 24
Level 24
Posts: 21462
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Checking SSD alignment under LM 13

Postby xenopeek » Thu Sep 27, 2012 1:12 pm

Sure.

Start sector * 512 / 1024^2 = 233959, a whole number. Meaning it is aligned to 1 MiB boundary. (End sector + 1) * 512 / 1024^2 = 242408, again a whole number as you want.

So all is fine; /dev/sda6 is perfectly aligned to 1 MiB boundaries.
Image

cloggyjohn
Level 1
Level 1
Posts: 20
Joined: Fri Jul 01, 2011 5:22 am

[Solved] Re: Checking SSD alignment under LM 13

Postby cloggyjohn » Thu Sep 27, 2012 2:25 pm

Thanks Vincent, that's cleared it up, I was obviously getting the calculations wrong.


Return to “Newbie Questions”