May 1, 20251 yr Hi all, I've been putting together a secondary server (6.12.13 - I'm a slow adapter), just about got it where I wanted it when an unfortunate situation caused that server to lose power, and so now it's in "unclean shutdown" mode. Now, I had basically just finished a parity check, and no writes had been made after that check completed. I use XFS exclusively and I know for a fact all the disks were spun down. Another parity check at this point would cost me two days that I can't really spare right now. I don't believe there is any realistic chance of a data issue here. I'm thinking the simplest/easiest way around this is to just start a parity check and then cancel it. Am I wrong? Any other suggestions? Thanks! Edited May 1, 20251 yr by jhyler
May 3, 20251 yr Author JorgeB, i appreciate your reply. I find it vaguely terrifying. If you mean "there could be a few sync errors" in the sense that any Unraid system anywhere, at any time, might have a few sync errors noboby knows about, I agree with you. Undetected (as yet) hardware failures, as-yet undetected system software errors, the stray cosmic ray, sure. OTOH, if you mean there is something in my situation that raised the likelihood of errors, I am both terrified and confused. Here we have disks that have just passed a parity chack (with no errors found or corrected), no other disk activity had occurred since (no sharing or network), the disks had long since spun down and entered their low-power state, no VMs at all, the only Docker container (and Docker itself) is configured to not use the array. Please explain what you think might be a cause of parity errors. Perhaps I can ask it this way - suppose, instead of power failing, I had gone to the console and entered a powerdown command. (Or via gui, if you prefer). What would those powerdown actions have done to prevent any parity errors that you think might have sneaked in, and what commands could I have entered to do the equivalent, without actually powering down? Thanks! Edited May 3, 20251 yr by jhyler
May 4, 20251 yr Community Expert I have had the same situation as you have experienced with an unclean shutdown due a power loss. In my (few) cases, I have allowed the parity check to run to completion. (No failures.) You do realize that the parity check is a background operation and you can use your server as normally but there will be a performance hit. What I think can happen is that parity is that last thing written and it has the least resistance to data loss/corruption due to unplanned shutdowns. XFS has a journaling feature and I understand that the journal is always replayed at server startup. This can repair some errors on the XFS disks that occur with unclean shutdown but (apparently) between the unclean shutdown and the replay of the journal, parity can get out of the sync. So a check is always the best policy. If it does not find anything, that is good news. If it does, the standard recommendation is to rebuilt parity. (That way if there is a disk failure, the rebuild of that failed disk will restore its contents to its original state. Without the parity update, the rebuilt contents would be a corruption of the original data!) Edited May 4, 20251 yr by Frank1940 Left out bold-faced "not"
May 4, 20251 yr Community Expert 11 hours ago, jhyler said: What would those powerdown actions have done to prevent any parity errors that you think might have sneaked in With would sync the filesystems and unmount them before shutdown.
May 4, 20251 yr Community Expert 39 minutes ago, JorgeB said: With would sync the filesystems and unmount them before shutdown. A normal shutdown Without that the writes that would happen to the parity drive during the unmount steps in the normal shutdown would not have happened. In your case you had an unclean shutdown so there is no guarantee that all such writes completed to both the parity drive and the data drive.
May 4, 20251 yr Community Expert 13 hours ago, jhyler said: the disks had long since spun down and entered their low-power state If that was really the case then you'll be fine, just need to be certain it was to assume no parity errors.
May 4, 20251 yr You could start a parity check that you would pause and resume as you use the machine until its complete, if you have certain hours of the day where you need it less.
May 5, 20251 yr Author 16 hours ago, JorgeB said: With would sync the filesystems and unmount them before shutdown. Hmmm. So let's suppose I wrote somthing so that X amount of time after all the disks spin down, all the disks are synced, unmounted, remounted, then spun down again. Would you then think that under the same circumstances as before (basically nothing happening) that a subsequent loss of power would not result in parity errors? I would have thought the risk would be the same either way. (I'm not trying to argue with you, btw - I'm just trying to understand the situation as best I can). Thanks for your help!
May 5, 20251 yr Community Expert @jhyler try Googling Linux delay writes and read a few of the posts. I first encountered this back in the mid 1990's when MS introduced it into Windows. (Many of us turned it off initially as Windows was so unstable that lost data was a weekly occurrence due to the frequency of OS crashes. I had MS Word setup to do a complete save of the entire document every 15 minutes! And when those saves happened Word was virtually unusable due to the latency in the display of keystrokes.) Edited May 5, 20251 yr by Frank1940
May 5, 20251 yr Community Expert It can be OK, but I cannot say 100% certain it will be; hence, I would still recommend doing a parity check.
May 5, 20251 yr Community Expert 6 hours ago, jhyler said: So let's suppose I wrote somthing so that X amount of time after all the disks spin down, all the disks are synced, unmounted, remounted, then spun down again. Would you then think that under the same circumstances as before (basically nothing happening) that a subsequent loss of power would not result in parity errors? I would have thought the risk would be the same either way Good chance that there would be no issue. I think that if the disks are still mounted at the time of the unclean shutdown then a few sectors near the beginning that hold the mount status may need correcting, but that the actual data is almost certainly fine. In such a case letting the parity check start and letting it run for a few minutes and then cancelling it is probably all that is required.
May 6, 20251 yr Author I'd like to thank everybody who responded; I think I have a better understanding of what went on now. And now, for those who remember Paul Harvey, here is "the rest of the story". I didn't want this part to distract from my main question, so didn't mention it before. After power was restored, I started the system to confirm that it would be complaining of an unclean shutdown, which it was. Before I could get around to doing anything about it, I got a call for help and had to leave for a couple of days. So I pressed the power button to turn the system off again (cleanly) and left. When I finally returned and powered the system on again, it came right up. It didn't mount the disks, but it wasn't complaining about unclean shutdowns anymore either. The array started on command with no issue. Has anybody heard of unclean shutdowns just going away like that? Could the "I am unclean" flag have been reset by the clean shutdown of an unclean array? Edited May 6, 20251 yr by jhyler
May 6, 20251 yr Community Expert 3 minutes ago, jhyler said: Could the "I am unclean" flag have been reset by the clean shutdown of an unclean array? Yes, I would expect that.
May 6, 20251 yr Community Expert 1 hour ago, jhyler said: Could the "I am unclean" flag have been reset by the clean shutdown of an unclean array? Correct, it only checks the previous shutdown.
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.