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.

Adding new drive & expanding an existing array

Featured Replies

I followed http://lime-technology.com/forum/index.php?topic=2817.0 in order to add a new drive to an existing protected array. The drive was first precleared and afterwards formatted within the GUI. Then I stopped the array and added the drive.

 

Since the procedure above describes formatting the drive *after* adding it to the array, and I formatted it prior to this, I wanted to ask if I did something wrong? The disk went online, the array didn't calculated parity and shows parity as valid.

I followed http://lime-technology.com/forum/index.php?topic=2817.0 in order to add a new drive to an existing protected array. The drive was first precleared and afterwards formatted within the GUI. Then I stopped the array and added the drive.

 

Since the procedure above describes formatting the drive *after* adding it to the array, and I formatted it prior to this, I wanted to ask if I did something wrong? The disk went online, the array didn't calculated parity and shows parity as valid.

the unRAID screen will present to you a "Format" button if you add a new pre-cleared disk to an existing array.  It will show the drive as "Unformatted" until you press the "Format" button.

 

Is that what you  did?

 

Or, did you format it in unMENU's disk management screen?  If you did, you basically un-did the pre-clear zeroing of the drive and when you add the new drive it will need to calculate parity.

 

If the disks was pre-cleared, and then assigned to the array, and then the array started, and then the "Format" button pressed, then no additional parity calculations are needed.

 

Joe L.

  • Author

The disk was precleared, then formatted in "unMENU's disk management screen" (as a separate disk), then added to the array, then started the array. There was no format button available as the drive was already formatted. The array didn't perform any more preclearing but recognized the disk as precleared and showed valid parity. I saw in the log that it only changed the mbr block. Attached the syslog. This is with 4.5, perhaps something has changed!?

The disk was precleared, then formatted in "unMENU's disk management screen" (as a separate disk), then added to the array, then started the array. There was no format button available as the drive was already formatted. The array didn't perform any more preclearing but recognized the disk as precleared and showed valid parity. I saw in the log that it only changed the mbr block. Attached the syslog. This is with 4.5, perhaps something has changed!?

Please... press the "Parity Check" button and let it complete.  I do not think you have parity protection at all.  I think the pre-clear signature my preclear_disk process wrote was not modified by the formatting of the disk and incorrectly recognized as pre-cleared.  It is NOT if you formatted it.

 

You MUST do a parity check now.  Expect it to find parity errors.  It will fix them as it finds them.    I realize now that putting the format button in unMENU was a mistake.  One way or another, I need to either get rid of it, or force the pre-clear signature to not exist when it is pressed.  Even though you think you have parity protection, I'm betting you do not.  (If unRAID cleared the disk after you added it to the array, and it kept the array off-line for a few hours while it did, you are safe and have parity protection, but if it did not, you DO NOT currently have the ability to recover from a disk failure, not until you do a full parity check.

 

Sorry... 

 

Joe L.

  • Author

Joe, thanks! I will get it out of the array now and preclear it again and add it afterwards as a precleared drive. I will not that the array goes down at the moment... Hope that this is ok.

 

Edit: Array shows the disk as missing. I have to completely clear it from the array's config and say that it would not get replaced.

Joe, thanks! I will get it out of the array now and preclear it again and add it afterwards as a precleared drive. I will not the array to go down at the moment.. Hope that this is ok.

 

Edit: Array shows the disk as missing. I have to completele clear it from the array's config and say that it would not get replaced.

Don't remove it from the array, just press the "Check" parity button and let it complete a check with the newly added disk in place and assigned.

 

Joe L.

  • Author

Ok, checking parity! Thanks!

  • Author

Is it possible to remove an empty drive from the array? A drive that is part of the array but doesn't contain any data. Say not to be replaced all, just make unRAID forget about that drive?

Is it possible to remove an empty drive from the array? A drive that is part of the array but doesn't contain any data. Say not to be replaced all, just make unRAID forget about that drive?

Yes,

 

Un-assign it on the devices page.  Go back to the main page.

Press the button labeled "restore" which sets an initial configuration of disks.  It immediately invalidates your parity and saves a new disk configuration without the drive you just removed.

Start the array, it will need to do a complete parity calculation before you are protected once more.

 

Joe L.

Is it possible to remove an empty drive from the array? A drive that is part of the array but doesn't contain any data. Say not to be replaced all, just make unRAID forget about that drive?

Yes,

 

Un-assign it on the devices page.  Go back to the main page.

Press the button labeled "restore" which sets an initial configuration of disks.  It immediately invalidates your parity and saves a new disk configuration without the drive you just removed.

Start the array, it will need to do a complete parity calculation before you are protected once more.

 

Joe L.

 

Does this work is there's data on the drive or only if there's no data? I looked at the wiki for "Restore array configuration" but I'm still more than a little confused.

