Jump to content

Slow DD Zeroing of Drive Being Cleared


Recommended Posts

Posted

I am trying to clear a drive in order to shrink my array. I originally started with the clear drive user script but am now just using dd in a screen.

dd bs=1M if=/dev/zero of=/dev/md5 status=progress

Both the user script (which just ends up running this command AFAICT) and the raw command are progressing extremely slowly, at less than 1 MB/S.

 

Is there some issue with the drive causing this or do I have a misconfiguration elsewhere?

Posted

Nothing obvious in those. Near end of syslog it says

May  6 02:46:37 htpc-sbb clear_array_drive: Clearing Disk 5 is complete
### [PREVIOUS LINE REPEATED 1 TIMES] ###
May  6 02:46:38 htpc-sbb emhttpd: cmd: /usr/local/emhttp/plugins/user.scripts/showLog.php clear_array_drive
May  6 03:40:16 htpc-sbb crond[2646]: exit status 1 from user root /usr/local/sbin/mover &> /dev/null
May  6 11:29:03 htpc-sbb sshd[2467]: Accepted password for root from 10.0.0.6 port 62012 ssh2

But I am guessing that "complete" wasn't really and so you went on to another method.

 

Personally, I would just remove the disk and rebuild parity. Might even be faster.

Posted

Yeah I suspect that clear_array_drive output is premature since I aborted the script when it was running so slow.

Posted

Because the drive was empty I followed the steps in the Shrink Array document to format it first. It's now zero-ing out at a much faster rate.

Posted

Not clear why that would make any difference at all. Formatting a drive just writes an empty filesystem to it. The wiki uses the word "clean" (not the same as "clear") when it talks about a quick way to empty a disk by formatting it. If a disk was already empty, then it has an empty filesystem, whether it was newly formatted to get that way, or whether all files were deleted or moved from it.

 

And the only reason the disk has to be empty is because the script doesn't want you to accidentally clear a disk that has files on it. Doing it with dd as you are it doesn't matter at all what is on the disk.

Posted

Yeah, I also rebooted prior to the format and moved some shares from including all to including specific disks (without the one I am trying to remove from the array).

 

Those are more likely culprits.

Posted

If you had other write activity on the array then of course that would be competing with trying to clear the array disk, since both would be updating parity. The whole point of clearing the md device is so parity will be updated to stay in sync with all those zeros when clearing the disk. Then it can be removed without affecting parity since all the zeros have no effect on parity.

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.

×
×
  • Create New...