Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Moving drives around [Solved]

Featured Replies

Just wanted to be clear on the steps as I found old posts and know there is a new command... I am using version 4.7

 

unRaid up and working fine, Parity is good, confirmed within a day. Have 5 disks, assigned to slots "disk1" through "disk5", as well as my parity disk. Now, I want to add some disks and move a couple of arround, if only to be able to keep things straight in my own head and my world just a bit more tidy. :)

 

1 - Stop the Array.

2 - Shut down server.

3 - Move "disk2" to new port and "disk3" to new port on my controllers. Add new hard drives, connect to port previously held by "disk2" and "disk3".

4 - Power up server, array should be stopped due to me moving disks around.

5 - From command prompt or Telnet run: initconfig  (replaces the now lengendary "Refresh" button)

6 - From command prompt or Telnet run: mdcmd set invalidslot 99  (not sure this is needed or not now with the initconfig)

7 - From the unRaid menu, click on Start - all the disk status should turn green and parity check should start.

 

Please correct commands or order if they need clean up.

Also to note, the new disks should have the pre_clear script run on them prior to all this, to make sure they are good and prepared. Anything that needs to be done?

 

Thanks!

 

Friendly advice... don't try to move drives and add drives in one step.  The odds of you making a very bad mistake is way too high.

 

Perform a full parity check.  Resolve ANY errors before going on.

Stop array

Shut down server

Physically move existing drives as needed

Install new drives (if not already installed)

Power up

Use "Devices" page to assign existing drives to their correct slots.  DO NOT ASSIGN NEW DRIVES.

Type initconfig, answer "Yes" to its prompt.

Optionally, Type mdcmd set invalidslot 99

(If you do it will start a parity check instead of a parity calculation.  Either way, let it finish in the next step)

Start the array.  Let it finish a parity calculation.

While it is calculating parity, preclear the new drives.

Once the new drives are precleared...

Stop the array

Assign the new drives

Start the array

Format the new drives (They should show as un-formatted, and a format button will be visible)

You are done, other than using the disks as desired.

 

Yes, you cold probably do it in one step, but then you MUST NOT use "set invalidslot"

I've seen too many "oops," so do it in two steps.  For you own sake.

 

Joe L.

Yes, do this in 2 steps.

 

Are you keeping disk2 and disk3 assigned to the same slots after you physically move them? If you are, you just physically move them and then make sure they are still assigned to the correct slots. You will not need to use either the initconfig or set invalidslot commands. If you are not, then you move them and use the initconfig and set invalidslot to get the array working with the disks moved. Only once you have the array working again with the original disks do you add the new ones. Precleared disks should take seconds to add and restart the array. You are asked to format them once the array is started.

 

 

Use "Devices" page to assign existing drives to their correct slots.  DO NOT ASSIGN NEW DRIVES.

Type initconfig, answer "Yes" to its prompt.

Optionally, Type mdcmd set invalidslot 99

(If you do it will start a parity check instead of a parity calculation.  Either way, let it finish in the next step)

 

Just to be clear, if you keep the disks assigned to the same unRAID slots then you DO NOT require the initconfig or the mdcmd set invalidslot command. Once you make sure the disks are all assigned in their original slots they should all appear green and the array should start without issues. You only do this if you are moving the disks to new slots.

 

By "slots" I mean the slots in the devices page. unRAID really does not care about the physical connection of the device, only the assignment inside unRAID.

 

Peter

  • Author

Thanks guys for the very helpful info. I will do it in two steps. I am going to be taking the drives assigned to "disk2" and "disk3" and assigning them to new slots in unRaid, so I will follow your recomendations.

Going to update my instructions with your advice and save for future reference.

 

Cheers!

Shawn

 

  • Author

One quick thing that occured to me.... In all this mucking about...

 

If, I disconnect the drive assigned to "disk2" and reconnnect to a different Sata port, then plug my "new" disk into the controller port previously used by the drive assigned to "disk2" slot, will not unRaid upon reboot just figure out that old "disk2" gone/failed but hey, there is a new disk there, so start a rebuild?

 

Thanks,

Shawn

 