Is it possible to remove an empty drive from the array? A drive that is part of the array but doesn't contain any data. Say not to be replaced all, just make unRAID forget about that drive?

Yes,

 

Un-assign it on the devices page.  Go back to the main page.

Press the button labeled "restore" which sets an initial configuration of disks.  It immediately invalidates your parity and saves a new disk configuration without the drive you just removed.

Start the array, it will need to do a complete parity calculation before you are protected once more.

 

Joe L.

 

Does this work is there's data on the drive or only if there's no data? I looked at the wiki for "Restore array configuration" but I'm still more than a little confused.

It does not matter if there is data on the drive or not.  When you press "restore" it saves a new initial configuration based on the currently assigned and working disks.  it immediately invalidates parity.  When you next start the array a full parity calculation will be performed and you will not have parity protection again until it completes.        The restore button does not restore data, it saves a new disk configuration based on the then assigned (and working) disks.  It is as if you were doing the initial disk assignment and had never calculated parity.

You would NEVER want to press restore (and invalidate parity) if you had a disk failure as it would throw away any chance of rebuilding the failed disk contents.

 

Joe L.

  • Author

You would NEVER want to press restore (and invalidate parity) if you had a disk failure as it would throw away any chance of rebuilding the failed disk contents.

 

This buttong probably should be disabled in case there is any data disk failure?!

You would NEVER want to press restore (and invalidate parity) if you had a disk failure as it would throw away any chance of rebuilding the failed disk contents.

 

This button probably should be disabled in case there is any data disk failure?!

In principal I agree with you, but there are times where it is necessary.  For example, I once had a disk failure on a small disk in my array. It was an old disk and I had no intention of replacing it at that time.  I copied the files from failed drive using the "simulated" drive that parity and the other drives allowed, and then once the failed drive was empty, to back to having parity protection I un-assigned it, pressed restore, and 10 hours later I was protected by parity once more.  I had a window where I was not protected, but it would be weeks until I would add a new drive to replace the failed drive as I had plenty of space and I could shop for a sale price.  My situation was one where I wanted to permanently remove a failed drive.

 

For almost any other situation, where the data on the failed drive is not copied elsewhere, pressing the button would be a very bad thing to do.

 

Joe L. 

You would NEVER want to press restore (and invalidate parity) if you had a disk failure as it would throw away any chance of rebuilding the failed disk contents.

 

This button probably should be disabled in case there is any data disk failure?!

In principal I agree with you, but there are times where it is necessary.  For example, I once had a disk failure on a small disk in my array. It was an old disk and I had no intention of replacing it at that time.  I copied the files from failed drive using the "simulated" drive that parity and the other drives allowed, and then once the failed drive was empty, to back to having parity protection I un-assigned it, pressed restore, and 10 hours later I was protected by parity once more.  I had a window where I was not protected, but it would be weeks until I would add a new drive to replace the failed drive as I had plenty of space and I could shop for a sale price.   My situation was one where I wanted to permanently remove a failed drive.

 

For almost any other situation, where the data on the failed drive is not copied elsewhere, pressing the button would be a very bad thing to do.

 

Joe L. 

 

I sort of agree with the OP in the sense that it isn't as intuitive as I'd have liked. Thanks for the explanation.

 

Please bear with me while I make sure I understand what you're saying and I apologize if I'm going off topic.

 

So let's say I have 4 drives. unRAID will show them as:

 

/disk1

/disk2

/disk3

/disk4

 

If disk3 fails, unRAID will still export the contents but won't protect me in the event of another drive failure.

 

So I would go into /disk3 and copy/move all of the stuff in there to another drive.

 

I would then unassign the drive in unRAID and then physically remove /disk3 from the array and press restore which will now redo parity and life is good again?

 

You would NEVER want to press restore (and invalidate parity) if you had a disk failure as it would throw away any chance of rebuilding the failed disk contents.

 

This button probably should be disabled in case there is any data disk failure?!

In principal I agree with you, but there are times where it is necessary.  For example, I once had a disk failure on a small disk in my array. It was an old disk and I had no intention of replacing it at that time.  I copied the files from failed drive using the "simulated" drive that parity and the other drives allowed, and then once the failed drive was empty, to back to having parity protection I un-assigned it, pressed restore, and 10 hours later I was protected by parity once more.  I had a window where I was not protected, but it would be weeks until I would add a new drive to replace the failed drive as I had plenty of space and I could shop for a sale price.   My situation was one where I wanted to permanently remove a failed drive.

 

For almost any other situation, where the data on the failed drive is not copied elsewhere, pressing the button would be a very bad thing to do.

 

Joe L.  

 

I sort of agree with the OP in the sense that it isn't as intuitive as I'd have liked. Thanks for the explanation.

 

