1

Topic: [closed] RAID Alignment & Partition Starting Offset

These days, I'm using more and more SAN based storage.   The shared environments for disk storage make it a bit more concerning that all the RAID configurations are set to the most ideal settings for performance.     I did not worry about this as much with the local RAID storage.

The trend toward virtualization has made this even more relevant....   all of which brings me to the point & feature request:

When a partition is resized with GParted, the partition starting offset is adjusted from the previous configuration!   If one has gone through the effort to align the partition with RAID, the use of GParted will remove the adjusted partition starting offset. The result is that the effort to align the partition with the RAID is destroyed, and the partition is put back to the default (unwanted) setting.

For a short guide on setting disk alignment, partition offset from network appliance, and VMware ESX product, have a look here:   http://media.netapp.com/documents/tr_3593.pdf

Feature Request #1:  GParted should look at partition starting offset and not change it.
Feature Request #2:  GParted should allow modification of partition starting offset.


Even with this issue, GParted is a fantastic utility!
Thank you,
wilson northrup

2 (edited by wilson94t 2008-06-11 07:32:04)

Re: [closed] RAID Alignment & Partition Starting Offset

No response, so I'll ask another question.   Any chance that this should be reported to the BUGS area and not just posted as a  feature request?

When using  gparted, the partition is _incorrectly_ adjusted_ because the starting offset value is not retained.   This appears to be the case for both NTFS and ext3.  I have not tried other file system formats.

3

Re: [closed] RAID Alignment & Partition Starting Offset

Some additional information on disk crossings & performance:

Search for "disk crossing" in the following two documents.   Disk crossing is a performance limiting condition which occurs when two disks are utilized for a read or write, when only one should be accessed.   This is a potential problem for any striped disk enviornment.   Generally I use a hardware RAID5 stripe.

http://www.virtual.com/whitepapers/EMC_ … ces_FC.pdf
http://www.dell.com/downloads/global/po … -Mehis.pdf

4

Re: [closed] RAID Alignment & Partition Starting Offset

You were indeed correct about GParted not always preserving the starting partition offset.

This problem was tracked as a bug under the title "Resizing first partition becomes a move too"
http://bugzilla.gnome.org/show_bug.cgi?id=432525

GParted version 0.3.8 includes fixes for the incorrect "round to cylinder" math.  Also included is the ability to turn off "round to cylinders" for create, move, and resize operations.

5

Re: [closed] RAID Alignment & Partition Starting Offset

"A RAID distributes data across several physical disks which look to the operating system and the user like a single disk. Several different arrangements are possible. We assume here that all the disks are of the same capacity, as is usual.
RAID 0 (striped disks) distributes data across several disks in a way which gives improved speed and full capacity, but all data on all disks will be lost if any one disk fails.

RAID 1 (mirrored disks) uses two (possibly more) disks which each store the same data, so that data is not lost as long as one disk survives. Total capacity of the array is just the capacity of a single disk. The failure of one drive, in the event of a hardware or software malfunction, does not increase the chance of a failure nor decrease the reliability of the remaining drives (second, third, etc).

RAID 5 (striped disks with parity) combines three or more disks in a way that protects data against loss of any one disk; the storage capacity of the array is reduced by one disk. The less common RAID 6 can recover from the loss of two disks."

6

Re: [closed] RAID Alignment & Partition Starting Offset

Hi There,

For what it's worth i'm trying to use the Gpartd live-cd to move a windows box from a RAID-5 volume on one set of disks to a RAID-10 volume on another set of disks.

