Is it possible to disable the parity check completely on dirty shutdown?


theruck
Go to solution Solved by Squid,

Recommended Posts

i would like to disable the parity check.simply because my server rarely runs not doing parity check. i really dont mind running it once in a while but its 2022 so even a dirty reboot is not a problem with todays filesystems. i did like hundreds of non clean shutdowns over the years and the parity check never helped me to do anything. this system can be called a daily parity check instead.  i want the server to conserve energy not to do 9 hours parity checks every day.

even with these settings the parity checks starts on every dirty reboot.

is there a way to disable it? its really annoying to cancel the check and let the server sleep every day.

 

Screenshot 2022-10-18 at 19.46.40.png

Screenshot 2022-10-18 at 19.40.56.png

Link to comment
3 minutes ago, JorgeB said:

You have an unclean shutdown every day?

If so you need to get to the bottom if this. Unclean shutdowns can result in a few (hundred) sync errors, so you want to avoid them. You are thinking about this problem from the wrong end.

 

Sticky topic in this very same subforum:

 

 

 

Link to comment

my use case is that the server is being used only few minutes maybe hour a day and then the server sleeps. then as it sleeps its power is turned off. so its considered dirty. technically its not as the drives are spun down anyway. so it boots and starts parity check which never ends because it takes so many hours and the process repeats anyway. so the parity check preserves the server from sleep because it is active and i want it

to be sleeping when inactive. inactive i mean i dont use it.

and why i dont do shutdown instead of the sleep? its because it boots so long and during the day i need to wake it and sleep it several times for some quick work

i really can solve it with some external automation but honestly such basic thing should  be configurable as there is absolutely no responsibility or warranty from the vendor to my data.

Link to comment
22 minutes ago, theruck said:

then as it sleeps its power is turned off. so its considered dirty.

I used to have an unRAID server that would enter and exit S3 Sleep several times a day and it never resulted in an unclean shutdown.  Now I just run my main server 24x7 and let the disks spin down when not in use.  The other server has IPMI and powers on and off via user scripts when it is needed for backup or other purposes.

 

UnRAID has never officially supported sleep functions because how well it works is highly dependent on the motherboard.  There is an S3 Sleep plugin that many (including you, I assume) use and it works well (with the proper motherboard support); however S3 sleep should not result in the power being turned off and, thus, a dirty unRAID shutdown.

Link to comment

its the electricity that goes off when the server is in sleep mode because there is no way to know if the server is shut down or sleeping

anyway the idea of dirty shutdown was something beyond me as it expects that the data is not in tact while i want it to be the other way around for the reasons i explained above. i understand why the vendor wants it the way it is all

i am looking for is to switch it

for me the data is in tact until proven otherwise so doing a parity check everytime i boot (and i had clean boots wrongly identified as dirty due to mainboards in the past) is just overkill

Link to comment

What causes an automatic parity check on  any reboot/restart is the presence of the forcesync file in the /config folder on the flash/boot drive.  (This file is created when the array starts and is deleted when the array stops.)

 

