April 6, 20242 yr 5 hours ago, gemeit said: Hi I want to remove 5 disks can I run this for 5 disks at the same time or do I need to do it 1 disk at a time Thanks You can do it simultaneously but it will be excruciatingly slow. Why not just remove the disks all at once and rebuild parity one time with the final complement of disks?
April 7, 20242 yr Community Expert 17 hours ago, gemeit said: Hi I want to remove 5 disks can I run this for 5 disks at the same time or do I need to do it 1 disk at a time Thanks It will be faster to clear one disk at a time, or much faster yet, just remove all and re-sync parity.
June 11, 20242 yr On 6/25/2023 at 7:02 PM, dopeytree said: Ok thanks and guess there is only ever the 1 partition? The drive was blank zeroed already and not used so I was able to remove by doing new config. Quick easy. Can you add some detail on how you were able to do a new config? I also have 5 disks I'm trying to remove, all of which were zeroed and 4 of which were never used. Want to try to safely remove the 4 and zero the 5th but not sure how and unraid docs don't provide any guidance.
June 11, 20242 yr On 12/3/2017 at 12:48 AM, JorgeB said: For Unraid 6.12+ type in the CLI: dd bs=1M if=/dev/zero of=/dev/mdXp1 status=progress replace X with the correct disk number I am currently running this script but it is speed limited by the read rate of my slowest drive which is currently about 5MB/s. At this rate it will take 19 days which is unacceptably long. Is there any way to interrupt/cancel this script from running without completing the full clear? Would that impact parity?
June 12, 20242 yr Community Expert 9 hours ago, WobbleBobble2 said: I am currently running this script Which script? Do you mean the command? If yes you can interrupt with CTRL + C
January 23, 20251 yr On 12/3/2017 at 1:48 AM, JorgeB said: I never used the script, it may have issues with latest unRAID, you can still do it manually (array will be inaccessible during the clear): 1. If disable enable reconstruct write (aka turbo write): Settings -> Disk Settings -> Tunable (md_write_method) 2. Start array in Maintenance mode. (array will not be accessible during the clearing) 3. Identify which disk you're removing 4. For Unraid <6.12 type in the CLI: dd bs=1M if=/dev/zero of=/dev/mdX status=progress For Unraid 6.12+ type in the CLI: dd bs=1M if=/dev/zero of=/dev/mdXp1 status=progress replace X with the correct disk number 5. Wait, this will take a long time, about 2 to 3 hours per TB. 6. When the command completes, Stop array, go to Tools -> New Config -> Retain current configuration: All -> Apply 7. Go back to Main page, unassign the cleared device. * with dual parity disk order has to be maintained, including empty slot(s) * 8. Click checkbox "Parity is already valid.", and start the array 7 years later, can we get the docs updated to reflect this? The official docs still says of=/dev/mdX for 6.2 or higher, which leads to being forced to pushing the power button on the server, pulling the drive(s) you want to remove, and doing a rebuild. Granted, it's "legacy" documentation, but it's all we have for info on how to shrink an array.
January 23, 20251 yr Community Expert 17 minutes ago, CGR21 said: Granted, it's "legacy" documentation, but it's all we have for info on how to shrink an array. https://docs.unraid.net/unraid-os/manual/storage-management/#removing-disks
April 17, 20251 yr Hi, i also want to manually clear a disk before removing it, but the disk is actually encrypted. From this list i want to clear the disk2: /dev/mapper/md1p1 on /mnt/disk1 type xfs (rw,noatime,nouuid,attr2,inode64,logbufs=8,logbsize=32k,noquota) /dev/mapper/md2p1 on /mnt/disk2 type xfs (rw,noatime,nouuid,attr2,inode64,logbufs=8,logbsize=32k,noquota) /dev/mapper/md3p1 on /mnt/disk3 type xfs (rw,noatime,nouuid,attr2,inode64,logbufs=8,logbsize=32k,noquota) /dev/mapper/md4p1 on /mnt/disk4 type xfs (rw,noatime,nouuid,attr2,inode64,logbufs=8,logbsize=32k,noquota) /dev/mapper/md5p1 on /mnt/disk5 type xfs (rw,noatime,nouuid,attr2,inode64,logbufs=8,logbsize=32k,noquota) /dev/mapper/md6p1 on /mnt/disk6 type xfs (rw,noatime,nouuid,attr2,inode64,logbufs=8,logbsize=32k,noquota) /dev/mapper/nvme1n1p1 on /mnt/cache type btrfs (rw,noatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/) shfs on /mnt/user0 type fuse.shfs (rw,nosuid,nodev,noatime,user_id=0,group_id=0,default_permissions,allow_other) shfs on /mnt/user type fuse.shfs (rw,nosuid,nodev,noatime,user_id=0,group_id=0,default_permissions,allow_other) /dev/mapper/nvme1n1p1 on /var/lib/docker type btrfs (rw,noatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/) /dev/mapper/nvme1n1p1 on /var/lib/docker/btrfs type btrfs (rw,noatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/) /dev/mapper/nvme1n1p1 on /mnt/cache/system/docker/docker/btrfs type btrfs (rw,noatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/) Is this the correct way to do it: 1. unmount disk2 2. execute this to use the decrypted/mapped device2 instead of the disk2 directly: dd bs=1M if=/dev/zero of=/dev/mapper/md2p1 status=progress
April 18, 20251 yr Community Expert 8 hours ago, sw4280 said: dd bs=1M if=/dev/zero of=/dev/mapper/md2p1 status=progress correct
August 26, 20251 yr On 4/17/2025 at 11:46 PM, sw4280 said:Hi, i also want to manually clear a disk before removing it, but the disk is actually encrypted.Is this the correct way to do it:1. unmount disk22. execute this to use the decrypted/mapped device2 instead of the disk2 directly:dd bs=1M if=/dev/zero of=/dev/mapper/md2p1 status=progressHi there, sorry I have a really silly query, but can you confirm exactly what you mean by "unmount" disk 2 in an explain like I'm five way? I'm only familiar with that exact word as a button in Unassigned Devices so I want to be really clear and not make any assumptions that could cause problems. Essentially I'm intending to do the same as you, zero out an xfs encrypted disk to remove it from the array without breaking parity.
August 26, 20251 yr Community Expert The fact that a disk was encrypted is irrelevant if you are clearing it - the process is identical for both encrypted and unencrypted dtives as you are writing zeroes to every sector on the dtive.
September 28, 20251 yr On 4/7/2024 at 3:39 AM, JonathanM said:You can do it simultaneously but it will be excruciatingly slow. Why not just remove the disks all at once and rebuild parity one time with the final complement of disks?Do you mean the method 1 that is mentioned in spaceinvader one's video?https://www.youtube.com/watch?v=nV5snitWrBkCos I am in the same boat I want to get rid of 4 smaller capacity drive and replace them with a high capacity one. Edited September 28, 20251 yr by Vach
September 28, 20251 yr Community Expert You can use one of the options from here:https://docs.unraid.net/unraid-os/using-unraid-to/manage-storage/array-configuration/#removing-disks
February 5Feb 5 On 9/28/2025 at 10:39 AM, JorgeB said:You can use one of the options from here:https://docs.unraid.net/unraid-os/using-unraid-to/manage-storage/array-configuration/#removing-disksSeems the link is broken - assuming it is now this: Removing disks from array | Unraid DocsIs the "Preserving parity" option still valid for 7.2.3 ? Edited February 5Feb 5 by t33j4y Grammar :-)
February 5Feb 5 Community Expert 6 hours ago, t33j4y said:Is the "Preserving parity" option still valid for 7.2.3 ?Yes.
February 7Feb 7 So, I did this and it worked. However, I expanded the step-by-step instructions to hopefully help others looking for this information. I guess for those who do a lot of server maintenance, things are obvious but it kind of threw me for a bit with the old user script apparently not working and the docs.unraid.net article not having a revision timestamp (so I wasn't able to verify if it was up to date)Also, I removed the unmount part as it didn't make sense, since the disks weren't mounted after removing the file system. So, here goes:To use the parity-preserve methodStart the array in maintenance modeClick on the disk you want to remove, and then click Erase.This erases the file system from the device while maintaining parity, then stop the array.Start the array again and record array assignmentsStart the array in Normal mode. The disk won't mount, but the remaining disks are online.Record array assignments, especially the parity drive (take a screenshot and save it)Optionally enable 'Reconstruct Write' for faster zeroing (but only if all drives are healthy): Go to in Settings → Disk Settings (look for 'Tunable (md_write_method)' and change to 'Reconstruct Write'Zero out the disk using the dd command from a terminal window:Open a terminal window on the Unraid serverTip: If opening terminal from Unraid GUI, as the first thing, type 'tmux' to persist the terminal window as the dd command will abort if the terminal is closed - you can later connect to the same terminal window by typing 'tmux attach') Then enter the appropriate command:For Unraid 6.12 or later: dd bs=1M if=/dev/zero of=/dev/mdXp1 status=progressFor Unraid 6.11 or earlier: dd bs=1M if=/dev/zero of=/dev/mdX status=progress(Replace X with the specific number of the data disk you're removing. If in doubt, use 'lsblk' command in terminal window to identify disks and number. The 'mdXp1' overview will be at the end of the command output)Once the clearing is complete, close the terminal windows and stop the array (from the Unraid GUI)Reset the array configuration, retaining all current assignments:Go to 'Tools' and select the 'New Config' function.Under 'Preserve current assignments', select 'All'Unassign the disk you want to removeGo back to 'Main' windows and unassign the disk you want to removeRemember to double-check all assignments - especially the parity drive (this is where the screenshot of your assignments comes in handy)Scroll down to the section where you can start the arrayCheck the box indicating "Parity is already valid."Start the array to finish the removal.Finishing upIf you enabled 'Reconstruct Write), remember to set it back to 'Auto'Optionally run a correcting parity check afterward to ensure parity integrity.Shut down your server, physcially remove the disk and restart the server.Let me know if this is helpful, anything should be changed or optimized. Edited February 8Feb 8 by t33j4y
August 3Aug 3 I replaced a disk using the standard procedure, but during the rebuild the replacement drive encountered write errors and was dropped from the array.The drive's SMART report looks healthy. I've been experiencing intermittent errors whenever the server is performing parity syncs or rebuilds, so I'm trying to avoid triggering another rebuild until I resolve the underlying issue.At the moment, the disk is being emulated (red X), and the physical drive is unmounted. The data on the emulated disk has already been copied to another server, so I have two copies of it.Can I still perform the shrink array procedure in this state? It seems to me that I should be able to continue from the zeroing step (for the emulated disk).My end goal is to preclear and re-add the disk to the array and then copy the data back onto it.
August 4Aug 4 Community Expert 11 hours ago, Gico said:Can I still perform the shrink array procedure in this state? It seems to me that I should be able to continue from the zeroing step (for the emulated disk).You can, but zeroing a disk still puts stress on the array, may be best to just rsync parity, any errors start a new thread and post the diagnostics.
August 14Aug 14 Hey guys,I just want to doublecheck befor shrinking my array and switching my parity disk. My new parity and data disk are a wd red plus 4 tb.I watched the shrinking array guide. Big thanks to @SpaceInvaderOne !so this is my current setup:my goal:1. change the old parity disk (smr) to a new disk (cmr)change data disk1 and data disk 2 (both smr) for one data disk (cmr)my plan:shut down all docker and vmsuse tool docker new permissionsvia unbalanced: copy all data from disk1 and disk 2 to 1 new data disknew config --> new disk assignment(now im unsure): while server is shut down swap all disks outassign the new data disk and the new parity diskrun paritySo I'm not sure to do both in one step. Changing parity AND data disk.P.S.: Is it possible to change my array fs from xfs zo zfs?I'm glad to get a short feedback from you guys. Thanks in advance Edited August 14Aug 14 by Caspal
August 14Aug 14 Community Expert Add new data disk as disk3. If it isn't precleared Unraid will clear it, they you can format it as xfs or zfs if you want. Not sure of the advantages of zfs in the array. Then move or copy the data from the others however you want. Copy is faster than move and you don't really need to move the data off the original disks since you are removing them anyway. When all data is on the new disk, New Config with the new parity and new data disk as disk1 and without the others. Then let parity build.
August 20Aug 20 On 8/14/2026 at 12:57 PM, trurl said:Add new data disk as disk3. If it isn't precleared Unraid will clear it, they you can format it as xfs or zfs if you want. Not sure of the advantages of zfs in the array.Then move or copy the data from the others however you want. Copy is faster than move and you don't really need to move the data off the original disks since you are removing them anyway.When all data is on the new disk, New Config with the new parity and new data disk as disk1 and without the others. Then let parity build.Thanks! Everything worked just fine. Kept the array in xfs.
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.