darrenyorston Posted November 22, 2016 Share Posted November 22, 2016 I have a 6 drive config, 1 parity and 5 storage drives, however given the cheapness of drives these days I am considering reducing my system to 1 parity and 4 storage drives. How would I go about this? Quote Link to comment
JorgeB Posted November 22, 2016 Share Posted November 22, 2016 https://lime-technology.com/wiki/index.php/Shrink_array Quote Link to comment
Frank1940 Posted November 22, 2016 Share Posted November 22, 2016 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! Quote Link to comment
darrenyorston Posted January 2, 2017 Author Share Posted January 2, 2017 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? Quote Link to comment
darrenyorston Posted January 14, 2017 Author Share Posted January 14, 2017 I am following the Shrink Array guide (https://lime-technology.com/wiki/index.php/Shrink_array) Step 7 says "Create a single folder on the drive with the name clear-me - exactly 7 lowercase letters and one hyphen". How do I do that? Quote Link to comment
JorgeB Posted January 14, 2017 Share Posted January 14, 2017 If disk shares are disable easiest way is using the console/SSH: mkdir /mnt/disk#/clear-me Note that for the script to work you'll need to delete all other folders/files on that disk. Quote Link to comment
darrenyorston Posted January 16, 2017 Author Share Posted January 16, 2017 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? Quote Link to comment
JorgeB Posted January 16, 2017 Share Posted January 16, 2017 Parent Directory is not a folder, if clear-me is the only folder the script should clear it. Quote Link to comment
darrenyorston Posted January 17, 2017 Author Share Posted January 17, 2017 Doesnt work. I have attached an image of the view of the drive I am trying to delete as well as an image of the script message. Quote Link to comment
JorgeB Posted January 17, 2017 Share Posted January 17, 2017 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 Quote Link to comment
darrenyorston Posted January 17, 2017 Author Share Posted January 17, 2017 I am not comfortable with SSH but I can follow instructions. I have backed all the data off to an external drive just in case. Could the issue be related to the drive being brtrfs format? I can retry and format it back to xfs and try again with the script. Quote Link to comment
JorgeB Posted January 17, 2017 Share Posted January 17, 2017 Could the issue be related to the drive being brtrfs format? I can retry and format it back to xfs and try again with the script. No, file system used is irrelevant. Quote Link to comment
darrenyorston Posted January 18, 2017 Author Share Posted January 18, 2017 Is there a way to upload logs for what I am doing? If the script isn't working then clearly there is a problem with the posted process. This information would be valuable to others trying to do what I am doing. Quote Link to comment
JorgeB Posted January 18, 2017 Share Posted January 18, 2017 I've sent a pm to Rob, the script author, to see if he can help. Quote Link to comment
darrenyorston Posted January 18, 2017 Author Share Posted January 18, 2017 That method worked fine. Thank you for your help. Quote Link to comment
RobJ Posted January 19, 2017 Share Posted January 19, 2017 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!) Quote Link to comment
darrenyorston Posted January 19, 2017 Author Share Posted January 19, 2017 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 *. Quote Link to comment
RobJ Posted January 20, 2017 Share Posted January 20, 2017 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. Quote Link to comment
eweitzman Posted March 27, 2017 Share Posted March 27, 2017 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. Quote Link to comment
JorgeB Posted March 27, 2017 Share Posted March 27, 2017 That means you didn't do a new config, step 10. Quote Link to comment
trurl Posted March 27, 2017 Share Posted March 27, 2017 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. Quote Link to comment
eweitzman Posted March 27, 2017 Share Posted March 27, 2017 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! Quote Link to comment
Recommended Posts
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.