July 29, 200817 yr I have a HDD that I want to just format it and start it over. After reading the FAQI have tried removing it from the array but it keeps finding it. Obviously that is not what it was referring to. At this point there is nothing usable on it so I just want to format it and add it back to the array. Any help would be appreciated.
July 29, 200817 yr I have a HDD that I want to just format it and start it over. After reading the FAQI have tried removing it from the array but it keeps finding it. Obviously that is not what it was referring to. At this point there is nothing usable on it so I just want to format it and add it back to the array. Any help would be appreciated. Not quite sure how you are removing the disk from the array... Are you A. Stopping the array, un-assigning the disk, pressing the "Restore" button (which is actually the "Delete Current Configuration" and create new based on assigned disks button.) and then at a later time, adding the disk back in, but since it it is already formatted, it skips that step, so you see all the old files? Or B. are you just un-assigning it, and then re-assigning it? (this just simulates a failed drive, and the replacement of the failed drive, and does not remove it at all from the array) In A., you are correct, it sees the original formatting and does not re-format it. To un-format, if you know the proper linux device (/dev/sdX for SATA drives, or /dev/hdX for IDE drives, where X = a through z) you can just use fdisk /dev/sdX or fdisk /dev/hdX Then, use "m" to get a command list, then "d" to delete a partition. (you want to delete the first partition), then "w" to write the partition table back to the drive. At that point, the drive is no longer "partitioned" and as a result should be detected as unformatted. Alternatively, you can write zeros to the fist sectors of the hard disk, wiping out the partition table. dd if=/dev/zero of=/dev/sdX count=100 bs=1k It should write zeros to the first 100k of the disk... that should make it unformatted. Be VERY careful. There is no "undo" command with "dd". If you make the output file (of=) the wrong disk, all data on that disk will be gone... forever... "fdisk" is slightly friendlier, it does not delete the partition until you issue the "w" command to write the new partition table to the disk.. It you get cold feet, just use "q" to quit. Make very certain you have the correct disk. If you are not sure, you can type ls -l /dev/disk/by-id To see the disks and their affiliated devices. Did I mention to be very careful with "dd" and "fdisk" ... either one can ruin your day if used on a disk with data you do not want to delete. Or, Rather than reformat, you can just delete the contents of the old disk after adding it new to the array. Deleting is very fast, and unlike "dos" the file system easily handles it. Joe L.
July 29, 200817 yr Author I really appreciate your response and so quick and detailed. Maybe I am barking up the wrong tree. I had problems with that drive being seen and constantly locking up the system. After several attempts to fix with reiserfsck suggested by Tom. I gave up as it was going from bad to worse. Right now it is showing space being taken up, but nothing comes up. It is also showing duplicate folders. I gave up and just reburned the movies. I have not turned on the parity drive yet as I am just now finishing getting everything on. At this point I just want to format the drive to put it back in the array as usable (it is only a couple months old) and move on. From my Win/DOS experience, the easiest way to make sure it is clean and good is to remove the partition, repartition and format. The main thing I want to accomplish is make sure it is clear and ready to really use. Your input is appreciated. Thanks. Mickey
July 29, 200817 yr I really appreciate your response and so quick and detailed. Maybe I am barking up the wrong tree. I had problems with that drive being seen and constantly locking up the system. After several attempts to fix with reiserfsck suggested by Tom. I gave up as it was going from bad to worse. Right now it is showing space being taken up, but nothing comes up. It is also showing duplicate folders. I gave up and just reburned the movies. I have not turned on the parity drive yet as I am just now finishing getting everything on. At this point I just want to format the drive to put it back in the array as usable (it is only a couple months old) and move on. From my Win/DOS experience, the easiest way to make sure it is clean and good is to remove the partition, repartition and format. The main thing I want to accomplish is make sure it is clear and ready to really use. Your input is appreciated. Thanks. Mickey If you know the device, and suspect it as potentially bad, then I suggest you do two passes with "dd" The first pass should "read" all sectors. It will enable the SMART system on the disk to identify any unreadable sectors, and to mark them for re-allocation when subsequently written to. The second pass should clear the entire drive by writing zeros to it. It will allow the sector re-allocation to occur as I described. Then, you can add the disk back into your array. Since you have no parity drive, you do not have to worry about re-calculating parity after each step. So, lets say it is /dev/sdc (you will need to substitute the correct drive in the examples below) First read it entirely dd if=/dev/sdc of=/dev/null bs=16k Then, clear it entirely. dd if=/dev/zero of=/dev/sdc bs=16k Both of these commands will take a while on larger drives. Expect 4 hours or more for each step unless you have very fast drives. You might want to run the smartctl command on it before and after the read and write passes to determine if it detects any errors. smartctl -a -d ata /dev/sdc Remember, in all the examples, substitute your correct drive for /dev/sdc. Did I mention there is no undo for writing zeros to an entire drive... Make sure you have the correct drive. Joe L.
July 29, 200817 yr Author I like your DID I MENTION.......I will try this shortly and let you know. Again, thanks for your help. Mickey
July 30, 200817 yr Author That appears to have solved it for now. I am showing about 50 less bytes which I assume are roped off. Thanks for the help and hopefully, I will not have any more problems. Mickey
July 30, 200817 yr If you get a chance, post the output of smartctl on the drive you cleared... Many will be curious to see what it says: smartctl -a -d ata /dev/sdX Joe L.
Archived
This topic is now archived and is closed to further replies.