You are not logged in.

#1 2011-11-09 22:50:13

jlacroix
Member
Registered: 2009-08-16
Posts: 576

[SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

I purchased a Crucial M4 (256GB) and I put a lot of work into this install, it's set up really nice. But I came across the Arch Wiki and SSD alignment. I don't really understand what the article says, but I did add the noatime and discard flags as it suggested. What I don't understand in particular is if I have to wipe and reinstall Arch in order to use gdisk to align my partitions. I'd rather not reinstall if I don't have to.

Last edited by jlacroix (2011-11-11 18:11:25)

Offline

#2 2011-11-09 23:12:06

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

You installed and are running on the ssd now, right?  I'm assuming you have an MBR setup?  Post the output of:

# fdisk -l /dev/sdX # where X is your ssd

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2011-11-09 23:22:59

jlacroix
Member
Registered: 2009-08-16
Posts: 576

Re: [SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

graysky wrote:

You installed and are running on the ssd now, right?  I'm assuming you have an MBR setup?  Post the output of:

# fdisk -l /dev/sdX # where X is your ssd
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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      208844      104391   83  Linux
/dev/sda2          208845    21189734    10490445   82  Linux swap / Solaris
/dev/sda3        21189735    63135449    20972857+  83  Linux
/dev/sda4        63135450   500103449   218484000   83  Linux

Offline

#4 2011-11-10 00:17:44

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

Oops.. add the -u switch


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2011-11-10 00:20:46

jlacroix
Member
Registered: 2009-08-16
Posts: 576

Re: [SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

graysky wrote:

Oops.. add the -u switch

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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      208844      104391   83  Linux
/dev/sda2          208845    21189734    10490445   82  Linux swap / Solaris
/dev/sda3        21189735    63135449    20972857+  83  Linux
/dev/sda4        63135450   500103449   218484000   83  Linux

Offline

#6 2011-11-10 17:44:57

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: [SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

In any case, no, you don't need to reinstall. Worst case, you boot on a live USB and use gparted to move your partitions, but gparted aligns to 1MiB already so I don't think it's necessary...

Edit: except you probably didn't use gparted in the first place if you partitionned using the Arch installer, and I don't know what the installer uses and if it aligns correctly or not.

Last edited by stqn (2011-11-10 19:27:07)

Offline

#7 2011-11-10 17:59:59

jlacroix
Member
Registered: 2009-08-16
Posts: 576

Re: [SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

If I move the first partition to 1mb what do I move the others to? Also I've heard it should be 2mb but not sure which to believe.

Offline

#8 2011-11-10 21:23:52

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

@op - sorry, I've been using GPT formatted stuff for too long.  I thought the -l -u gave the output in a form that allows you to see physical alignment.  If you're in doubt, just back up your entire device somewhere else, nuke all partitions, partition with gdisk to GPT and you'll be aligned.  The wiki has a guide to do this as I recall in the SSD article.  Once repartitioned, moving the current install back should be no problem.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2011-11-10 22:00:04

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: [SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

jlacroix wrote:

If I move the first partition to 1mb what do I move the others to? Also I've heard it should be 2mb but not sure which to believe.

You move them to a multiple of 1MiB. I think 1MiB should be enough but you should check the block size for your SSD.

Besides, I have no idea if the partitions should start at a multiple of 1MiB or not, because it supposedly depends on your filesystem and if you're using lvm/dm-crypt or not... stuff like that. I think that the wiki knows more than me on the subject smile. Personally I didn't bother and just went with this 1MiB alignment. It was one year ago and my SSD isn't dead yet.

Offline

#10 2011-11-11 08:53:00

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

Don't forget the trouble with misalignment is write amplification thus less useful life _and_ the possibility of slower write speeds.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#11 2011-11-11 12:35:06

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: [SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

Hm, I've just been to the SSD page on the wiki and it takes 2 pages to explain how to use fdisk to align on 128 KiB or 512 KiB blocks, and there's absolutely no talk about taking into account the filesystem or LVM... So I guess using gparted, which aligns to 1 MiB by default is enough (and much more simple that fdisk.)

Offline

#12 2011-11-11 18:11:43

jlacroix
Member
Registered: 2009-08-16
Posts: 576

Re: [SOLVED] Question About SSD Alignment (Do I Have to Reinstall?)

Thank you everyone. I will play around with GParted until I get it right.

Offline

Board footer

Powered by FluxBB