Please bear with me while I make sure I understand what you're saying and I apologize if I'm going off topic.

 

So let's say I have 4 drives. unRAID will show them as:

 

/disk1

/disk2

/disk3

/disk4

 

If disk3 fails, unRAID will still export the contents but won't protect me in the event of another drive failure.

 

So I would go into /disk3 and copy/move all of the stuff in there to another drive.

 

I would then unassign the drive in unRAID and then physically remove /disk3 from the array and press restore which will now redo parity and life is good again?

 

Correct except you do not need to physically remove the failed drive after you un-assign it (although you probably will to RMA it)

 

However, if you had a spare drive (as big or bigger than the failed drive), you could just replace the failed drive (not un-assign anything), and when you power up unRAID will detect the disk change and ask if you want the old disk's contents to be rebuilt onto the new drive.   Check the "I'm sure" checkbox and press "Start" and the array will build the old contents automatically onto the replacement drive.  There was no need for you to copy anything off of the "simulated" drive before replacing it.   Once the contents are rebuilt you will have parity protection against another drive failure.

 

If your spare/replacement drive is bigger than the existing parity drive, there is a process to swap the failed drive and the parity drive, and then assign the new larger spare drive to the parity slot.   You can find the "parity-swap" process described in the wiki.  You would STILL press the "Start" button and not the one labeled "restore"

 

Joe L.

 

Correct except you do not need to physically remove the failed drive after you un-assign it (although you probably will to RMA it)

 

However, if you had a spare drive (as big or bigger than the failed drive), you could just replace the failed drive (not un-assign anything), and when you power up unRAID will detect the disk change and ask if you want the old disk's contents to be rebuilt onto the new drive.   Check the "I'm sure" checkbox and press "Start" and the array will build the old contents automatically onto the replacement drive.  There was no need for you to copy anything off of the "simulated" drive before replacing it.   Once the contents are rebuilt you will have parity protetion against another drive failure.

 

If your spare/replacement drive is bigger than the existing parity drive, there is a process to swap the failed drive and the parity drive, and then assign the new larger spare drive to the parity slot.   You an find the "parity-swap" process described in the wiki.  You would STILL press the "Start" button and not the one labeled "restore"

 

Joe L.

 

The other scenarios on the wiki seemed clear to me and your explanation above matches my understanding of what I read  ;D.

 

I *THINK* in my case I might actually be using this technique somewhere down the road as I have a few 250GB drives that I'm debating tossing in there until I get around to buying a 1.5TB or 2TB drive. Once that happens, I can see myself actually removing the 250GB drives eventually or just leave them in there until they fail. Like you if I have enough space I probably won't replace the 250GB drives.

 

I guess that begs the next question, assuming you physically had the drives around and the space in your unRAID do people generally just populate the array? ie, It seems to make sense to me that the drive is then sort of doing something, but on the other hand if I don't need the space, seems silly to be burning energy if I don't really need it.

 

  • Author

Exactly, you better hold on new drives until you need them in the array as adding new drives won't do much except provide more capacity.

  • Author

I think that I just successfuly added a new precleared drive to my array. Here is what I have done:

 

I precleared the new drive, stoped the array, added the new drive as new disk device (documenting positions, etc), started the array by checking "Yes, I am sure" checkbox and clicking on the "Start" button. The new disk was shown unformatted and the "Format" button was present, which I've clicked. 20-30 secs later, the new disk was ready do use. No errors shown.

 

Some excerpts from the log:

 

Dec 27 14:13:22 startank kernel: md: disk12 new disk

...

Dec 27 14:14:01 startank emhttp: clearing disk12* ...

Dec 27 14:14:01 startank emhttp: writing mbr on disk 12 (/dev/sdj)

Dec 27 14:14:01 startank emhttp: re-reading /dev/sdj partition table

Dec 27 14:14:01 startank kernel: sdj: sdj1

Dec 27 14:14:02 startank kernel: mdcmd (22): start PROTECTED_EXPANSION

Dec 27 14:14:02 startank kernel: unraid: allocating 69420K for 1280 stripes (13 disks)

...

Dec 27 14:14:03 startank kernel: mdcmd (25): check

Dec 27 14:14:03 startank kernel: md: recovery thread woken up ...

Dec 27 14:14:03 startank kernel: md: recovery thread has nothing to resync

...

Dec 27 14:14:35 startank emhttp: shcmd (142): mkreiserfs -q /dev/md12 >/dev/null 2>&1

Dec 27 14:16:39 startank kernel: mdcmd (52): spindown 12

Dec 27 14:16:51 startank emhttp: shcmd (143): mkdir /mnt/disk12

Dec 27 14:16:51 startank emhttp: shcmd (144): mount -t reiserfs -o noacl,nouser_xattr,noatime,nodiratime /dev/md12 /mnt/disk12 >/dev/null 2>&1

