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.

Help with changing Parity disk

Featured Replies

Hello,

 

Just bought another disk to extend the array. So I plugged it in, started unRaid, activated it as the new number 3 disk in "Devices" page. But then I changed my mind and decided to use this new fresh disk as the Parity disk and the old parity disk as the number 3 disk instead. I swapped the disks, booted unRaid and changed the Parity drive to the new drive. But at the "Home" page, the system still expects the old parity disk, even though I have configured the system to use the new drive. It doesn't let me start the array, since the "Start" button is grayed out.

 

So how do I make the system to just forget about the old Parity drive and use the new one instead?

 

Running unRAID Server Pro, version: 4.5.6

 

 


parity ST31500341AS_9VS3SNTA 41°C 1,465,138,552 - - - -

ST31500341AS_9VS39LK1 1,465,138,552

 

disk1 ST31500341AS_9VS39L05 42°C 1,465,138,552 - - - -

 

disk2 ST31500341AS_9VS14ACX 41°C 1,465,138,552 - - - -

 

disk3 Missing - - - - - -

ST31500341AS_9VS3SNTA 1,465,138,552

 

 

Command area

==========================================================================

(*) Stopped. Invalid configuration. [Refresh][Start] Too many wrong and/or missing disks!

 


 

 

In wait for a reply on my posting here, I've put the original Parity disk back again. I didn't put the new disk 3 back again. Booted and changed the configuration in the "Devices" page. Started the Array after ticked "Yes" in the tickbox. The Parity disk is now green and turned on. But now it says the missing disk 3 is Not Formatted. And a grayed out button [Format] is shown an the text:

"Format will create a file system in all Unformatted disks, discarding all data currently on those disks."

Waiting for me to confirm with clicking "Yes" in the tickbox.

 

Should I format a drive that isn't present?

 

/Peter

Believe it or not, you can, since the array is currently acting as if disk3 had failed.

 

You are not protected from a disk failure at this time.  You are operating in a degraded mode with parity and the other drives simulating the missing drive.

 

You will need to use the "initconfig" command to have it forget the fact you had assigned disk3.

 

To do that, log in on the system console, or via telnet as "root"

 

Then type

initconfig

It will set a new initial configuration based on the currently assigned and working disks.  The initconfig command also immediately invalidates parity, since parity will need to be re-calculated on the new disk configuration.

 

Then you can continue as before.  When you boot the system after issuing the "initconfig" command, the data disks will all be green, the parity disk will be orange, and when you press "Start" the array will begin a new parity calculation onto the parity disk.

 

Once parity is calculated, be sure you then also do a parity "Check," since writing parity to the new parity drive does not test if it can be subsequently read back.  Yo'll only know it is OK after a successful parity "Check"

 

If you have the time, use the preclear_disk.sh script on the parity drive before assigning it to the array.  It will exercise the disk and help to weed out any early mechanical problems with a drive.

 

Joe L.

 

  • Author

Thanks, Joe the Savior! :)

 

I tried your script on the new drive, started yesterday morning. I started the script with:

 

preclear_disk.sh /dev/sdd

 

The it ran through all 10 passes with "Done" on each. Then it started to read the other disks (sdb and sdc). I canceled after 58% when it where on to my Disk2 (sdc), with fear for something had gone wrong and it was wiping the data. Maybe I should've removed the other drives for safety and just have new disk inserted.

 

What is your recommendation on this? Are my files on my current disk 100% safe after running "initconfig"?

 

 

 

Thanks, Joe the Savior! :)

 

I tried your script on the new drive, started yesterday morning. I started the script with:

 

preclear_disk.sh /dev/sdd

 

The it ran through all 10 passes with "Done" on each. Then it started to read the other disks (sdb and sdc). I canceled after 58% when it where on to my Disk2 (sdc), with fear for something had gone wrong and it was wiping the data. Maybe I should've removed the other drives for safety and just have new disk inserted.

 

What is your recommendation on this? Are my files on my current disk 100% safe after running "initconfig"?

Preclear will never operate on a disk in the array, or operate on disks other than the one you specify on the command line.

I'm a bit confused.    Where did you see it working on the "other" disks? 

 

If you did run it on a disk that is not assigned to your array, and not mounted, and you did answer "Yes" to the confirmation prompt, then it would operate on that drive.  Since the first phase is simply reading the disk, odds are you are OK...

 

What exactly did you type to start the preclear_disk.sh script? 

 

Joe L.

  • Author

I typed:

 

preclear_disk.sh /dev/sdd

 

I had 4 disks connected to the mainboard's SATA jacks.

Disk 1 (sda) = parity

Disk 2 (sdb) = Data Disk 1

Disk 3 (sdc) = Data Disk 2

Disk 4 (sdd) = Data Disk 3 which was unitialised.

 

I also ran the system as "Basic", with no Pro Key saved in config folder on the USB flash. So the system were maximized on the disk count, while still having an extra disk (out of the unRaid Basic license) when I started the script.

 

  • Author

Hi Joe!

 

The initconfig worked fine. I re-ran the preclear_disk.sh script with only one drive connected. Man... 22 hours for 1.5TB!! :P

Seems like a good idea to have an older computer dedicated for preclearing disks! :)

Anyway... Here is the status from preclear:

 

===========================================================================

=                unRAID server Pre-Clear disk /dev/sda

=                       cycle 1 of 1

= Disk Pre-Clear-Read completed                                 DONE