unRAID may assign the new drive as a replacement thinking that`s what you want but it will not start the array. The array will be stopped and you can go to the devices page and set things up how you want them.

 

Peter

  • Author

Perfect - thanks!

 

Shawn

 

  • Author

Just to update, in spending some time thinking about this, I realized, at least for me, I am going about this the wrong way. Instead of physically redoing things to make things work, which puts wear and tear on drives, cables, connectors and everything else, I need to come at this from a "logical" standpoint. And besides, a month from now when I add a new disk, or decide to change things, again  :P, will I re-cable everything? To much work...

 

unRaid already gives me the tools I need, the very handy include and exclude disks, which for me is important so I know exactly what disks have what data. So, instead of moving things around and such so they are in some sort of "physical" order, I sat down with my excel spreadsheet and spent a hour documenting and mapping everything out. That way I have everything mapped out and easy to refer to, esp if I have some problems. Logically things work very nicely, regardless of what port, slot, disk, etc. Set a few variables in the user shares and let unRaid handle things for me.

 

I will post my spreadsheet when done so others can see and make any comments on where it might be improved. :) Finishing up some changes later today to the system that need to be documented.

 

Cheers,

Shawn

 

About rearranging your disk order ...

 

unRAID DOES allow you to do this as a built-in feature.

 

Say you want the drive in slot2 to be in slot4, and the drive in slot4 to be in slot2. 

 

1 - Stop the array

2 - Go to the devices page, unassign disk2, assign disk4 to the old disk2 drive, assign disk2 to the old disk4 drive

3 - Go back to the main page

4 - The start button will be disabled, but a check box will appear under the start array button

5 - Click the checkbox, and the start button will be enabled

6 - Review your configuration carefully

7 - Click the start botton.  Voila!

 

I believe this will only work with one swap at a time (easy enough to try), so if you have a lot to do, you'd have to do it one swap at a time.  Kind of like a puzzle :D

 

One limitation is that unRAID will not let you exchange a disk with an empty slot. To do that you need to use the technique that Joe L. described.

  • Author

  Kind of like a puzzle :D

 

One limitation is that unRAID will not let you exchange a disk with an empty slot. To do that you need to use the technique that Joe L. described.

 

A puzzle with all my critical data on it. :D

 

And yes, in testing last night I unassigned one drive from say slot2 and assigned it to slot4 - went back to the array page and unRaid does not like that. Shows the drive in the new slot with the blue ball, but a "missing disk" in old slot. I just did this to test what the array would show me. Moved back and no issue. Figured I would have to run the initconfig command and such...

This is not a data integrity issue.  Here's an example.  Say your want to rearrage drives in the example below  (I just used letters below to represent drives).

 

1  2  3  4  5  6  7  8 (DISK SLOT)
D  E  H  A  G  F  B  C (ORIGINAL ORDER)
A  B  C  D  E  F  G  H (DESIRED ORDER)

D  E  H  A  G  F  B  C (ORIGINAL ORDER)
A  E  H  D  G  F  B  C (exchange 1 with 4)
A  B  H  D  G  F  E  C (exchange 2 with 7)
A  B  C  D  G  F  E  H (exchange 3 with 8 )
A  B  C  D  E  F  G  H (exchange 5 with 7)

 

It would take you 4 steps, starting the array after each step.  Figuring out how to do it most efficiently is the puzzle I was referring to.

 

As I said, you can't to this with empty slots.  Sounds like that's what you were trying.

  • Author

I was testing with a empty slot to see what it would do. Know I know. :)

 

Thanks for the map, does make sense. The whole job beeing to figure the most efficient way...

 

Here is a copy of the spreadsheet I am working with. Maybe only makes sense to me.  ???

 

Cheers,

Shawn

disk_layout.pdf

This is not a data integrity issue.  Here's an example.  Say your want to rearrage drives in the example below  (I just used letters below to represent drives).

 

1  2  3  4  5  6  7  8 (DISK SLOT)
D  E  H  A  G  F  B  C (ORIGINAL ORDER)
A  B  C  D  E  F  G  H (DESIRED ORDER)

D  E  H  A  G  F  B  C (ORIGINAL ORDER)
A  E  H  D  G  F  B  C (exchange 1 with 4)
A  B  H  D  G  F  E  C (exchange 2 with 7)
A  B  C  D  G  F  E  H (exchange 3 with 8 )
A  B  C  D  E  F  G  H (exchange 5 with 7)

 

It would take you 4 steps, starting the array after each step.  Figuring out how to do it most efficiently is the puzzle I was referring to.

 

As I said, you can't to this with empty slots.  Sounds like that's what you were trying.

 

Why not just swap everything at once? This is what I just did when setting up my final unRAID config this weekend. I just made a copy of the page that shows the location of each hard drive. Since it shows the serial number there is no way to mix it up. I referenced this sheet when physically moving my drives. And then after I restarted the unRAID box, referenced it again to assign the drives to the proper location and start the array. This is what I did with zero issues.

It's certainly much easier than doing it in multiple steps. As long as you make a copy of the page that shows the locations of each drive, there is no way to mess it up since each hard drive has a unique serial number.

You can swap the drives around, add new drives and even remove drives before using the initconfig to restart the array. You do lose the parity protection until the parity has rebuilt though.

 

Peter

 

  • Author

 

Why not just swap everything at once? This is what I just did when setting up my final unRAID config this weekend. I just made a copy of the page that shows the location of each hard drive. Since it shows the serial number there is no way to mix it up. I referenced this sheet when physically moving my drives. And then after I restarted the unRAID box, referenced it again to assign the drives to the proper location and start the array. This is what I did with zero issues.

It's certainly much easier than doing it in multiple steps. As long as you make a copy of the page that shows the locations of each drive, there is no way to mess it up since each hard drive has a unique serial number.

 

Ahh, looks like you just moved things physical, but re-assigned everything back to the same slot. I was referring to originally moving some disks physically and changing the slots they were assigned to, then adding some new drives into the old slots. Bit more mucking about. :)

 

Shawn

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.