Dec 27 14:16:51 startank kernel: REISERFS (device md12): found reiserfs format "3.6" with standard journal

Dec 27 14:16:51 startank kernel: REISERFS (device md12): using ordered data mode

Dec 27 14:16:51 startank kernel: REISERFS (device md12): journal params: device md12, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

Dec 27 14:16:51 startank kernel: REISERFS (device md12): checking transaction log (md12)

Dec 27 14:16:53 startank kernel: REISERFS (device md12): Using r5 hash to sort names

Dec 27 14:16:53 startank kernel: REISERFS (device md12): Created .reiserfs_priv - reserved for xattr storage.

Dec 27 14:16:53 startank emhttp: resized: /mnt/disk12

Dec 27 14:16:53 startank emhttp: shcmd (145): chmod 700 '/mnt/disk12'

 

I think that I just successfuly added a new precleared drive to my array. Here is what I have done:

 

I precleared the new drive, stoped the array, added the new drive as new disk device (documenting positions, etc), started the array by checking "Yes, I am sure" checkbox and clicking on the "Start" button. The new disk was shown unformatted and the "Format" button was present, which I've clicked. 20-30 secs later, the new disk was ready do use. No errors shown.

 

Some excerpts from the log:

 

Dec 27 14:13:22 startank kernel: md: disk12 new disk

...

Dec 27 14:14:01 startank emhttp: clearing disk12* ...

Dec 27 14:14:01 startank emhttp: writing mbr on disk 12 (/dev/sdj)

Dec 27 14:14:01 startank emhttp: re-reading /dev/sdj partition table

Dec 27 14:14:01 startank kernel:  sdj: sdj1

Dec 27 14:14:02 startank kernel: mdcmd (22): start PROTECTED_EXPANSION

Dec 27 14:14:02 startank kernel: unraid: allocating 69420K for 1280 stripes (13 disks)

...

Dec 27 14:14:03 startank kernel: mdcmd (25): check

Dec 27 14:14:03 startank kernel: md: recovery thread woken up ...

Dec 27 14:14:03 startank kernel: md: recovery thread has nothing to resync

...

Dec 27 14:14:35 startank emhttp: shcmd (142): mkreiserfs -q /dev/md12 >/dev/null 2>&1

Dec 27 14:16:39 startank kernel: mdcmd (52): spindown 12

Dec 27 14:16:51 startank emhttp: shcmd (143): mkdir /mnt/disk12

Dec 27 14:16:51 startank emhttp: shcmd (144): mount -t reiserfs -o noacl,nouser_xattr,noatime,nodiratime /dev/md12 /mnt/disk12  >/dev/null 2>&1

Dec 27 14:16:51 startank kernel: REISERFS (device md12): found reiserfs format "3.6" with standard journal

Dec 27 14:16:51 startank kernel: REISERFS (device md12): using ordered data mode

Dec 27 14:16:51 startank kernel: REISERFS (device md12): journal params: device md12, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30

Dec 27 14:16:51 startank kernel: REISERFS (device md12): checking transaction log (md12)

Dec 27 14:16:53 startank kernel: REISERFS (device md12): Using r5 hash to sort names

Dec 27 14:16:53 startank kernel: REISERFS (device md12): Created .reiserfs_priv - reserved for xattr storage.

Dec 27 14:16:53 startank emhttp: resized: /mnt/disk12

Dec 27 14:16:53 startank emhttp: shcmd (145): chmod 700 '/mnt/disk12'

 

That is exactly what was supposed to happen.  The disk was recognized by its pre-clear-signature as being already cleared, so the clearing step was skipped by unRAID.  Your server "down-time" was minimal.  (only needed to Stop array, assign drive, press "Start" after checking "I'm sure checkbox for "Start", and then, once back on-line, it listed the new disk as "Unformatted" and gave you the button to format the newly added disk. )
  • Author

Cool! Joe, thanks much again!

  • 2 weeks later...

I replaced a 500gb drive with a 1TB drive today (precleared on another pc with the preclear script) but i never got the option to format it, it just started rebuilding when i started the array. Is this normal?

I replaced a 500gb drive with a 1TB drive today (precleared on another pc with the preclear script) but i never got the option to format it, it just started rebuilding when i started the array. Is this normal?

 

Yes, if you are replacing a drive then you will not get the format option as the parity drive rebuilds the ENTIRE drive including the part the format option performs.  The preclear script does nothing for you when replacing a drive other then to stress test the drive that is going to be switched in.

I replaced a 500gb drive with a 1TB drive today (precleared on another pc with the preclear script) but i never got the option to format it, it just started rebuilding when i started the array. Is this normal?

Yes.  It is normal.

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.