How to Replace a Drive (cache/data/parity)


Recommended Posts

Hey all,

 

Im new here and new to unraid. Just got setup, i just have couple of questions on best way to do couple of things. So, this thread is about, what is the best process to replace a drive. First of all, there are 3 types of drives:

  • Parity Drive
  • Data Drive
  • Cache Drive

 

And there are 2 types of "replacement":

  • Drive Swap: Swap out one drive (old existing) for another (new). This could be either due to drive upgrade or due to drive failure
  • Drive Remove: This is only applicable for Data and Cache drives only, but suppose it might make sense for Parity in 6.2.x. But this is when you say you have 5x4tb data drives (20tb) and only using 10tb of data. So you can technically safely remove 2 of the data drives (probably not at the same time) and still have 2TB remaining. This could either be because of downgrading the raid or downgrading due to drive failure

 

So, now that the scenarios are out of the way. Can someone explain what the best way to do the following:

1. Parity Drive Swap (upgrade)

2. Parity Drive Swap (replace due to failure)

3. Data Drive swap (upgrade)

4. Data Drive swap (replace due to failure)

5. Data Drive Remove (downgrade)

6. Data Drive Remove (downgrade due to failure)

7. Cache Drive swap (upgrade)

8. Cache Drive remove

 

Just to add some curve balls, lets say that i have a raid with 1 parity and 3 data drives. For the cases (3) listed above, lets say we remove 1 data drive and add 1 new data drive in its place and let the raid rebuild that new data drive from the parity. In this scenario, if another drive fails, then you potentially lose entire raid (because you technically lost 2 drives)? Is there a more safer way to do a drive upgrade/swap?

 

Cheers, TY in advance. Please feel free to link me to any reading material. :D

Link to comment

Hey all,

 

Im new here and new to unraid. Just got setup, i just have couple of questions on best way to do couple of things. So, this thread is about, what is the best process to replace a drive. First of all, there are 3 types of drives:

  • Parity Drive
  • Data Drive
  • Cache Drive

 

And there are 2 types of "replacement":

  • Drive Swap: Swap out one drive (old existing) for another (new). This could be either due to drive upgrade or due to drive failure
  • Drive Remove: This is only applicable for Data and Cache drives only, but suppose it might make sense for Parity in 6.2.x. But this is when you say you have 5x4tb data drives (20tb) and only using 10tb of data. So you can technically safely remove 2 of the data drives (probably not at the same time) and still have 2TB remaining. This could either be because of downgrading the raid or downgrading due to drive failure

 

So, now that the scenarios are out of the way. Can someone explain what the best way to do the following:

1. Parity Drive Swap (upgrade)

2. Parity Drive Swap (replace due to failure)

3. Data Drive swap (upgrade)

4. Data Drive swap (replace due to failure)

5. Data Drive Remove (downgrade)

6. Data Drive Remove (downgrade due to failure)

7. Cache Drive swap (upgrade)

8. Cache Drive remove

 

Just to add some curve balls, lets say that i have a raid with 1 parity and 3 data drives. For the cases (3) listed above, lets say we remove 1 data drive and add 1 new data drive in its place and let the raid rebuild that new data drive from the parity. In this scenario, if another drive fails, then you potentially lose entire raid (because you technically lost 2 drives)? Is there a more safer way to do a drive upgrade/swap?

 

Cheers, TY in advance. Please feel free to link me to any reading material. :D

 

1-4 are the same procedure. Here are the directions from the FAQ. There is a special case also if you want to replace a data drive with a drive larger then the current parity drive... Directions Here.

5-6 are the same procedure. Edit: This Link was not the best source of directions, see later in the thread to find a better set of directions. 

 

7 and 8 really dependent on if you are using a cache pool or not, and how that cache pool is configured... this IMO is an area of weakness in the documentation right now.

 

Curveball: No you don't lose the entire unRAID if a second disk becomes disabled during the rebuild. You could lose between 1 and 2 disks worth of data, depending on if one of the disks that fails is the parity disk. The nice thing about unRAID is you can never lose the entire array from one disk failing (even if others have already failed) at worst you only lose the failed disks.

 

 

Link to comment