= Step 1 of 10 - Copying zeros to first 2048k bytes             DONE

= Step 2 of 10 - Copying zeros to remainder of disk to clear it DONE

= Step 3 of 10 - Disk is now cleared from MBR onward.           DONE

= Step 4 of 10 - Clearing MBR bytes for partition 2,3 & 4       DONE

= Step 5 of 10 - Clearing MBR code area                         DONE

= Step 6 of 10 - Setting MBR signature bytes                    DONE

= Step 7 of 10 - Setting partition 1 to precleared state        DONE

= Step 8 of 10 - Notifying kernel we changed the partitioning   DONE

= Step 9 of 10 - Creating the /dev/disk/by* entries             DONE

= Step 10 of 10 - Testing if the clear has been successful.     DONE

= Disk Post-Clear-Read completed                                DONE

Disk Temperature: 41C, Elapsed Time:  22:06:39

============================================================================

==

== Disk /dev/sda has been successfully precleared

==

============================================================================

S.M.A.R.T. error count differences detected after pre-clear

note, some 'raw' values may change, but not be an indication of a problem

54c54

<   1 Raw_Read_Error_Rate     0x000f   117   099   006    Pre-fail  Always       -       150657578

---

>   1 Raw_Read_Error_Rate     0x000f   115   099   006    Pre-fail  Always       -       99100030

58c58

<   7 Seek_Error_Rate         0x000f   100   253   030    Pre-fail  Always       -       86871

---

>   7 Seek_Error_Rate         0x000f   100   253   030    Pre-fail  Always       -       178033

64,66c64,66

< 189 High_Fly_Writes         0x003a   093   093   000    Old_age   Always       -       7

< 190 Airflow_Temperature_Cel 0x0022   062   054   045    Old_age   Always       -       38 (Lifetime Min/Max 31/38)

< 195 Hardware_ECC_Recovered  0x001a   048   034   000    Old_age   Always      

---

> 189 High_Fly_Writes         0x003a   089   089   000    Old_age   Always       -       11

> 190 Airflow_Temperature_Cel 0x0022   059   054   045    Old_age   Always       -       41 (Lifetime Min/Max 31/44)

> 195 Hardware_ECC_Recovered  0x001a   054   034   000    Old_age   Always      

70,72c70,72

< 240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       221551592996884

< 241 Unknown_Attribute       0x0000   100   253   000    Old_age   Offline      -       2930770272

< 242 Unknown_Attribute       0x0000   100   253   000    Old_age   Offline      -       2631707764

---

> 240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       267267224895530

> 241 Unknown_Attribute       0x0000   100   253   000    Old_age   Offline      -       1566712619

> 242 Unknown_Attribute       0x0000   100   253   000    Old_age   Offline      -       1205350435

============================================================================

root@Tower-001:/boot#

 

Seems like the disk passed!

Hi Joe!

 

The initconfig worked fine. I re-ran the preclear_disk.sh script with only one drive connected. Man... 22 hours for 1.5TB!! :P

Seems like a good idea to have an older computer dedicated for preclearing disks! :)

 

Seems like the disk passed!

A typical fast SATA disk can be read at 75 to 120 MB/s on the outer cylinders, 65 to 40 MB/s on the inner ones.  If you use 100 MB/s for calcs it will take 10 seconds per Gigabyte, 15000 seconds for 1500 Gigabytes. 

 

15000 seconds = 250 minutes = 4.16 hours.   

 

Minimum time to pre-read and post-read would then be over 8 hours.  Both the pre-read and post-read processes read many random sectors in addition to a linear read of all the sectors. They also read the first and last block on the disk for every linear sector.  Basically they specifically are designed to keep the disk heads seeking from track to track far more than usual to detect any mechanical problems before you put the disk in your array. 

 

The comments in the code state:

    # read a random block.

 

    # read the first block here, bypassing the buffer cache by use of iflag=direct

 

    # read a random block.

 

    # read the last block here, bypassing the buffer cache by use of iflag=direct

 

    # read a random block.

 

    # Now, also read the blocks linearly, from start to end, $bcount cylinders at a time.

 

So... we are actually reading the disk 6 times in the pre-read, and 6 times in the post-read.

 

Now... the disk buffer cache will help for some of these so the physical disk will not need to be accessed.  If we assume it is not involved then we need to use 15000 seconds * 6.

 

Writing a disk is always slower but we can pretend we can write it at 100 MB/s.  That makes it 15000 seconds * 7. 

 

So... 15000 * 7 = 105000 seconds = 1,750 minutes = 29.1 hours.

 

Looks to me as if your disk did better than my estimate in speed.  Congratulations.

 

Joe L.

 

  • Author

 

Looks to me as if your disk did better than my estimate in speed.  Congratulations.

 

Joe L.

 

 

Thanks! :)

BTW...

Can I save files to the array during a Parity Sync Check? Or will it ruin the parity data syncing?

 

 

Looks to me as if your disk did better than my estimate in speed.  Congratulations.

 

Joe L.

 

 

Thanks! :)

BTW...

Can I save files to the array during a Parity Sync Check? Or will it ruin the parity data syncing?

 

You can use the array.  If the array is started and on-line, parity will always be in sync regardless of what you do. 

 

The only effect is it will cause the disks heads to seek from where they are reading/writing to access the files you are otherwise reading and writing.  There is no problem with this, but it will slow down the parity sync a tiny bit as the disk heads must seek from track to track.

 

Joe L.

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.