Everything seems to work fine...both RAID crads are detected, all the volumes show up and everything seems to be fine. Last night I tried to actually move the C: drive (on it's own 25Gb primary partition) to the new array. I copied the C: partition, pasted it into the new array and applied the changes. Unfortunately I noticed in the progress dialog box that the sector offset was still listed as 63.

I sure would love an option added in that would allow me to adjust the starting sector offset of a moved partition so I can properly align my partitions on my disk.

-Will

7

Re: [closed] RAID Alignment & Partition Starting Offset

There has been much discussion lately regarding partition alignment, and Vista's choice of using a 1 MB partition alignment.  If you are curious, you can read the email thread at:
SSD partition alignment

8

Re: [closed] RAID Alignment & Partition Starting Offset

the 1MB that vista is OK to use.  The things that I would really like to have is the ability to specify an offset when creating a partition, but most importantly, do not change an existing partition starting offset when I've not made such a request.   

Thanks for the links.

9

Re: [closed] RAID Alignment & Partition Starting Offset

Survive:
while you are not yet able to change the starting offset, you can use diskpart to set the offset, and then use whatever linux live CD to dd the existing partition.   

BTW, I should mention that a recent version of GpartED that i used broke the "copy partition" GUI command, which let one copy one partition to another. Not sure if this is fixed with the latest release, but my windows users are somehow unable to use dd.  They've reverted to a previous GpartED, which then broke the starting offset that i setup in several places.  oops.  they did not realize what they had done.  Gotta go back and fix that now.

10

Re: [closed] RAID Alignment & Partition Starting Offset

wilson94t:
The feature of being able to copy and then paste a partition into an existing partition was disabled in GParted v0.4.0.

See the following posts for the discussion:
After copy of XP Partition (NTFS) to external HD(FAT32)
Bug when copying partitions?


Regarding your question about maintaining the partition start when a move has not been requested:
See Bug 571151 – gparted moves partition to the left even if unneeded.
This bug fix has been committed to the Gnome SVN repository for inclusion in the next release of GParted (0.4.4)

11

Re: [closed] RAID Alignment & Partition Starting Offset

gedakc wrote:

The feature of being able to copy and then paste a partition into an existing partition was disabled in GParted v0.4.0.

See the following posts for the discussion:

OK.  I read it though, I somewhat agree.   I'll start another thread after working with this a bit if I wish further discussion.

gedakc wrote:

Regarding your question about maintaining the partition start when a move has not been requested:
...
This bug fix has been committed to the Gnome SVN repository for inclusion in the next release of GParted (0.4.4)

I tried GParted 0.4.5, and this bug fix appears to have been included! Many thanks!  This is very useful!

12

Re: [closed] RAID Alignment & Partition Starting Offset

gedakc wrote:

The feature of being able to copy and then paste a partition into an existing partition was disabled in GParted v0.4.0.

Today I realize why this is a problem.  If I need to adjust disk offset for a current partition, this is not something I can do easily.  It usually requires picking up of a partition and pasting it into another location.   

This means if I can not paste into a new partition for which I have built the offset i require, then I can not copy the partition the way i need to (which is to a target with a different offset).

Perhaps I can do this another way, maybe make use of dd?  It was just very convenient that I would be able to provide a GUI to the team so they can do this easily.

Any good suggestion on how I can take a partition, copy it to a new location, with a new offset value with GParted or can you suggest another method?

13

Re: [closed] RAID Alignment & Partition Starting Offset

wilson94t wrote:

Today I realize why this is a problem.  If I need to adjust disk offset for a current partition, this is not something I can do easily.  It usually requires picking up of a partition and pasting it into another location.   

This means if I can not paste into a new partition for which I have built the offset i require, then I can not copy the partition the way i need to (which is to a target with a different offset).

You make a valid argument for allowing pasting into an existing partition.  The danger of course is for people that do this accidentally and overwrite the data in the previous partition.

Perhaps a better solution might be for GParted to warn when pasting into an existing partition, but still allow the paste operation to be performed?

wilson94t wrote:

Any good suggestion on how I can take a partition, copy it to a new location, with a new offset value with GParted or can you suggest another method?

The code change that prevents pasting into an existing partition can be viewed
in the git repository at:
Prevent a copied partition from being pasted into an existing partition

You could compile a modified version of GParted that enables you to paste into an existing partition.

14

Re: [closed] RAID Alignment & Partition Starting Offset

Hi all,
I'm posting in this topic because I have similar problem.
I have RAID and Win 2003.
Some years ago I've partitioned this drive from Win2k3 as GPT disk and one primary NTFS partition 2TB size.
Now I've know about RAID drives alignment and see that my partition is not correctly aligned (for RAID):

DISKPART> list disk

  Disk ###  Status      Size     Free     Dyn  Gpt
  --------  ----------  -------  -------  ---  ---
  Disk 0    Online        58 GB  8033 KB
  Disk 1    Online      2084 GB   479 KB        *
  Disk 2    Online        93 GB      0 B

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Reserved           128 MB    17 KB
  Partition 2    Primary           2084 GB   128 MB

I mean Disk 2, Partition 2. Looks like it has 128MB offset, but it is rounded.
Exactly value is:

>wmic partition get BlockSize, StartingOffset, Name, Index
BlockSize  Index  Name                   StartingOffset
512        0      Disk #0, Partition #0  32256
512        0      Disk #1, Partition #0  134235136
512        0      Disk #2, Partition #0  1048576
512        1      Disk #2, Partition #1  99953602560

Offset is 134235136 bytes. 134235136/1024/1024=128,0166015625 MiB
So I want to move this partition to nearest 1MiB boundary (at least 64KiB).
And I didn't found program that can do this.
GParted is closer then other to ideal - great tool!

I've done some tests in virtualPC.
GParted can see and resize/move my partitions, fine.
But user can specify sizes only in MiBs.
So I cannot specify correct "Free space preceding" value(1031168 B) for my second partition to make it aligned to next 1MiB boundary. sad

Feature requests:

1. So, if Gparted will be able to get values not only in MiB but in Bytes too it would be perfect!
2. Or it may have another option (like "Round to cylinders") - "Round to 1 MiB"

Or it may have both features wink

Really usefull things, I think...

15

Re: [closed] RAID Alignment & Partition Starting Offset

I have been thinking about how to implement a "Round to 1 MB" feature in GParted.

From some internet searching, it appears that newer Windows operating systems will reserve 1 MB at the start of the disk for the Master Boot Record.  Previously 63 sectors (one track) was reserved.  In the case of an logical partition under a MSDOS disk label (partition table), 1 MB would also be reserved for the Extended Boot Record.

In terms of user interface, my initial thoughts are to change the "Round to cylinders" checkbox to a drop down menu that permits "Round to cylinders" and "Round to 1 MB".

Your thoughts?

16 (edited by Davis 2009-08-14 09:18:21)

Re: [closed] RAID Alignment & Partition Starting Offset

gedakc wrote:

change the "Round to cylinders" checkbox to a drop down menu that permits "Round to cylinders" and "Round to 1 MB".

Excellent!
P.S. But MiB, not MB wink
P.P.S. And I'm talking not only about first  partition - I want to be able to align start of any partition to 1 MiB.

17 (edited by sunbear 2010-01-06 21:54:38)

Re: [closed] RAID Alignment & Partition Starting Offset

Davis wrote:
gedakc wrote:

change the "Round to cylinders" checkbox to a drop down menu that permits "Round to cylinders" and "Round to 1 MB".

Excellent!
P.S. But MiB, not MB wink
P.P.S. And I'm talking not only about first  partition - I want to be able to align start of any partition to 1 MiB.

Yes, this feature is very much needed given the popularity of SSDs in particular. Misalignment of partitions can hurt the performance of RAID:
http://www.tuxyturvy.com/blog/index.php … -Data.html
and SSD:
http://www.ocztechnologyforum.com/forum … tcount=161
http://www.ocztechnologyforum.com/forum … hp?t=48309

18

Re: [closed] RAID Alignment & Partition Starting Offset

Currently you can place partitions on a megabyte boundary by de-selecting the "Round to cylinders" checkbox.

Please note that you must then leave 1 MB of free space at the front of the drive for the Master Boot Record.  You must also leave 1 MB of free space in front of each logical partition for the Extended Boot Record.

19 (edited by Davis 2010-03-29 12:00:16)

Re: [closed] RAID Alignment & Partition Starting Offset

Looks like it behaves so:
1. If "Round to cylinders" selected - start position rounded to cylinders. Ok
2. If deselected - it does not rounded at all.
Thus if I have two unalighned partitions then I cannot move second so it will aligned to 1 MiB sad
So: "you can place partitions on a megabyte boundary by de-selecting the "Round to cylinders" checkbox"
does not work

20

Re: [closed] RAID Alignment & Partition Starting Offset

Davis wrote:

Looks like it behaves so:
1. If "Round to cylinders" selected - start position rounded to cylinders. Ok
2. If deselected - it does not rounded at all.
Thus if I have two unalighned partitions then I cannot move second so it will aligned to 1 MiB sad
So: "you can place partitions on a megabyte boundary by de-selecting the "Round to cylinders" checkbox"
does not work

That is correct.  When "Round to cylinders" is de-selected, it will simply place the next partition at an even multiple of 1 MiB from the end position of the previous partition.  If the previous partition ends 1 sector less than a MiB boundary, then the next partition will start on a MiB boundary.

21

Re: [closed] RAID Alignment & Partition Starting Offset

gedakc,
Is it possible to allow user to specify positions and sizes not only in MiBs, but in bytes too? This can solve many problems.
May be there is internal reason preventing to make this?

Or, at least, is it possible to replace checkbox by dropdown box with "round to cylinders" and "round to MiBs" choises and round every offset with this values?

22

Re: [closed] RAID Alignment & Partition Starting Offset

At the moment I am working to add support for devices with sector sizes greater than 512 bytes.  This is a significant change to the code base since GParted is hard coded to expect 512 byte sectors.  This change will take me some time.

After that I have on my todo list to add "Round to MiBs" as an alignment option.

23

Re: [closed] RAID Alignment & Partition Starting Offset

A new option to "Align to MiB" has been added to the git repository for GParted.

We are seeking help to test this new option and have created the following forum post:
Need Help Testing "Align to MiB", and sector sizes > 512 bytes

Any help with testing would be greatly appreciated.

24

Re: [closed] RAID Alignment & Partition Starting Offset

Is it possible to download Live version of it?

25

Re: [closed] RAID Alignment & Partition Starting Offset

Davis wrote:

Is it possible to download Live version of it?

Not yet.