Partition alignment

Discussion in 'backup, imaging & disk mgmt' started by Mr.X, Mar 4, 2016.

  1. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    4,805
    Location:
    .
    Some questions:
    1. What is alignment of partitions?
    2. Why do I need it?
    3. Is it mandatory for any HDD / SSD?
    4. Any other point I should know?
     
  2. oliverjia

    oliverjia Registered Member

    Joined:
    Jul 21, 2005
    Posts:
    1,926
    Partition alignment is mainly for SSDs and AF drives.
    You need it because: 1. speed optimization, 2. optimal life span.
    For SSDs proper alignment is strongly recommended. Regular HDDs don't really care.
     
  3. Amanda

    Amanda Registered Member

    Joined:
    Aug 8, 2013
    Posts:
    2,115
    Location:
    Brasil
    I get very upset over unaligned partitions.

    https://superuser.com/questions/393914/what-is-partition-alignment-and-why-whould-i-need-it

    As @oliverjia pointed out, this can increase the lifespan of the HD, and speed too.

    That depends. I never had any problems with them, but as said in the link I provided, there can be problems if your partitions aren't aligned.
     
  4. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    4,805
    Location:
    .
    @oliverjia @amarildojr
    Thanks a lot for your responses!

    When I use Terabyte Unlimited IFL there's a tool called Partition Work (part of BIBM) but it doesn't have the option to align partitions. What do you think? Any recommendation?
     
  5. Amanda

    Amanda Registered Member

    Joined:
    Aug 8, 2013
    Posts:
    2,115
    Location:
    Brasil
    @Mister X Are your partitions actually not aligned?
     
  6. oliverjia

    oliverjia Registered Member

    Joined:
    Jul 21, 2005
    Posts:
    1,926
    Since Windows 8, if you install Windows from scratch (i.e., fresh install rather than upgrade), Windows should automatically align to 4k boundary on SSD. When you use any disk imaging software to backup/restore to the same disk using default options, it should still keep the good alignment.
    I don't use the partition work in BIBM that often, so could not really comment. However I think most likely you don't need to worry about it.
    Recent Linux distros should also have the ability to auto-align on correct partition boundaries.
     
  7. oliverjia

    oliverjia Registered Member

    Joined:
    Jul 21, 2005
    Posts:
    1,926
    Checking SSD Partition Alignment
    To check the alignment of your SSD's partition, it is quite simple.

    In windows 7, run msinfo32 by typing it into the search box on your start menu and hitting enter.

    click on: components => storage => disks

    Look for your SSD and check the partition starting offset.

    It needs to be divisible by 4096 (ie return a whole number when you divide by this) otherwise the alignment is not correct.

    Source: http://whirlpool.net.au/wiki/checking_ssd_alignment
     
  8. Amanda

    Amanda Registered Member

    Joined:
    Aug 8, 2013
    Posts:
    2,115
    Location:
    Brasil
    Correct.

    I have a 1 TB WD Green S-ATA disk, and creating the partitions with "diskpart" (on the DVD installer) correctly created the partitions on the sector boundary, just like recent Linux distros.

    The commands I used:

    diskpart
    list disk
    select disk 0
    create partition primary size=440627

    I remember old Linux OS's not creating the partitions the right way. But hey, 4K sectors didn't exist back in the day :p
     
  9. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    4,805
    Location:
    .
    They are already aligned in my main HDD main computer. I'm just asking whether Terabyte Unlimited partition program can actually align by default or not. Now that you both say modern programs can do it then I should not worry about that at all.

    Normally I use Minitool Partition Wizard which has alignment feature when formatting HDDs from my customers machines, but sometimes Minitool won't boot on some machines then I use that TU program which always seems to boot without issues.
     
  10. Amanda

    Amanda Registered Member

    Joined:
    Aug 8, 2013
    Posts:
    2,115
    Location:
    Brasil
    I'm not aware if Terabyte Unlimited can do that, sorry. As I never used these tools for my HD's when I use Windows, all I can personally recommend is the tools provided by the manufacturer of the HD in question. Either that, or GPARTED for Linux.
     
  11. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    4,805
    Location:
    .
    Thanks for additional infos. Fyi I always use a partitioning program before installing from scratch, on MBR disks.
    For GPT disks I let Windows do the job on a low-level formatted disk. Next I re-partition the disk as needed.
     
  12. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    4,805
    Location:
    .
    Ah yes, GParted. I think I'm going to start playing with it for a while and see how it goes. Thanks.
     
  13. Amanda

    Amanda Registered Member

    Joined:
    Aug 8, 2013
    Posts:
    2,115
    Location:
    Brasil
    I used to do that too, but it just takes too much time IMO. The only thing I do is erase the MBR with DD on Arch's ISO, but I don't create the partitions there anymore because sometimes the Windows installer will see a 0 MB free space before the first partition, which shouldn't happen.

    Right after selecting the language on Windows install, I open the CMD (Shift + F10) and do:

    diskpart
    list disk (it will show something like disk 0 931 GB, disk 1 111 GB, etc) [don't confuse with partitions. these are the actual hard drives]
    select disk 0
    create partition primary size=440627
    exit
    exit

    To correctly calculate the size of the partition, do: Size vs 1024. Example, if you want a 67 GB partition: 67 * 1024 = 68608

    This is a lot faster than, say, booting into a LiveCD of a Linux distro and creating the partitions with GParted. But then again, it's only a matter of preference and/or anxiety :p If you do mind waiting for the LiveCD to boot, just do with Windows, the results are exactly the same.
     
  14. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    4,805
    Location:
    .
  15. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    You would want to enable the "Align Partitions on 1MiB Boundaries" option. Note that correct alignment is usually detected automatically, but you can force it one way or the other if needed.
     
  16. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    4,805
    Location:
    .
    LOL
    Perhaps I'm going blind cause I've never seen that option. Going to check that tonight, thanks @MudCrab
    Edit: I'm talking about the Partition Work program included in IFL. Are you talking about the same program?
     
  17. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    In Partition Work it's named "Align on 1MiB Boundaries".
     
  18. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    4,805
    Location:
    .
    Okay thanks.
     
  19. n8chavez

    n8chavez Registered Member

    Joined:
    Jul 19, 2003
    Posts:
    3,347
    Location:
    Location Unknown
    I just noticed my ssd partition is not aligned properly, so I imaged and restored in IFL. I made sure that option was enabled, but my starting offset did not change @ 4,975,104. Curiouser and curiouser.....
     
  20. oliverjia

    oliverjia Registered Member

    Joined:
    Jul 21, 2005
    Posts:
    1,926
    Before restore, clean your SSD drive using Windows install disk. diskpart, clean.
     
  21. n8chavez

    n8chavez Registered Member

    Joined:
    Jul 19, 2003
    Posts:
    3,347
    Location:
    Location Unknown
    I just disk that; diskpart - list disk - select disk 1 - clean -create partition primary size=87040. Then I restored my image and the starting offset did not change, still @ 4,975,104.
     
  22. oliverjia

    oliverjia Registered Member

    Joined:
    Jul 21, 2005
    Posts:
    1,926
    After the clean command, don't create partition. Restore your image directly to the raw disk. If that still couldn't do it, then you might wan to use some SSD benchmark tool, such as AS SSD to check alignment.
    Also, right before restore, check the alignment option to make sure it's ticked at "1MB boundary".
     
  23. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,146
    Location:
    NSW, Australia
    Nate,

    Run TeraByte's Partinfo. Then do File, Export to Text File. Can you post the text file?

    Edit... Do you have 4 KB sectors on that drive?
     
    Last edited: Mar 5, 2016
  24. n8chavez

    n8chavez Registered Member

    Joined:
    Jul 19, 2003
    Posts:
    3,347
    Location:
    Location Unknown
    I've checked the alignment setting and it's selected but my starting offset did not change, still @ 4,975,104. AS SSD says it's bad too, even after a complete restore.
     
  25. n8chavez

    n8chavez Registered Member

    Joined:
    Jul 19, 2003
    Posts:
    3,347
    Location:
    Location Unknown
    I didn't see that option, but it might be because I don't have a license for BiBM. I was doing it from IFL, much faster restores than IFW btw, and it said I was limited because there was no license.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.