Changing Partition Format


DoeBoye

Recommended Posts

So I'm in the process of swapping my drives over to XFS from Reiserfs, and I can't seem to figure out how to change the partition format. In my global settings I have it set to use 4k-aligned, but when I formatted them (through the GUI) as XFS, one of them show mbr: unaligned. I've tried to change it, but it doesn't ever give me the option.

 

So, 1. How do I change the partition format, and 2. Why is it not listening to my global setting?

 

Any ideas?

 

Thanks,

 

DB

 

NOTE: In case you don`t see it in my sig, this is on 6.1.3

Link to comment

The global setting is for new disks.  For existing disks I've been doing mine one at a time.  First, clear your data off the disk!

 

Stop the array and then go to Tower/Main and click on Disk 1 (or whatever) - the term Disk 1 in the first column of the UI is hyperlinked and clickable.  You can then change the format of a disk on the settings page.  Restart the array and the disk will show as unmounted, but the UI will also show that you have unformatted disks.  Click Format and the disk will be formatted to the format you specified on the Disk Settings page.

Link to comment

The global setting is for new disks.  For existing disks I've been doing mine one at a time.  First, clear your data off the disk!

 

Stop the array and then go to Tower/Main and click on Disk 1 (or whatever) - the term Disk 1 in the first column of the UI is hyperlinked and clickable.  You can then change the format of a disk on the settings page.  Restart the array and the disk will show as unmounted, but the UI will also show that you have unformatted disks.  Click Format and the disk will be formatted to the format you specified on the Disk Settings page.

 

That's how I assumed it would work, but I am only able to change the file system type, not the partition format. Are you saying you are able to change the partition format (from unaligned to 4k aligned)  as well as the fs type (reiserfs to xfs)?

 

Thanks!

Link to comment

Disk alignment is done during clearing. If unRaid does the clearing it will follow the preferences you have set. If you you use preclear_disk then you need to use the -A flag.

 

From the -h help file of preclear_disk.

 

On unRAID 4.7 and subsequent, the -a or -A default is set based on the value

            set on the Settings page in the unRAID web-management console.

            Both of these (-a and -A) are completely ignored on disks > 2.2TB as they

            use a GPT partition that will always start on a 4k boundary.

Link to comment

Disk alignment is done during clearing. If unRaid does the clearing it will follow the preferences you have set. If you you use preclear_disk then you need to use the -A flag.

 

From the -h help file of preclear_disk.

 

On unRAID 4.7 and subsequent, the -a or -A default is set based on the value

            set on the Settings page in the unRAID web-management console.

            Both of these (-a and -A) are completely ignored on disks > 2.2TB as they

            use a GPT partition that will always start on a 4k boundary.

Thanks for the response! So it sounds like if I want to align these drives, I need to re-preclear them and rebuild them after.... Not worth it. Mostly was curious to see if I would see a speed difference.

 

Thanks!

DB

Link to comment
  • 6 months later...

Disk alignment is done during clearing. If unRaid does the clearing it will follow the preferences you have set. If you you use preclear_disk then you need to use the -A flag.

 

From the -h help file of preclear_disk.

 

On unRAID 4.7 and subsequent, the -a or -A default is set based on the value

            set on the Settings page in the unRAID web-management console.

            Both of these (-a and -A) are completely ignored on disks > 2.2TB as they

            use a GPT partition that will always start on a 4k boundary.

Thanks for the response! So it sounds like if I want to align these drives, I need to re-preclear them and rebuild them after.... Not worth it. Mostly was curious to see if I would see a speed difference.

 

Thanks!

DB

 

I am in the middle of converting all of my disks to XFS now and I am also concerned with the partition type. Using preclear on a known good drive seems like a very slow process as I have 13 drives. I have an idea but I'm not sure if it would work:

 

1. Clear data off of the drive

2. remove the drive from the array

3. Replace the partition table with gparted

4. Re-Add the drive to the array and have Unraid format it.

5. Transfer the data back to the drive.

 

Would this work?

 

This would be time consuming but not as time consuming as running preclear on 13 drives that already had preclear run on them once.

Link to comment

Disk alignment is done during clearing. If unRaid does the clearing it will follow the preferences you have set. If you you use preclear_disk then you need to use the -A flag.

 

From the -h help file of preclear_disk.

 

On unRAID 4.7 and subsequent, the -a or -A default is set based on the value

            set on the Settings page in the unRAID web-management console.

            Both of these (-a and -A) are completely ignored on disks > 2.2TB as they

            use a GPT partition that will always start on a 4k boundary.

Thanks for the response! So it sounds like if I want to align these drives, I need to re-preclear them and rebuild them after.... Not worth it. Mostly was curious to see if I would see a speed difference.

 

Thanks!

DB

 

I am in the middle of converting all of my disks to XFS now and I am also concerned with the partition type. Using preclear on a known good drive seems like a very slow process as I have 13 drives. I have an idea but I'm not sure if it would work:

 

1. Clear data off of the drive

2. remove the drive from the array

3. Replace the partition table with gparted

4. Re-Add the drive to the array and have Unraid format it.

5. Transfer the data back to the drive.

 

Would this work?

 

This would be time consuming but not as time consuming as running preclear on 13 drives that already had preclear run on them once.

it should be irrelevant what the existing partition type is as adding it to unRAID causes it to be rewritten if it is not already exactly what unRAID expects.  Removing it before adding it to unRAID will do no damage but is not required.

 

Not sure why you think you need to run preclear on the disks that are already part of the array.  You can simply stop the array; change the file system type to XFS; start the array; select the option to format the drive(s).  Whole process only takes a minute or so.

 

Preclear is only necessary if you want to do an initial stress test of the drives before adding them to the array, or are not confident they are good.

Link to comment

 

it should be irrelevant what the existing partition type is as adding it to unRAID causes it to be rewritten if it is not already exactly what unRAID expects.  Removing it before adding it to unRAID will do no damage but is not required.

 

Not sure why you think you need to run preclear on the disks that are already part of the array.  You can simply stop the array; change the file system type to XFS; start the array; select the option to format the drive(s).  Whole process only takes a minute or so.

 

Preclear is only necessary if you want to do an initial stress test of the drives before adding them to the array, or are not confident they are good.

 

I am probably confused about running preclear, I thought that would allow us to force the partition type to GPT,  4K Alligned.

 

The issue that I am trying to solve is that I did exactly what you said when I added a new drive, and well the partition format is XFS the partition table is in the wrong older MBR, unaligned format:

 

Disk_12.jpg

 

For Clarification what I am looking for is GPT, 4K Aligned partition format like this (but with XFS format):

 

Disk_1.jpg

Link to comment

Ater playing around with things I can confirm sevral things.

 

1. There does not appear to be any way to convert the partition type from the GUI. You can mess around with the format of the partition but not the partition type itself.

2. unRAID seems to take whatever partition table format was originally there before hand. The partition type does not seem to impact parity at all. This means there is no need to remove a disk before changing the partition table, just change it then tell unRAID to format the drive.

 

Knowing this and I created an upgrade plan for my partitions which is bassed on my unfamiliarity with Linux CLI Partition tools and my desier to minimize risk to my data. The upgrade steps are as follows:

 

1. Copy all data off of a disk to a backup device mounted by the Unassigned Disks addon.

2. Make sure the disk is empty by deleting the data.

3. Reboot into GParted and replace the Partition table.

4. Reboot into unRAID and verify that you have set the correct fomat for the drive.

5. Tell unRAID to format the drive.

6. Transfer the data back to the drive.

 

This results in a GPT: 4K aligned disk with an XFS (or whatever you want) partition.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.