The way for the OP to avoid this situation is to stop the array before invoking the S3 sleep.   (The sleep process should never cause the computer to powerdown after a period of time has elapsed while in the sleep mode.   If this occurs because power is a frequent event then don't use Sleep.  Shutdown the server down completely.  Or use a UPS and leave the server in an always-on state and let the UPS shut it down if the power fails.)

Link to comment
6 minutes ago, theruck said:

that actualy helps thanks i will check for the file creation and try to delete it before sleep to achieve what i need

It is actually better to actually stop the array.  When the array is stopped, all of the RAM buffers will be cleared by writing their contents to the proper disks.  This guarantees that parity is in sync!

 

Have a look at the CA User Scripts plugin for an easy way to execute scripts with Unraid.  It appears to allow you set it up so that a script will run at a time that you require it to execute. 

Link to comment
Action	Date	Size	Duration	Speed	Status	Errors
Parity-Check	2022-10-18, 21:57:37	4 TB	11 min, 7 sec	Unavailable	Canceled	0
Parity-Check	2022-10-18, 19:47:29	4 TB	4 min, 45 sec	Unavailable	Canceled	0
Parity-Check	2022-10-18, 19:23:39	4 TB	1 hr, 16 min, 55 sec	Unavailable	Canceled	0
Parity-Check	2022-10-18, 16:33:48	25.2 MB	6 hr, 49 min, 22 sec	162.9MB/s	OK	0
Parity-Check	2022-10-16, 22:01:08	4 TB	4 hr, 5 min, 17 sec	Unavailable	Canceled	0
Parity-Check	2022-10-15, 10:09:35	5.1 MB	1 hr, 22 min, 16 sec	810.5MB/s	Canceled	0
Parity-Check	2022-10-13, 11:45:25	4 TB	2 hr, 27 min, 24 sec	Unavailable	Canceled	0
Parity-Check	2022-10-10, 19:14:12	4 TB	4 hr, 35 min, 21 sec	Unavailable	Canceled	0
Parity-Check	2022-10-06, 17:42:08	4 TB	8 hr, 37 min, 33 sec	Unavailable	Canceled	0
Parity-Check	2022-09-30, 10:25:17	4 TB	1 hr, 23 min, 38 sec	Unavailable	Canceled	0
Parity-Check	2022-09-02, 09:19:40	87.8 MB	15 hr, 49 min, 34 sec	70.2MB/s	OK	0
Parity-Check	2022-08-18, 17:52:00	25.5 MB	6 hr, 55 min, 37 sec	160.4MB/s	OK	0
Parity-Check	2022-07-20, 11:17:07	4 TB	1 hr, 30 min, 35 sec	Unavailable	Canceled	0
Parity-Check	2022-06-21, 15:19:47	150 MB	1 day, 16 hr, 49 min, 8 sec	27.2MB/s	OK	0
Parity-Check	2022-06-15, 16:53:03	69 MB	18 hr, 43 min, 30 sec	59.4MB/s	OK	0
Parity-Check	2022-06-13, 10:18:47	56.5 MB	15 hr, 19 min, 53 sec	72.5MB/s	OK	0
Parity-Check	2022-06-10, 16:00:29	15.4 MB	4 hr, 10 min, 2 sec	266.7MB/s	OK	0
Parity-Check	2022-06-10, 11:46:42	4 TB	2 hr, 49 min, 14 sec	Unavailable	Canceled	0
Parity-Check	2022-06-07, 09:42:35	266 MB	15 hr, 49 min, 30 sec	70.2MB/s	OK	0
Parity-Check	2022-05-24, 11:05:18	271 MB	17 hr, 35 min, 10 sec	63.2MB/s	OK	0
-	2022-05-15, 09:22:06	88 MB	15 hr, 52 min	70.0MB/s	OK	0
-	2022-05-14, 09:24:25	59.5 MB	16 hr, 7 min, 54 sec	68.9MB/s	OK	0
-	2022-05-10, 20:07:54	36.6 MB	9 hr, 54 min, 56 sec	112.1MB/s	OK	0
-	2022-05-10, 08:08:54	260 MB	14 hr, 38 min, 48 sec	75.9MB/s	OK	0
-	2022-04-29, 16:54:21	25.5 MB	6 hr, 54 min, 26 sec	160.9MB/s	OK	0
-	2022-04-23, 16:24:33	25.5 MB	6 hr, 54 min, 27 sec	160.9MB/s	OK	0
-	2022-04-16, 16:24:03	25.4 MB	6 hr, 53 min, 57 sec	161.1MB/s	OK	0
-	2022-04-09, 16:36:12	26.2 MB	7 hr, 6 min, 6 sec	156.5MB/s	OK	0
-	2022-04-03, 14:58:55	2 KB	21 hr, 28 min, 48 sec	51.7MB/s	OK	0
-	2022-03-28, 00:26:57	2 KB	6 hr, 56 min, 50 sec	160.0MB/s	OK	0
-	2022-03-20, 16:22:41	2 KB	22 hr, 52 min, 34 sec	48.6MB/s	Canceled	0
-	2022-03-13, 08:21:19	2 KB	14 hr, 51 min, 11 sec	74.8MB/s	OK	0
-	2022-03-06, 07:43:58	2 KB	14 hr, 13 min, 51 sec	78.1MB/s	OK	0
-	2022-02-27, 08:31:19	2 KB	15 hr, 1 min, 12 sec	74.0MB/s	OK	0
-	2022-02-20, 08:52:49	2 KB	15 hr, 22 min, 44 sec	72.3MB/s	OK	0
-	2022-02-14, 09:34:04	2 KB	16 hr, 3 min, 58 sec	69.2MB/s	OK	0
-	2022-01-30, 08:23:18	2 KB	14 hr, 53 min, 12 sec	74.7MB/s	OK	0
-	2022-01-23, 08:50:05	2 KB	15 hr, 19 min, 57 sec	72.5MB/s	Canceled	0
-	2022-01-16, 23:18:23	1 KB	6 hr, 52 min, 50 sec	161.5MB/s	OK	0
-	2022-01-08, 23:36:07	2 KB	6 hr, 54 min, 39 sec	160.8MB/s	OK	0
-	2021-12-28, 18:03:33	1 KB	6 hr, 52 min, 28 sec	161.7MB/s	OK	0
-	2021-12-25, 22:05:12	1 KB	6 hr, 58 min, 30 sec	159.3MB/s	OK	0
-	2021-12-12, 11:27:00	2 KB	17 hr, 56 min, 54 sec	61.9MB/s	OK	0
-	2021-12-09, 19:45:11	1 KB	6 hr, 52 min, 13 sec	161.8MB/s	OK	0
-	2021-12-05, 09:06:44	2 KB	15 hr, 36 min, 39 sec	71.2MB/s	OK	0
-	2021-11-28, 09:04:41	2 KB	15 hr, 34 min, 34 sec	71.3MB/s	OK	0
-	2021-11-21, 08:03:59	2 KB	14 hr, 33 min, 53 sec	76.3MB/s	OK	0
-	2021-11-15, 16:18:10	1 KB	6 hr, 52 min, 49 sec	161.5MB/s	OK	0
-	2021-11-14, 08:57:52	2 KB	15 hr, 28 min, 28 sec	71.8MB/s	OK	0
-	2021-11-07, 00:16:10	2 KB	7 hr, 1 min, 4 sec	158.4MB/s	OK	0
-	2021-10-31, 00:18:41	2 KB	7 hr, 3 min, 34 sec	157.4MB/s	OK	0
-	2021-10-17, 00:14:27	2 KB	6 hr, 59 min, 21 sec	159.0MB/s	OK	0
-	2021-09-11, 23:17:08	1 KB	6 hr, 56 min, 10 sec	160.2MB/s	OK	0
-	2021-09-11, 10:30:07	1 KB	2 hr, 59 min, 59 sec	370.5MB/s	Canceled	0
-	2021-09-05, 00:12:27	2 KB	6 hr, 57 min, 21 sec	159.8MB/s	OK	0
-	2021-08-28, 20:30:33	1 KB	6 hr, 56 min, 30 sec	160.1MB/s	OK	0
-	2021-08-14, 23:09:06	1 KB	6 hr, 54 min, 49 sec	160.7MB/s	OK	0
-	2021-08-01, 00:10:28	2 KB	6 hr, 55 min, 22 sec	160.5MB/s	OK	0
-	2021-07-26, 18:28:10	1 KB	13 min, 4 sec	5.1GB/s	OK	0
-	2021-07-04, 18:13:08	2 KB	1 day, 58 min, 1 sec	44.5MB/s	OK	0
-	2021-06-19, 21:27:28	2 KB	4 hr, 12 min, 22 sec	264.2MB/s	OK	0
-	2021-06-12, 17:56:34	1 KB	6 hr, 57 min, 29 sec	159.7MB/s	OK	0
-	2021-06-07, 17:16:26	-	1 min, 32 sec	Unavailable	Canceled	0
-	2021-05-29, 17:15:08	1 KB	6 hr, 57 min, 45 sec	159.6MB/s	OK	0
-	2021-05-23, 00:13:23	2 KB	6 hr, 58 min, 17 sec	159.4MB/s	OK	0
-	2021-05-15, 16:38:48	1 KB	6 hr, 57 min, 48 sec	159.6MB/s	OK	0
-	2021-05-08, 19:57:41	1 KB	6 hr, 57 min, 37 sec	159.7MB/s	OK	0
-	2021-05-02, 16:42:34	1 KB	1 hr, 17 min, 48 sec	857.1MB/s	OK	0
-	2021-04-18, 09:00:14	2 KB	14 hr, 56 min, 59 sec	74.3MB/s	OK	0
-	2021-04-10, 19:22:04	1 KB	6 hr, 57 min, 2 sec	159.9MB/s	OK	0
-	2021-04-10, 11:21:18	-	20 min, 11 sec	Unavailable	Canceled	0
-	2021-04-07, 14:17:44	1 KB	6 hr, 47 min, 11 sec	163.8MB/s	OK	0
-	2021-04-06, 20:16:19	1 KB	6 hr, 44 min, 25 sec	164.9MB/s	OK	0
-	2021-04-04, 18:16:00	-	6 hr, 53 min, 4 sec	Unavailable	Canceled	0
-	2021-04-04, 10:26:33	-	14 min, 30 sec	Unavailable	Canceled	0
-	1970-01-01, 01:00:00	-	Unavailable	nan B/s	OK	
-	2021-03-30, 20:37:41	3.1 KB	3 hr, 7 min, 34 sec	355.5MB/s	OK	0
-	2021-03-20, 21:42:14	1 KB	9 hr, 13 min, 4 sec	120.6MB/s	OK	0
-	2021-03-06, 20:10:11	1 KB	9 hr, 41 min, 22 sec	114.7MB/s	OK	0
-	2021-02-27, 08:21:10	-	32 sec	Unavailable	Canceled	0
-	2021-02-15, 20:08:47	-	9 hr, 10 min, 3 sec	121.2 MB/s	OK	0
-	2021-02-14, 23:30:27	-	13 sec	Unavailable	Canceled	0
-	2021-02-13, 10:33:36	-	1 hr, 8 min, 40 sec	971.1 MB/s	OK	0
-	2021-02-11, 12:23:22	-	27 sec	Unavailable	Canceled	0
-	2021-02-09, 14:20:16	-	5 hr, 24 min, 16 sec	205.6 MB/s	OK	0
-	2021-02-08, 20:38:18	-	46 sec	Unavailable	Canceled	0
-	2021-02-07, 16:30:40	-	22 hr, 20 min, 54 sec	49.7 MB/s	OK	0
-	2021-01-31, 15:56:11	-	6 hr, 46 min, 3 sec	164.2 MB/s	OK	0
-	2021-01-23, 21:02:02	-	6 hr, 46 min, 24 sec	164.1 MB/s	OK	0
-	2021-01-20, 09:06:44	-	7 sec	Unavailable	Canceled	0
-	2021-01-19, 22:47:12	-	5 hr, 42 sec	221.7 MB/s	OK	0
-	2021-01-16, 19:00:48	-	3 hr, 55 min	283.7 MB/s	OK	0
-	2021-01-15, 12:29:14	-	4 min, 6 sec	Unavailable	Canceled	0
-	2021-01-12, 16:23:35	-	7 hr, 35 min, 2 sec	146.5 MB/s	OK	0
-	2021-01-06, 18:16:40	-	7 hr, 17 min, 13 sec	152.5 MB/s	OK	0
-	2021-01-05, 23:40:26	-	5 hr, 6 min, 37 sec	Unavailable	Canceled	0
-	2020-12-31, 00:26:29	-	8 hr, 47 min, 55 sec	126.3 MB/s	OK	0
-	2020-12-30, 13:49:30	-	3 hr, 41 min, 45 sec	Unavailable	Canceled	0
-	2020-12-30, 10:01:12	-	3 min, 33 sec	Unavailable	Canceled	0
-	2020-12-20, 16:42:27	-	3 hr, 11 min, 59 sec	347.3 MB/s	OK	0
-	2020-12-20, 07:42:27	-	3 hr, 11 min, 59 sec	347.3 MB/s	OK	0
-	2020-12-18, 08:40:26	-	12 sec	Unavailable	Canceled	0
-	2020-12-17, 12:13:16	-	11 hr, 50 min, 10 sec	93.9 MB/s	OK	0
-	2020-12-14, 08:56:53	-	3 min, 21 sec	Unavailable	Canceled	0
-	2020-12-13, 14:38:19	-	12 hr, 30 min, 47 sec	88.8 MB/s	OK	0
-	2020-12-12, 08:33:04	-	6 hr, 45 min, 48 sec	164.3 MB/s	OK	0
-	2020-12-08, 09:11:09	-	8 min, 37 sec	Unavailable	Canceled	0
-	2020-12-08, 08:59:44	-	2 min, 26 sec	Unavailable	Canceled	0
-	2020-12-08, 02:29:36	-	35 min, 52 sec	Unavailable	Canceled	0
-	2020-12-07, 05:59:03	-	1 min, 44 sec	Unavailable	Canceled	0
-	2020-12-07, 00:58:25	-	11 hr, 18 min, 54 sec	98.2 MB/s	OK	0

never any parity problem 78 times OK out of 118 parity checks - others were canceled.

it really has no meaning to run the parity every single time

what do you other ppl do when you have larger drives? i have only 4TB and it usually takes 7 and more hours

Link to comment
1 hour ago, theruck said:

never any parity problem 78 times OK out of 118 parity checks - others were canceled.

it really has no meaning to run the parity every single time

 

It is expected that there will be no errors!!!  That is why the recommendation to run it in the non-correcting mode.  We (the people who run it) do so to try to detect and correct any problems before it results in data loss from the server.  (Remember that you should have a separate backup for any data which is irreplaceable as parity is not a backup!)   IF you do not need the protection that parity provides, then don't assign a parity drive!   IF you do need it, then the parity check assures that it will work when a problem arises that the parity information will allow for a functioning rebuild of a defective/disabled disk.  If you don't completely check it, you don't know that it will work when you really need it.

 

1 hour ago, theruck said:

what do you other ppl do when you have larger drives? i have only 4TB and it usually takes 7 and more hours

 

There is a Parity Check Tuning plugin that will run the check when the server is idle.  you can read about it here:

 

       https://forums.unraid.net/topic/78394-plugin-parity-check-tuning/#comment-726565

 

I do not use it on my Testbed server which has a 3TB parity size but I do use it on my Media Server with 6TB parity.   On the latter server, it takes two overnight sessions to complete the check. 

 

EDIT:  Please realize that a parity check can find problems other than a discrepancy in the parity calculation.  It will verify that every byte on every disk in your array can be read.  It verifies that each disk is functioning so that it can read every byte.  (If there is an issue with a disk, it will usually be flagged in the SMART data.  And the Notification option will notify you if any problem is detected in the SMART data.   You should have that setup.  Mine sends me an e-mail everyday from both servers.  I am always happy to be able to delete them because it has not found a problem!)  BTW, there is not evidence that reading and writing to a hard disk materially affects its life span. 

Edited by Frank1940
Link to comment

many of those were caused by unraid itself as it never did a proper shutdown in the previous versions in 2020 with my motherboard and recently its the unclean from suspend to shutdown due power loss as described above

and the s3 sleep does not do its job even today properly as the inactivity measurements are so vague

Link to comment
15 minutes ago, theruck said:

if you have unclean shutdown 100 times and the parity is always 0 errors after the check i would say that the shutdown was not so unclean and it should be addressed more precisely as it has been just 700hours of hard drive and power  over-usage

You are overlooking that fact that the only way to know if there was an error caused by the unclean shutdown, is to run the parity check. If you do not run the parity check, you are guessing.

I live in a place that has power blips multiple times per week. My server lives on an UPS. I don't have unclean shutdown very often because the UPS handles the power blips for me.

You're trying to fix the symptom and are ignoring the problem. Literally every person who has responded to you is saying the same thing.  But you don't have to listen to anyone else - its your system, so do what you want to it.

Edited by whipdancer
  • Like 1
  • Upvote 1
Link to comment

i am not overlooking the fact, the vendor is overlooking the fact that this behaviour should be configurable because i have proof that the vendor is 100% of the checks wrongly assuming the parity is not in tact.

Plus you are overlooking the fact that this is about the possibility to disable the incorrect assumption and not about giving me advices to buy an UPS which btw just proves you have not read the topic as it is about energy conserving and quick wake posibility not about electricity interruption. So if you have nothing to say to the topic of disabling parity check on dirty reboots and want to promote UPS usage just do it in different topic please.

Or maybe you can try to explain how can a parity not be in tact on a spun-down drive. That would actually help.

Link to comment
2 hours ago, Kilrah said:

We do not do unclean shutdowns.

 

Parity check is a thing you run once every few months and no error should be found, takes about 24h for me and then I can forget about it until 4 months later. 

this is fine if you run your server 24/7 which has been explained above is not my case

Edited by theruck
Link to comment
3 hours ago, Frank1940 said:

If you don't completely check it, you don't know that it will work when you really need it.

this is same like you run the parity check today and it is OK then you have a hard drive failure a month later you do not know that the parity is still OK and would need to confirm it with a check. Its only assumption that the parity is OK same as i want it with my "dirty" reboot though there is nothing dirty about my reboot as the drives are already spun down and disconnected from power.

 

Link to comment
On 10/18/2022 at 10:23 PM, Frank1940 said:

This file is created when the array starts and is deleted when the array stops

do you know how it gets created? it does not exist then afeter dirty reboot it is created based on some logic by some process which detects the shutdown was not clean even before the array is started

Link to comment

please correct me if i am wrong

 

power loss on the S3 suspended system.

if unraid does assume

S3 -> no power = bad parity

then it is equivalent to assuming that the

S3 = bad parity

because there is no difference for the spun down drive if it was spun down and disconnect with or without RAM being populated or not

i have tested it during writes and if you S3 sleep during an intesive write operation the S3 takes longer because of the data being written to the drives

if we assume that the parity is OK and we write to the drive and do S3 sleep we can assume that the parity drive is written correctly. any process writing to the drive would fail the write on the S3 suspend event anyway and will never be resumed writing on the wake so what is on the data drive is written to the parity as well and the write operation will fail on the process level which has nothing to do with parity integrity.

hence the reason why i had never a parity error on those 78 dirty reboots because they all happen on an S3 suspended state.

 

 

 

Link to comment
29 minutes ago, theruck said:

please correct me if i am wrong

Any time the server was powered off without the array being stopped = unclean shutdown. That's it. It's not possible for the system to know why the array was not stopped, it can be "safe" or not, and it cannot know if it was unless it does a check.

 

So never power off without stopping array or issuing the power off command, which does just that.

Edited by Kilrah
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.