Just to add some curve balls, lets say that i have a raid with 1 parity and 3 data drives. For the cases (3) listed above, lets say we remove 1 data drive and add 1 new data drive in its place and let the raid rebuild that new data drive from the parity. In this scenario, if another drive fails, then you potentially lose entire raid (because you technically lost 2 drives)? Is there a more safer way to do a drive upgrade/swap?

 

Cheers, TY in advance. Please feel free to link me to any reading material. :D

As gundamguy said, you will not loose the entire array.

Also, you can just put back the old disk that you changed out, and use that to rebuild the failed drive (just check out the procedure on how to do this before doing it). After the failed drive is rebuild, then you can just restart the rebuild of the other drive you first started with.

Using dual parity is also an option.

Link to comment

Just removing the drive and rebuilding parity is the simple way. Here is another wiki about another scenario you might find useful:

 

Replacing Multiple Data Drives with a Single Larger Drive

 

Could you please explain what steps i need to take to achieve "removing the drive and rebuilding parity". Do i need to take a backup of the contents of the drive first, or are you suggesting that the rebuilding of the parity will recover the data from the drive and add it to the array? Few steps i need to take would be appreciated, im a noob here haha.

Link to comment

Also @gundamguy, see if you can edit your initial response and remove the section about the directions for 5-6 (or maybe a mod can do it?). That thread has incomplete instructions, i followed blindly and ended up losing a drive (thank god it was a small drive), just lost 1/2 tb of media. Its my bad, i should have googled the console command, but lets try to make sure others fall on the same trap.

Link to comment

Just removing the drive and rebuilding parity is the simple way. Here is another wiki about another scenario you might find useful:

 

Replacing Multiple Data Drives with a Single Larger Drive

 

Could you please explain what steps i need to take to achieve "removing the drive and rebuilding parity". Do i need to take a backup of the contents of the drive first, or are you suggesting that the rebuilding of the parity will recover the data from the drive and add it to the array? Few steps i need to take would be appreciated, im a noob here haha.

http://lime-technology.com/wiki/index.php/UnRAID_6/Storage_Management#Replace_a_failed_disk
Link to comment

Replace a Single Disk with a Bigger One

 

1. Stop the array.

2. Power down the unit.

3. Replace smaller disk with new bigger disk.

4. Power up the unit.

5. Start the array.

 

When you start the array, the system will reconstruct the contents of the original smaller disk onto the new disk. Upon completion, the disk's file system will be expanded to reflect the new size. You can only expand one disk at a time.

 

IS this method redundant now?

Stop the array

Unassign the old drive, if it's still assigned

Power down

[ Optional ] Pull the old drive (you may want to leave it installed for Preclearing or testing)

Install the new drive

Power on

Assign the new drive in the slot of the old drive

Go to the Main -> Array Operation section

Put a check in the Yes, I'm sure checkbox (next to the information indicating the drive will be rebuilt), and click the Start button

The rebuild will begin, with hefty disk activity on all drives, lots of writes on the new drive and lots of reads on all other drives

All of the contents of the old drive will be copied onto the new drive, making it an exact replacement, except possibly with more capacity than the old drive.

Link to comment

Replace a Single Disk with a Bigger One

 

1. Stop the array.

2. Power down the unit.

3. Replace smaller disk with new bigger disk.

4. Power up the unit.

5. Start the array.

 

When you start the array, the system will reconstruct the contents of the original smaller disk onto the new disk. Upon completion, the disk's file system will be expanded to reflect the new size. You can only expand one disk at a time.

 

IS this method redundant now?

Stop the array

Unassign the old drive, if it's still assigned

Power down

[ Optional ] Pull the old drive (you may want to leave it installed for Preclearing or testing)

Install the new drive

Power on

Assign the new drive in the slot of the old drive

Go to the Main -> Array Operation section

Put a check in the Yes, I'm sure checkbox (next to the information indicating the drive will be rebuilt), and click the Start button

The rebuild will begin, with hefty disk activity on all drives, lots of writes on the new drive and lots of reads on all other drives

All of the contents of the old drive will be copied onto the new drive, making it an exact replacement, except possibly with more capacity than the old drive.

If you're not going to remove the old drive then you would have to unassign it so you could reassign that slot to the new drive. If the old drive is removed then it's not necessary to unassign it.
Link to comment

