• [6.12] Shrink Array: The "Clear Drive Then Remove Drive" Method


    madejackson
    • Closed

    Unfortunately, with 6.12 it is not possible anymore to replace a drive while keeping parity intact. The corresponding script or the manual command "dd bs=1M if=/dev/zero of=/dev/mdX status=progress" does nothing in regard of writing zeros to the drive. The script doesn't recognize the error and "thinks" it has finished correctly.

     

    corresponding docs entry: https://docs.unraid.net/de/legacy/FAQ/shrink-array#the-clear-drive-then-remove-drive-method

     

    Log of script:

    *** Clear an unRAID array data drive *** v1.4
    
    Checking all array data drives (may need to spin them up) ...
    
    Found a marked and empty drive to clear: Disk 2 ( /mnt/disk2 )
    * Disk 2 will be unmounted first.
    * Then zeroes will be written to the entire drive.
    * Parity will be preserved throughout.
    * Clearing while updating Parity takes a VERY long time!
    * The progress of the clearing will not be visible until it's done!
    * When complete, Disk 2 will be ready for removal from array.
    * Commands to be executed:
    ***** umount /mnt/disk2
    ***** dd bs=1M if=/dev/zero of=/dev/md2
    
    You have 60 seconds to cancel this script (click the red X, top right)
    
    Unmounting Disk 2 ...
    Clearing Disk 2 ...
    dd: error writing '/dev/md2': No space left on device
    1+0 records in
    0+0 records out
    0 bytes copied, 0.000486246 s, 0.0 kB/s
    
    A message saying "error writing ... no space left" is expected, NOT an error.
    
    Unless errors appeared, the drive is now cleared!
    Because the drive is now unmountable, the array should be stopped,
    and the drive removed (or reformatted).
    Script Finished Jun 19, 2023 09:22.50
    
    Full logs for this script are available at /tmp/user.scripts/tmpScripts/Shrink Array/log.txt

     




    User Feedback

    Recommended Comments



    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
    Add a comment...

    ×   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.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.