Trouble with removing drives


Recommended Posts

Hi UNRAID Community,

I have some trouble with my UNRAID server.

I wanted to replace some drives of my servers, but it looks like i followed the wrong steps 😵.

 

Here is my setup:

- #01: 12TB Parity

- #02: 12TB Parity

- #03: 3TB Data

- #04: 3TB Data

- #05: 4TB Data

- #06: 4TB Data

- #07: 8TB Data

- #08: 8TB Data

- #09: 8TB Data

- #10: 8TB Data

- #11: 10TB Data

- #12: 10TB Data

--

- #13: 10TB Data

- #14: 10TB Data

 

What I did:

- I added #13 and #14 to the array

- I "somehow" removed #03 from the pool and UNRAID is now showing drive is in "error state: no device identification"

> When I try to add #03 to the array again, UNRAID identifies the drive as "new device" and wants to overwrite it.

 

What I want to do:

I want to remove #03 and rebuild parity, but I don't know how?!

Do I have to use the new config procedure for this? Which boxes do I have to tick?

 

Thank you for your precious help!

 

 

Link to comment
On 10/21/2021 at 2:35 PM, wgstarks said:

You would assign one of the new drives to that position and rebuild the data.

https://wiki.unraid.net/Replacing_a_Data_Drive

That is my problem. I added the new drives (#13 and #14) before #03 was removed.

So now I cannot use the replacement-function.

Therefore I need an option to rebuild parity of the "new" array (all drives excl. #03).

 

 

On 10/21/2021 at 3:02 PM, wgstarks said:

You will probably want to shrink the array and then add the replacement.

https://wiki.unraid.net/Shrink_array#For_unRAID_v6.2_and_later

Thank you for sharing. I will use this method after fixing my problem above.

Edited by dan_raid
Link to comment
On 10/21/2021 at 3:55 PM, JonathanM said:

Is data slot 3 mounted and showing the correct content?

 

What do you mean by showing the correct content?

The drive is showing up, but when I want to add it, UNRAID wants to overwrite it.

 

Here are two screenshots

disks.thumb.jpg.e78ee381af2ca2972c3d30deacf777a9.jpg

 

disks_3.thumb.jpg.a04a80c837986c5e2f860cc07b68ae63.jpg

 

Edited by dan_raid
Link to comment
22 hours ago, JonathanM said:

When you start the array without adding the drive, and leave it unassigned, does it mount and show the contents?

 

When I start the array the drive is listed as missing / not installed.

The contents of it are emulated.

Here is a screenshot:

 

array.thumb.jpg.cb4e543c1b621a39c9a3f7b74ff88a79.jpg

 

 

From this point I want to remove drive #03 and rebuild parity, but I do not know how.

Link to comment

For safety's sake, this is a multi step process.

At the local console (attached keyboard and monitor) or using the screen application over SSH, issue these commands.

rsync -arv /mnt/disk3/ /mnt/disk13

That command copies everything on the disk3 data slot to disk13. After that has completed, run

rsync -narcv /mnt/disk3/ /mnt/disk13

That command compares all the files on disk3 to the files on disk13. It should not show any files, if it does it means that something didn't compare identically.

 

After you have completed those two commands with the second command showing no results, then you can move on to rearranging the drives and rebuilding parity.

 

Be VERY precise when entering the commands, the placement of the slashes is very important.

  • Thanks 1
Link to comment

First of all: Thank you for your precious support! I am glad you are supporting me 👍

 

 

21 hours ago, JonathanM said:
rsync -narcv /mnt/disk3/ /mnt/disk13

That command compares all the files on disk3 to the files on disk13. It should not show any files, if it does it means that something didn't compare identically.

 

I ran both commands, after the last one I received the following message:

array_rsync.jpg.41812db0e1e2520d2f8feacaf8c1c664.jpg

For me it looks like everything is fine. I am right?

 

 

 

21 hours ago, JonathanM said:

After you have completed those two commands with the second command showing no results, then you can move on to rearranging the drives and rebuilding parity.

 

I am not sure what you mean. Do you mean to shrink the array or remove disks?

Edited by dan_raid
Link to comment
1 hour ago, JonathanM said:

That part looks good. If you click on the "view" folder on the far right of the main GUI screen for disk 3 and disk 13 and compare, do they look identical? Does disk 13 now show 1.62 TB used instead of 69.7 GB?

I checked the overall folder structure and it looks similiar.

 

Disk #03 has 1,62TB and Disk #13 now has 1,67TB.

array_after_rsync.thumb.jpg.9960d4ea459a2ecb8aef42e0c92f6690.jpg

 

 

 

Link to comment

Good!

Hopefully it's not just similar, but identical.

 

The commands you ran first copied, then compared what was copied, and no differences were noted, so you should be fine there.

 

This next bit assumes you want disk 13 to be in the 3 slot, and 14 to be in the 13 slot. If you DON'T want the current disk14 in the array right now, make sure it is empty and just don't assign it in this next step.

 

Now, with a printed hard copy of the serial numbers and slots they are currently assigned to in hand, stop the array, go to tools, new config, preserve current assignments all. Apply that, then on the Main GUI page, set disk 14 to none, set disk13 to the disk that was in 14, and set disk3 to the disk that was in 13.

 

Do a last verification that the disks are in their correct slots, all the data disks will have their current contents retained, both parity disks will be fully erased and rebuilt in this next step.

 

Start the array, DO NOT CHECK THE BOX STATING PARITY IS VALID. It is not, and you must rebuild parity from scratch at this point.

 

If you are unclear on any step or why it's needed, stop and ask, don't blindly follow.

  • Thanks 1
Link to comment
21 hours ago, JonathanM said:

Good!

Hopefully it's not just similar, but identical.

 

The commands you ran first copied, then compared what was copied, and no differences were noted, so you should be fine there.

 

This next bit assumes you want disk 13 to be in the 3 slot, and 14 to be in the 13 slot. If you DON'T want the current disk14 in the array right now, make sure it is empty and just don't assign it in this next step.

 

Now, with a printed hard copy of the serial numbers and slots they are currently assigned to in hand, stop the array, go to tools, new config, preserve current assignments all. Apply that, then on the Main GUI page, set disk 14 to none, set disk13 to the disk that was in 14, and set disk3 to the disk that was in 13.

 

Do a last verification that the disks are in their correct slots, all the data disks will have their current contents retained, both parity disks will be fully erased and rebuilt in this next step.

 

Start the array, DO NOT CHECK THE BOX STATING PARITY IS VALID. It is not, and you must rebuild parity from scratch at this point.

 

If you are unclear on any step or why it's needed, stop and ask, don't blindly follow.

 

I followed your steps and parity sync is running:

 

array_04_parity_rebuild.thumb.jpg.e527f99be1ec1bab0ce54ca88846ca8e.jpg

 

 

After this step I want to remove disks #01, #02, #04, #05 and #06 (as marked in the screenshot above).

Is the best way to repeat the steps from above?

 

rsync -arv /mnt/disk1/ /mnt/disk3
rsync -narcv /mnt/disk1/ /mnt/disk3

 

rsync -arv /mnt/disk2/ /mnt/disk3
rsync -narcv /mnt/disk2/ /mnt/disk3

 

rsync -arv /mnt/disk4/ /mnt/disk3
rsync -narcv /mnt/disk4/ /mnt/disk3

 

rsync -arv /mnt/disk5/ /mnt/disk13
rsync -narcv /mnt/disk5/ /mnt/disk13

 

rsync -arv /mnt/disk6/ /mnt/disk13
rsync -narcv /mnt/disk6/ /mnt/disk13

 

Edited by dan_raid
Link to comment
2 hours ago, dan_raid said:

After this step I want to remove disks #01, #02, #04, #05 and #06 (as marked in the screenshot above).

Is the best way to repeat the steps from above?

Yes, with some additional info.

 

The reason I had you specifically rearrange the drives was to put the data that had been on drive 3, back in the drive 3 slot. What you are proposing will work fine, and you can remove all the drives at once with a single new config and parity rebuild operation.

However, once you are done, the data will be on different data slot numbers. If you haven't customized any share allocation settings, that will be fine. However, if you had defined any shares to specifically use drive slots, those will need to be changed to the new drive slot numbers. Unraid by default doesn't care which data goes on which disk, but you can force it to only use certain disks, which is why I told you to put the destination disk back in slot 3. That way if you HAD customized things, they wouldn't break.

 

BTW, if you poke around you will find other methods of getting data from drive to drive, most involve moving instead of copying. I advocate copying for several reasons. It's faster. You can verify the copy before you make things permanent. You still have the data as a backup on the removed disk.

 

The biggest reason to move instead of copying is verifying all the data is on the destination if you insist on actively using the array while the file operations are taking place.

 

As long as you do not add or modify data while doing the copy, you won't have any issues. You can read and play files from the array during the copy with no problems.

 

Adding or modifying files in a user share while the copy is taking place could possibly result in the changes not transferring to the new drive.

 

If you are ok with not adding or modifying files on the server while you get this done, then you are good to go.

  • Thanks 1
Link to comment
On 10/24/2021 at 5:45 PM, JonathanM said:

Yes, with some additional info.

Great, I will follow those steps 😎.

 

On 10/24/2021 at 5:45 PM, JonathanM said:

However, if you had defined any shares to specifically use drive slots, those will need to be changed to the new drive slot numbers. Unraid by default doesn't care which data goes on which disk, but you can force it to only use certain disks, which is why I told you to put the destination disk back in slot 3.

Nope, nothing set up.

 

On 10/24/2021 at 5:45 PM, JonathanM said:

BTW, if you poke around you will find other methods of getting data from drive to drive, most involve moving instead of copying. I advocate copying for several reasons. It's faster. You can verify the copy before you make things permanent. You still have the data as a backup on the removed disk.

I found other methods, but I'm fine with this approach.

 

On 10/24/2021 at 5:45 PM, JonathanM said:

As long as you do not add or modify data while doing the copy, you won't have any issues. You can read and play files from the array during the copy with no problems.

My plan is pause the usage of the server, copy the data, remove the drives and resync parity.

 

----

 

I would like to raise two additional questions:

[1 - During the copy process] How "important" is the comparison step (rsync -narcv)? I am looking for a way to speed up the process and I cannot fully understand the verify part.

[2 - Rebuild partiy] Do the old drives (e.g. drive #07) have to stay at their old slots? Or can I rearange them by size? My idea: First 8TB drives and then followed by 10TB drives

Link to comment
14 minutes ago, dan_raid said:

 

[1 - During the copy process] How "important" is the comparison step (rsync -narcv)? I am looking for a way to speed up the process and I cannot fully understand the verify part.

[2 - Rebuild partiy] Do the old drives (e.g. drive #07) have to stay at their old slots? Or can I rearange them by size? My idea: First 8TB drives and then followed by 10TB drives

Compare is only as important as you need it to be. If everything worked properly, it will show zero differences. It's there to catch errors in the copy process. Totally your call, especially since you will still have the data on the removed drives if something shows up as corrupt or missing later. If everything works properly with the copy command the verify isn't needed, but I like to give the safest advice possible. Since your first copy went well, you likely will be ok for the rest.

 

When you rebuild parity you can put the data drives wherever you please. Just be sure to never put a data drive in a parity slot, as that will irretrievably remove any data that was on the drive. If you select the retain parity assignments on the new config screen that will reduce your chances of messing up.

  • Thanks 1
Link to comment
On 10/25/2021 at 10:40 PM, JonathanM said:

Compare is only as important as you need it to be. If everything worked properly, it will show zero differences. It's there to catch errors in the copy process. Totally your call, especially since you will still have the data on the removed drives if something shows up as corrupt or missing later. If everything works properly with the copy command the verify isn't needed, but I like to give the safest advice possible. Since your first copy went well, you likely will be ok for the rest.

Thank you for your explanation

As this is my first time in removing drive, I think I stay with the routine.

Next time I switch to "livin la vida loca" 🤪

 

On 10/25/2021 at 10:40 PM, JonathanM said:

When you rebuild parity you can put the data drives wherever you please. Just be sure to never put a data drive in a parity slot, as that will irretrievably remove any data that was on the drive. If you select the retain parity assignments on the new config screen that will reduce your chances of messing up.

Ok, understood.

 

----

 

Sorry, but I still have a question:

Is it also possible to add (completely) new drives in the new config part?

Edited by dan_raid
Link to comment
5 minutes ago, dan_raid said:

Is it also possible to add (completely) new drive in the new config part

Sure, you can add, remove, rearrange, whatever. If the drive hasn't previously been formatted as an Unraid data drive you will be prompted to format it after you start the array. Just be very sure the format list only includes drives you intend to format, unfortunately Unraid will format ALL unmountable drives at once, so if for some reason a previously good data drive happens to be unmountable for whatever reason, it will get formatted as well, instead of offering you the correct option to fix the filesystem.

On 10/25/2021 at 4:40 PM, JonathanM said:

Just be sure to never put a data drive in a parity slot

 

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.