Also @gundamguy, see if you can edit your initial response and remove the section about the directions for 5-6 (or maybe a mod can do it?). That thread has incomplete instructions, i followed blindly and ended up losing a drive (thank god it was a small drive), just lost 1/2 tb of media. Its my bad, i should have googled the console command, but lets try to make sure others fall on the same trap.

 

Well sorry to hear that. I edited my post.

 

I'm not sure why I couldn't find the instructions on the wiki, maybe I was searching the wrong term.

Link to comment

If you're not going to remove the old drive then you would have to unassign it so you could reassign that slot to the new drive. If the old drive is removed then it's not necessary to unassign it.

 

Thanks trurl! Will the recreate process use the same file system as the old drive and is there a problem using a mix of xfs and reiserfs in an array?  ;)

Link to comment

If you're not going to remove the old drive then you would have to unassign it so you could reassign that slot to the new drive. If the old drive is removed then it's not necessary to unassign it.

 

Thanks trurl! Will the recreate process use the same file system as the old drive and is there a problem using a mix of xfs and reiserfs in an array?  ;)

The rebuilt disk is bit for bit identical to the old disk. Some of those bits are the filesystem, so yes it is the same filesystem.

 

Don't make the mistake some have made of trying to change the filesystem during the rebuild process. Changing the filesystem formats it by writing an empty filesystem to the disk. Parity is updated by this write so parity agrees that you have an empty filesystem and when you rebuild that is what you get.

 

Each disk managed by unRAID; i.e., data disks in the parity array and the cache disk(s), can use ReiserFS, XFS, or btrfs. Each disk is an independent filesystem. If you have multiple disks in a cache pool they must be btrfs. XFS is the default for data disks in the parity array, and btrfs is the default for cache disk, but you can choose something else, just be aware that changing filesystems formats the disk.

Link to comment

Replace a Single Disk with a Bigger One

 

1. Stop the array.

2. Power down the unit.

3. Replace smaller disk with new bigger disk.

4. Power up the unit.

5. Start the array.

 

When you start the array, the system will reconstruct the contents of the original smaller disk onto the new disk. Upon completion, the disk's file system will be expanded to reflect the new size. You can only expand one disk at a time.

 

IS this method redundant now?

Stop the array

Unassign the old drive, if it's still assigned

Power down

[ Optional ] Pull the old drive (you may want to leave it installed for Preclearing or testing)

Install the new drive

Power on

Assign the new drive in the slot of the old drive

Go to the Main -> Array Operation section

Put a check in the Yes, I'm sure checkbox (next to the information indicating the drive will be rebuilt), and click the Start button

The rebuild will begin, with hefty disk activity on all drives, lots of writes on the new drive and lots of reads on all other drives

All of the contents of the old drive will be copied onto the new drive, making it an exact replacement, except possibly with more capacity than the old drive.

That first 5 step procedure is obsolete, only for unRAID v4 and earlier.  The latter procedure is correct for unRAID v6.

Link to comment
  • 2 years later...

Hey guys!  I know this is an old post, but my question has to do with this.  I installed my array with an older 5200RPM  1TB, and I want to eventually upgrade that older 1TB with a 7200RPM 6TB.  Is there any way I can install the 6TB alongside the 1TB, and have the data transferred gracefully from the old drive onto the new drive so a rebuild isn't necessary?

 

I assumed that if I leave the old drive installed, unassigned it, and assign the new drive, it would transfer the data from the old drive to the new drive.  I want to make sure that would happen.

Link to comment

There is no automatic transfer without a rebuild.

 

since you mention a rebuild then I assume you have (valid) parity?   I assume the parity is at least 6TB since you want to use a 6TB data drive.  In which case the procedure is:

- stop the array

- Unassigned the drive and start the array without the drive assigned.   This is to simulate the drive failing. 

- stop the array and assign the new drive

- start the array to initiate a rebuild onto the new drive.   When the rebuild completes the data will be on the drive.

Link to comment
  • 3 years later...

Hi. I am somewhat of a noob with unRAID still, and I just powered down and added a data drive (8tb) but when I rebooted the 14Tb array #1 was listed as unassigned along with the new 8tb data drive. Help! I havent done anything else apart from that, I didn't want to damage anything.

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.