Reducing Number of Drives in Array


22 posts in this topic Last Reply

Recommended Posts

Just a word of caution.  If there is data on that drive you want to take out, you are responsible for copy it off of that drive to a safe place.  You can copy it off to another drive over the network or onto a USB drive.  A second option to copy the data to another disk that is on the array.  This is a disk-to-disk copy!  (Never copy from an array disk to a User Share!!!!!)

 

The reason that I am cautioning you is that another user lost data recently when he did not realize the the 'New Config' utility  did NOT preserve the data on the drive being removed!

Link to post
  • 1 month later...

Just a word of caution.  If there is data on that drive you want to take out, you are responsible for copy it off of that drive to a safe place.  You can copy it off to another drive over the network or onto a USB drive.  A second option to copy the data to another disk that is on the array.  This is a disk-to-disk copy!  (Never copy from an array disk to a User Share!!!!!)

 

The reason that I am cautioning you is that another user lost data recently when he did not realize the the 'New Config' utility  did NOT preserve the data on the drive being removed!

 

The drives I am considering removing have 33.8MB on them. When I view the disk from the GUI it tells me there is a folder called "Parent Directory" with 0 objects, directories and files. I presume the 33.8MB is unRAID config information.

 

Reading the wiki for Shrinking the array I think I follow the the "Clear Drive Then Remove Drive" method?

Link to post
  • 2 weeks later...

So I have tried that and it doesn't work. The folder is created on the drive but the script reports "Checked 5 drives, did not find an empty drive ready and marked for clearing".

 

I followed this step "One quick way to clean a drive is reformat it! To format an array drive, you stop the array and then on the Main page click on the link for the drive and change the file system type to something different than it currently is, then restart the array. You will then be presented with an option to format it. Formatting a drive removes all of its data, and the parity drive is updated accordingly, so the data cannot be easily recovered." as per the Shrink Array guide.

 

However after I format the drive there is a folder called "Parent Directory". It appears regardless of the FS I select.

 

At the moment, the drive has two folders, "Parent Directory" and "clear-me". Is there a way to format the drive without the "Parent Directory" folder from being created?

Link to post

Looks correct, don't know why the script isn't working.

 

If your comfortable using the console/SSH you can do it manually:

 

1. If disable enable reconstruct write (aka turbo write): Settings -> Disk Settings -> Tunable (md_write_method)

 

2. Start array in Maintenance mode. (array data will not be accessible during the clearing)

 

This next step will delete all data on the destination disk.

3. From the command line type:

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

Replace X with disk # you want to clear, e.g., md5

 

4. Wait, this will take a long time, about 2 to 3 hours per TB.

 

5. When the command completes continue the The "Clear Drive Then Remove Drive" procedure on step 10

 

Link to post

I imagine that by now you've cleared the drive, and it's no longer available for testing?

 

There are just 2 simple tests run to verify the drive is ready for clearing (assuming it's for Disk 5) -

* ls -A /mnt/disk5 - which should return exactly and only clear-me

* du -s /mnt/disk5 - which should return a string whose very first character is zero

 

Any other return fails the tests.  These have worked for me and others, and yours is the first report that it didn't work.  These tests are double checks that the correct drive has been deliberately emptied, and deliberately marked as available for clearing.  We've had a few users in the past that misunderstood directions and warnings and wiped the wrong drive, or assumed this procedure would save their data.  It doesn't!  It wipes it out, and since parity is updated too, the data cannot be recovered, even by a data recovery service.

 

I'd want to check whether these simple standard Linux commands have been changed in the newer Linux distros, and are returning a different syntax with the newest unRAID releases.  I really doubt that's true, but it should be checked.  I don't know when I can test that for myself though.

 

I noticed one oddity in your first picture.  It shows the correct path in the browser location box, but adds a space within disk5 in the title of the file listing area.  Most likely a display styling thing ...  but inconsistent!  (I don't like replacing the traditional '..' with 'Parent Directory' either!)

Link to post

Yeah, sorry mate. The process that johnnie.black wrote worked a charm.

 

I didnt replace anything with 'Parent Directory'. After I followed the format process it was there. I presumed it was created during the format process.

 

I followed this step "One quick way to clean a drive is reformat it! To format an array drive, you stop the array and then on the Main page click on the link for the drive and change the file system type to something different than it currently is, then restart the array. You will then be presented with an option to format it. Formatting a drive removes all of its data, and the parity drive is updated accordingly, so the data cannot be easily recovered." When I looked at the drive index after doing the format "Parent Directory" was there.

 

When I look at my drives now they all have folders called "Parents Directory". Nothing I have done, system created.

 

About the space within "disk5". All the drives are displayed that way; disks 1 - 4 all display as /mnt/disk *.

Link to post

No I didn't mean you had done it, the developer that designed the screen apparently added the 'Parent Directory' designation.  There's no parent directory indicator in a real folder directory, it's just an artificial thing added to the display to help users navigate up the directory tree.  But traditionally, it's always been a pair of dots, periods, in DOS, Windows, and Linux.

 

The extra space must be something the same developer also added, for readability.  I suppose it makes it a little more readable for new users, but us techies will always quibble at the inconsistency.  Seems confusing to me, because now the user will see it both ways in different places, and think that's acceptable.  Command line syntax is exacting, you can't add spaces where they don't belong, just because it *looks* better.

Link to post
  • 2 months later...

I've almost completed removing a drive using the method described here: https://lime-technology.com/wiki/index.php/Shrink_array#Alternate_Procedure_for_Linux_proficient_users. I am absolutely certain that I have unmounted, cleared, and unassigned the correct drive.

 

A problem occurs in step 14, "Click the check box for Parity is already valid, make sure it is checked!" There is no such checkbox on the main  page.

 

There is the following checkbox after I unassigned the zeroed out drive:

 

Quote

Start will disable the missing disk and then bring the array on-line.
Install a replacement disk as soon as possible.
Yes I want to do this

 

The server is running version 6.3.2.

Link to post
7 minutes ago, eweitzman said:

I've almost completed removing a drive using the method described here: https://lime-technology.com/wiki/index.php/Shrink_array#Alternate_Procedure_for_Linux_proficient_users. I am absolutely certain that I have unmounted, cleared, and unassigned the correct drive.

 

A problem occurs in step 14, "Click the check box for Parity is already valid, make sure it is checked!" There is no such checkbox on the main  page.

 

There is the following checkbox after I unassigned the zeroed out drive:

 

 

The server is running version 6.3.2.

Are you absolutely sure you didn't miss something in steps 10-13? If you did New Config it shouldn't think there is a missing disk.

Link to post

I just redid steps 10-13. I believe I must have pressed "Done" in the New Config page without pressing "Apply" first. Now, after pressing both buttons, every device on the main page has a blue square indicating "new device" in hover tips and the "Parity is already valid" checkbox is present.

 

One suggestion for improvement: After checking the "Parity is already valid" checkbox, the warning up top beside the parity disk should change from "ALL DATA ON THIS DISK WILL BE ERASED WHEN ARRAY IS STARTED" to some other message indicating it will be preserved.

 

The array has started with my old disk gone. Time to start a parity check to be sure.

 

Thanks!

Link to post

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.