July 26, 200817 yr I have 1 hour until I need access to my array. (Friends coming over) My newly installed 1 TB drive is being cleared and is 51% done. I'd say it's been clearing for 90-120 minutes so far. Is there a way to stop the clearing now, safely, and to restart the array? What's the best way to do that? I don't mind if the clearing has to start from scratch later - I can run it overnight if need be. Any help appreciated. Thanks in advance.
July 27, 200817 yr Author OKay, the urgency is gone. We just watched a movie from a disk (gasp) and talked (double gasp)! Still, if anyone knows the answer it would be good to share.
July 27, 200817 yr I suspect most of us saw it too late to help. Plus, we knew there was no quick easy answer, it would take some careful thought, because the wrong step given could initiate a parity check or sync, counter-productive to video playback. Most of us don't clear drives that often, and I can't remember exactly what state the array is in, or what stop/pause options are visible, or what options will appear afterward. I think the answer will be something like: Stop the clearing Make sure unRAID array is Stopped (I can't remember what state it is in) Check Devices tab, make sure new drive(s) unassigned At console, type Tom's recently suggested command to avoid a parity rebuild (see this) Start the array Allow parity check to run for 5 minutes, to cover file system areas (where most changes might have occurred) Abort the parity check A full parity check should be run later, when time is available, and BEFORE new drive is added again. You *may* get away with not doing the check, but I would not want to take the chance. Edit: The above suggested procedure is untested. In-the-field testing and confirmation would be welcomed!
July 27, 200817 yr I too saw your request for help, but about 5 or 6 hours after you posted it. I can only guess at the best procedure... but here goes. I'm going to guess that it is emhttp that is involved in clearing the drive. You would need to stop that process. On the other hand, you want to also shut down the array cleanly (although thinking about it, it might already be shut down (stopped)) As described. You could log in and type: /root/mdcmd status | grep mdState If the status = 'STOPPED" or something like that... good. If not, you might try typing /root/samba stop Samba is probably not running while you are clearing a drive, but, can't hurt. Then, type: for i in /dev/md* umount $i done now type /root/mdcmd stop Now, if the aray is stopped, then you can just kill emhttp killall -9 emhttp That will kill it, and kill the clearing process. Then, using your favorite editor, edit /boot/config/disk.cfg to delete the line affiliated with the disk being cleared. (It might not be there yet... if not, just as well) Lastly, reboot the server by typing: reboot Odds are good you will reboot and come up online without a parity check being needed, but this is all entirely untested. Worst case scenario I can think of is a parity check is needed. I'd experiment with the procedure BEFORE I'm minutes from having guests arrive to watch a movie on the server. Like you, I have all my original DVDs, so we usually watch the DVD anyway when having guests over. Joe L. PS. You can stop the array, save a copy of "disk.cfg" and "super.dat" and then try the experiment. If it comes up wanting to do a full parity calc, because the disk.cfg is wrong, or the super.dat file does not indicate a clean stop, stop the array once more, put back the saved copies of disk.cfg and super.dat and restart. Since they were saved with the array cleanly stopped, a parity check will not be needed.
July 28, 200817 yr Author The whole problem started because of a false assumption that I made. I assumed that once I assigned the drive in 'Devices' that I'd be prompted to clear the disk when I returned to 'Main'. I know in 'Devices' it says changes take place immediately, but I figured that only applied to the assignment. I was a bit surprised to see the disk start clearing automatically, and that there was no 'cancel' button around on the main page.
July 28, 200817 yr The whole problem started because of a false assumption that I made. I assumed that once I assigned the drive in 'Devices' that I'd be prompted to clear the disk when I returned to 'Main'. I know in 'Devices' it says changes take place immediately, but I figured that only applied to the assignment. I was a bit surprised to see the disk start clearing automatically, and that there was no 'cancel' button around on the main page. I'm pretty certain that the entry is immediately written to disk.cfg, but also pretty certain that you had to return to the main screen and check the checkbox indicating you wanted to format (and clear) the newly added drive. Once checked, and "Format" pressed, then it started the clearing process. All that said, I've not added a drive on the latest release... but the behavior should not have changed. Joe L.
July 29, 200817 yr Author The whole problem started because of a false assumption that I made. I assumed that once I assigned the drive in 'Devices' that I'd be prompted to clear the disk when I returned to 'Main'. I know in 'Devices' it says changes take place immediately, but I figured that only applied to the assignment. I was a bit surprised to see the disk start clearing automatically, and that there was no 'cancel' button around on the main page. I'm pretty certain that the entry is immediately written to disk.cfg, but also pretty certain that you had to return to the main screen and check the checkbox indicating you wanted to format (and clear) the newly added drive. Once checked, and "Format" pressed, then it started the clearing process. All that said, I've not added a drive on the latest release... but the behavior should not have changed. Joe L. I believe you're right, but the absence of a cancel button was what threw me off. I thought I could guage how long the operation would take, and then cancel if it looked like it'd be too long.
July 29, 200817 yr The whole problem started because of a false assumption that I made. I assumed that once I assigned the drive in 'Devices' that I'd be prompted to clear the disk when I returned to 'Main'. I know in 'Devices' it says changes take place immediately, but I figured that only applied to the assignment. I was a bit surprised to see the disk start clearing automatically, and that there was no 'cancel' button around on the main page. I'm pretty certain that the entry is immediately written to disk.cfg, but also pretty certain that you had to return to the main screen and check the checkbox indicating you wanted to format (and clear) the newly added drive. Once checked, and "Format" pressed, then it started the clearing process. All that said, I've not added a drive on the latest release... but the behavior should not have changed. Joe L. I believe you're right, but the absence of a cancel button was what threw me off. I thought I could guage how long the operation would take, and then cancel if it looked like it'd be too long. Writing every byte of a 1T drive will take many hours. I'm not sure if unRAID writes progress messages to the syslog as it clears the drive... I seem to remember it does. In any case, I knew for sure it was going to be done way after your guests arrived. At one point Tom said he would make available a utility program he wrote to pre-clear a drive, and to mark it in a way that indicated it had been pre-cleared so the clearing step could be bypassed. He has never posted the utility. (Tom, if you are reading this... please add it to your to-do-list.) It would be nice to have, although the ability to use it on the wrong drive is SO huge... it might not be worth it. In any case, it would be really nice if the disk.cfg file was not immediately updated, but the unRAID array started while the clearing process occurred. Then, after the clearing process completed, the new drive added to disk.cfg and the array and then formatted. The array would only be off line for a few minutes, if that, instead of many hours. It would make it easier on your guests... Joe L.
August 1, 200817 yr Author What would be amazing would be a windows (and Mac and Linux) utility that could clear disks for unRAID and mark them so. Then there'd be little chance of clearing the wrong disk, if the disk is to be mounted once the utility is running (so previously mounted disks are immune from clearing). You'd have to use a USB/eSATA connection to achieve this, but that's more convenient than internally installing a disk just to clear it. One could then transfer the disk to one's server box and it'd be ready to use. No downtime for either machine - the unRAID box, or the one doing the clearing.
Archived
This topic is now archived and is closed to further replies.