ubuntuaddicted Posted December 8, 2011 Posted December 8, 2011 So I was given some WD 1TB drives, they are about 6 months old. We're not written to very much. I also have another 1TB drive that's about 1 year old. All can be completely erased/formatted or whatever I need to do to prep them for unRAID. My question is there anything I need/should do to prepare them for my 3 hdd unRAID server? Examples would be to open them in a free debian based hdd utility and run file system checks an whatever else. Do u guys prep your hard drives before putting them in your servers? Tapatalk is tha shizzle
adammerkley Posted December 8, 2011 Posted December 8, 2011 Most of us run a script called preclear_disk. You can find more info about it below. http://lime-technology.com/forum/index.php?topic=2817 http://lime-technology.com/wiki/index.php?title=Configuration_Tutorial#Preclear_Hard_Drives
WeeboTech Posted December 8, 2011 Posted December 8, 2011 preclear is a great tool. These days, I'm leaning towards running a badblocks test in write mode first. Then doing a preclear afterwards. Preclear writes x00 to the whole drive and reads it back for validation. badblocks in write mode does 4 passes. 0xaa = 10101010 0x55 = 01010101 0xff = 11111111 0x00 = 00000000 It logs what blocks were bad if the firmware did not reallocate them. It takes longer. About a week for a 2TB drive, but after it, if the smart report is good, I'm confident the drive will perform well. If you have any pending sectors on the smart report, the drive is not a good candidate for unRAID. What will happen is one day another drive may fail, and when you go to rebuild it, the drive with the pending sector may throw an error to the md driver, which will then cause the rebuild to fail.. thus leaving you with a 2 drive failure and possibly loosing your ability to recover. This would be true of almost any raid environment that depended on more then one drive for rebuild. it's my feeling that badblocks exercises the drive more intensely then the preclear does, plus it can provide a log file of blocks that had issues.
ubuntuaddicted Posted December 8, 2011 Author Posted December 8, 2011 awesome, exactly what I was looking for. This community is the best! Love the support. Hope I can pay it forward and help out others with 5+ years of linux server administration.
ratmice Posted December 10, 2011 Posted December 10, 2011 It takes longer. About a week for a 2TB drive, but after it, if the smart report is good, I'm confident the drive will perform well. So with the new 4 TB drives, a run of badblocks then the preclear would take 2 1/2 weeks? :o Imagine not using screen and accidentally aborting THAT at the 2 week mark.
adammerkley Posted December 10, 2011 Posted December 10, 2011 It takes longer. About a week for a 2TB drive, but after it, if the smart report is good, I'm confident the drive will perform well. So with the new 4 TB drives, a run of badblocks then the preclear would take 2 1/2 weeks? :o Imagine not using screen and accidentally aborting THAT at the 2 week mark. Unless I'm missing something, I don't think badblocks takes 2 weeks on a 2TB drive. I've been running it on a 2TB WD drive that I just got from the RMA dept. It's been running for 24 hours, and is 20% into the 3rd pass. At this rate it will be done sometime tomorrow... root@Tower:/boot# badblocks-1.42 -svw /dev/sda Checking for bad blocks in read-write mode From block 0 to 1953514583 Testing with pattern 0xaa: done Reading and comparing: done Testing with pattern 0x55: done Reading and comparing: done Testing with pattern 0xff: 20.84% done, 24:46:43 elapsed. (0/0/0 errors)
WeeboTech Posted December 10, 2011 Posted December 10, 2011 It takes longer. About a week for a 2TB drive, but after it, if the smart report is good, I'm confident the drive will perform well. So with the new 4 TB drives, a run of badblocks then the preclear would take 2 1/2 weeks? :o Imagine not using screen and accidentally aborting THAT at the 2 week mark. Unless I'm missing something, I don't think badblocks takes 2 weeks on a 2TB drive. I've been running it on a 2TB WD drive that I just got from the RMA dept. It's been running for 24 hours, and is 20% into the 3rd pass. At this rate it will be done sometime tomorrow... root@Tower:/boot# badblocks-1.42 -svw /dev/sda Checking for bad blocks in read-write mode From block 0 to 1953514583 Testing with pattern 0xaa: done Reading and comparing: done Testing with pattern 0x55: done Reading and comparing: done Testing with pattern 0xff: 20.84% done, 24:46:43 elapsed. (0/0/0 errors) It depends on "which" test you do. The non destructive read-write-read-write mode takes longer. I just did one. It was almost 140 hours on a 2tb drive. My findings are the same with write-read mode test. About 1 day or so. My non destructive read-write-read-write test is about 50% done @ 54 hours for a 2 TB drive that had bad sectors last year. But this is not something you do on a new drive, It's something you do on an existing drive with a format you want to "try" and keep. Anyway with the drive prices the way they are I was going to try and resurrect this drive before I RMA it. I have a bunch of drives to RMA now, so this is a good way to test if a drive can be saved with badblocks non destructive testing.
WeeboTech Posted December 10, 2011 Posted December 10, 2011 It takes longer. About a week for a 2TB drive, but after it, if the smart report is good, I'm confident the drive will perform well. So with the new 4 TB drives, a run of badblocks then the preclear would take 2 1/2 weeks? :o Imagine not using screen and accidentally aborting THAT at the 2 week mark. I wrote a shell that spawns it into the background piping the output to a file. You can then monitor it with tail -f. It was in preparation to asst with a possible mod to preclear script. The only thing missing from badblocks is a MB/s rating.
WeeboTech Posted December 10, 2011 Posted December 10, 2011 Here is my current badblocks.sh script. It's by no means polished. It's designed to use the /dev/disk/by-id/ paths so please consider that or adjust it. I wanted the logs to be according to the serial number since /dev/sd? can change at any point. What I planned to do is a smartctl log before, then after with a diff. I may borrow Joe's preclear signature code, or just use preclear directly to add a signature. If I get adventurous, I'll go into badblocks and put a MB/s Rating. It's currently set to do a destructive write mode test. #!/bin/bash P=${0##*/} # basename of program R=${0%%$P} # dirname of program P=${P%.*} # strip off after last . character if [ ${DEBUG:=0} -gt 0 ] then set -x -v exec 9>/tmp/${P}.trace.$$ export BASH_XTRACEFD=9 export PS4='+ (${BASH_SOURCE}{LINENO}{FUNCNAME[0]-} ' fi YY=`date "+%Y"` MM=`date "+%m"` DD=`date "+%d"` HH=`date "+%H"` MM=`date "+%M"` SS=`date "+%S"` DEV=${1##*/} # basename of DEV DDV=${1%%$DEV} # dirname of DEV DEV=${DEV%.*} # strip off after last . character # DEV=${DEV%-*} # strip off after last - character # echo ${DEV} shift export PIDFILE=/tmp/${DEV}.badblocks.pid ( { sleep 3 exec 1>/tmp/${DEV}.badblocks.out exec 2>&1 trap "rm -f ${PIDFILE}" EXIT HUP INT QUIT TERM badblocks -sv -o /tmp/${DEV}.badblocks -w /dev/disk/by-id/${DEV} } ) & BGPID=$! echo $! > ${PIDFILE} disown $! ps -fp $(<${PIDFILE}) You can monitor the log file with tail -f and it will update as if you were running it from the console. I do not know how it handles exiting the terminal right now. It's still in the infancy.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.