+ Reply to Thread
Results 1 to 8 of 8

Thread: Partition alignment under Linux

  1. #1
    OCZ User Flag of United States
    Join Date
    Feb 2009
    Posts
    12
    Mobo: MacBook Pro 13" Mid-2009
    CPU: 2.53 C2D
    RAM: 4GB DDR3-1066
    Vid: GeForce 9400M
    HDD: OCZ Vertex 60GB Firmware 1.30
    OS: OS X 1.5.7

    Default Partition alignment under Linux

    Does anyone know a guide to do partition alignment in Linux? I assume regular partitions are aligned correctly if you use plain partitions with fdisk. However, what about LVM or encrypted partitions?

  2. #2
    Disappointed Flag of Norway
    Join Date
    Dec 2008
    Posts
    229
    Mobo: ASUS M3A78-T
    BIOS: 0802
    CPU: AMD Phenom II X4 940BE
    RAM: OCZ DDR2 PC8500 4096MB KIT, Reaper HPC
    Vid: ASUS nVidia 9600GSO 512MB PCI-E 2xDVI
    PSU: OCZ GameXStream 700W
    HDD: 30GB Vertex 1199, dead 120GB Vertex 1199, 120GB Apex, 1TB SAMSUNG 7200RPM - HD103UJ
    OS: Kubuntu 0804

    Default

    Quote Originally Posted by soleblaze View Post
    Does anyone know a guide to do partition alignment in Linux? I assume regular partitions are aligned correctly if you use plain partitions with fdisk. However, what about LVM or encrypted partitions?
    Use plain ol' fdisk. 'x' command to get "advanced", and 'u' to change units to cylinders instead of sectors. It will complain about misalignments, but it doesn't seems to have any bad effect that I have seen so far.

  3. #3
    n3Rd AngryHerring's Avatar Flag of Norway
    Join Date
    Jul 2008
    Location
    Norway
    Posts
    39
    Mobo: EVGA X58 SLI LE (ICH10R)
    CPU: Intel i7 CPU 920 @ 2,67GHz
    RAM: 2x OCZ PC3-12800 Obsidian 6GB Triple Channel Kit
    Vid: XFX GTX 285 (690M 1GB Black Edition)
    PSU: HX850W
    HDD: 4x VTX30GB (Raid0 on x58 ICH10R)
    OS: Win7 Ultimate x64 (retail)

    Default

    Look at Pigeon's guide at page 9 "Partition alignment importance under Windows XP (32-bit and 64-bit)..why it cures stuttering and increases drive working life"

    direct link: http://www.ocztechnologyforum.com/fo...&postcount=134

  4. #4
    OCZ User Flag of United States
    Join Date
    Feb 2009
    Posts
    12
    Mobo: MacBook Pro 13" Mid-2009
    CPU: 2.53 C2D
    RAM: 4GB DDR3-1066
    Vid: GeForce 9400M
    HDD: OCZ Vertex 60GB Firmware 1.30
    OS: OS X 1.5.7

    Default

    Thanks for the replies. Looks like I'm going to reinstall my laptop later today. I don't think I'll use LVM this time around, as I don't care that much about hibernation (LVM makes it a lot easier to use hibernation on an encrypted setup)

  5. #5

    Default Actually, I just wrote a blog posting about it here....

    Quote Originally Posted by soleblaze View Post
    Does anyone know a guide to do partition alignment in Linux? I assume regular partitions are aligned correctly if you use plain partitions with fdisk. However, what about LVM or encrypted partitions?
    You may find this useful. http://thunk.org/tytso/blog/2009/02/...se-block-size/

  6. #6
    OCZ User Flag of United States
    Join Date
    Feb 2009
    Posts
    12
    Mobo: MacBook Pro 13" Mid-2009
    CPU: 2.53 C2D
    RAM: 4GB DDR3-1066
    Vid: GeForce 9400M
    HDD: OCZ Vertex 60GB Firmware 1.30
    OS: OS X 1.5.7

    Default

    Ok, dredging this up again since I just ordered a Vertex 60gb. I'm going to follow the guide posted, however I'm also looking at setting up LUKS encryption for the LVM. cryptsetup has an –align-payload option, but I'm unsure what to use for it. Has anyone read or done anything with this before? If not, I'll research it a bit later this week, so I can find out the best way to go about setting up this drive

  7. #7
    OCZ User Flag of United States
    Join Date
    Mar 2009
    Posts
    52
    Mobo: Dell Inspiron 1720
    HDD: Vertex 30GB
    OS: Vista

    Default

    I used my first SSD in a windows laptop, so I used the advice given in sticky's here for aligning the partition with the windows partition editor.

    I'm about to put an SSD into my linux box, and I am planning to use fdisk -H 128 -S 32 , so 128 heads and 32 sectors per track. I like powers of 2. Note that the sector size will be 512 bytes. That gives me a pretty looking 2048KB (128*32*512 bytes) cylinder size, which will be aligned for just about any reasonable SSD page or erase block size. Except for the first partition. Since fdisk by default reserves the first track of the disk, my first partition will be offset by 16KB (32*512 bytes). I am just going to make the 1st partition as small as possible (2032KB will end it on the first cylinder boundary) and never use the first partition (I could go into expert mode to override the reserved first track, but I don't want to bother with the added complication). Then my second partition, and all the others, will be nicely aligned to 2048KB (and 1024KB, 512KB, etc.) boundaries.

  8. #8
    Integrator Flag of Canada
    Join Date
    Apr 2009
    Location
    Fairview
    Posts
    25
    Mobo: ASUS M2A-VM (SB600)
    CPU: Athlon X2 4050e
    RAM: 4GB Kston ECC
    Vid: GByte 8600GT silent
    PSU: Seasonic S12II 330
    HDD: OCZ Vertex 30GB
    OS: Ubuntu 9.10 x86_64

    Default

    http://thunk.org/tytso/blog/2009/02/...se-block-size/

    Ted Ts'o is the lead Ext4 developer. I'll be taking his advice when partitioning my Vertex this week. Although he recommends formatting with a stripe width of 32 if your SSD has an erase block size of 128k. Indications from elsewhere on this forum (search Octoploid's posts) and anandtech.com suggest that most drives including the Vertex use a block size of 512k, making a stripe width of 128 more appropriate apparently.

    Ted recommends an initial partition offset of 128k, which has been suggested elsewhere in the forum, but I wonder with a 512k erase block size if a 512k partition alignment wouldn't be more appropriate.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts