FAQ remove drive
An update for v6 users, here are 2 FAQ entries, for removing one drive, or for removing multiple drives. The rest of the page is for v5 or lower.
How do I remove a hard disk that I do not plan on replacing?
- Note: this section is for v5 users!
There are a few reasons you'd want to do this: you want to repurpose the drive for some other reason, or the drive has failed or is failing.
First I'll go over repurposing a working drive.
There are two main steps to this process.
- copy any information off the drive back to your array so you don't lose any data
- reset the array parity
Before proceeding, make sure to take a screenshot of your current drive configuration!
I'm going to do this by example. Here is what my default unRAID web GUI looks like
I've got seven drives. Data drives 1-5, a parity drive, and a cache drive. I'm going to pretend that disk3 (located from the shell at /mnt/disk3) is the drive I want to remove. For my setup, I've got all my files located in user shares (from the shell /mnt/user/TV, for instance). My user shares are all setup as "high water" allocation. If you click on the folder icon, next to "disk3" you'll see if there are any files located on that drive. In my case, there are. I need to copy those files off disk3 (/mnt/disk3) back to my user shares (/mnt/user).
Telnet into your machine and type "mc" into command line. You can use the GUI to easily and safely copy your existing data. If you're a first time MC user press F9 which will bring up the menu and options. If you use a cache drive then simply copy the contents of disk3 to /mnt/cache to prevent duplicate issues. Make sure that you remove disk3 before the 'mover' script has chance to run though!
Another method involves using rsync which would be better if you wanted to only copy the differences between the source and dest dirs. rsync -a /mnt/disk3/ /mnt/user will copy the contents of disk3 to /mnt/user. Use the -n flag to do a dry run.
- Stop the array by pressing "Stop" on the management interface. Un-assign the drive on the Devices page, then return to the unRAID Main page.
- Select the 'Utils' tab
- Choose "New Config"
- Agree and create a new config
- Reassign all of the drives you wish to keep in the array
- Start the array and let parity rebuild
On versions of unRAID prior to 5.0 [Beta ??]
Log in on the system console or via telnet and type the command below to create a new system.dat file and reset the array configuration data.
unRAID will ask you to confirm you wish to set a new disk configuration. you must respond with Yes (capital Y and lower case es)
When the initconfig command is invoked, old parity data will be immediately discarded, and the process of parity calculation on the remaining assigned and working drives will begin when you next start the array. At this point, your array will not be again protected from a disk failure until the system can complete the process of generating new parity information.
UPDATE: A alternative process for removing a drive from the array can be found here. It allows you to remove a drive without losing parity. The tradeoff is that will take much longer.
On versions of unRAID prior to 4.5.4
- Stop the array by pressing "Stop" on the management interface.
- Un-assign the drive on the Devices page
- Return to the Main page and check the checkbox below the Restore button (which is actually a Set Initial Configuration button)
- Then click the Restore button to create a new system.dat file and reset the array configuration data.
When the Restore button is clicked, old parity data will be immediately discarded, and the process of parity calculation on the remaining assigned and working drives will begin. At this point, your array will not be again protected from a disk failure until the system can complete the process of generating new parity information.