USB stick corrupt / Trouble Importing / Replacing Disk [SOLVED]

Status
Not open for further replies.

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Thats not a good sign, I guess that explains why the GUI isn't working. I'd check your cabling, do a "camcontrol devlist" and make sure all of your disks are online.
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
Found a bad drive with smart error. Unplugged that drive, now it auto imports! But, how do I replace the drive? I don't have an extra SATA port so I need to swap in the same port...what's the way to do so?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hmm, with the outbreak of people having problems replacing drives I'm not sure what actually works properly...

Normally you should
"offline" the bad disk from the GUI or command line
power down
remove the bad disk
put in new disk
power up
click Replace in the GUI next to the failed disk name and wait for it to resilver.... (check either with "zpool status -v" from CLI or from GUI)


You can try "zpool offline DEC2010 bad-disk-device-name" (in your case gpt/disk#)

If you're able to offline the disk even though it's not plugged in, I *think* you should be ok.
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
I don't see any option to offline the disk from the GUI. That would be my perferred method, to be sure i dont mess anything up... haha
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
There is an offline in the GUI, but if you don't want to risk screwing anything up, I wouldn't use the GUI ;) (sorry William)

I've seen too many disk replacements gone wrong lately...
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
There is an offline in the GUI, but if you don't want to risk screwing anything up, I wouldn't use the GUI ;) (sorry William)

I've seen too many disk replacements gone wrong lately...

ok in this case... can you tell me each command? I'll do it EXACTLY as you tell me, haha.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
The GUI *should* work ok, it does a lot of the little extra things like partitioning etc., I'd give it a try.
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
initiated the replace via the gui. Take a look, what do I do after this is done?

Code:
# zpool status -v
  pool: DEC2010
 state: DEGRADED
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scrub: resilver in progress for 0h3m, 0.36% done, 13h59m to go
config:

        NAME                                            STATE     READ WRITE CKSUM
        DEC2010                                         DEGRADED     0     0     0
          raidz1                                        DEGRADED     0     0     0
            gptid/218a2962-c5d4-11e0-8fd1-0025900d25b0  ONLINE       0     0     0
            gpt/disk1                                   ONLINE       0     0     0
            gpt/disk2                                   ONLINE       0     0     0
            replacing                                   DEGRADED     0     0     0
              5817244552391206561                       OFFLINE      0     0     0  was /dev/gpt/disk3
              ada3p2                                    ONLINE       0     0     0  5.17G resilvered
            gpt/disk4                                   ONLINE       0     0     0
            gpt/disk5                                   ONLINE       0     0     0

errors: No known data errors

 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Start praying before it finishes ;)

If everything goes smoothly, nothing. I've seen a number of people with different problems here lately after this finishes, hopefully you won't be one of them...

It looks like you have awhile before it finishes, sometime in the middle of the night.
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
haha, yea. Ok - but if all goes well, what can I expect - a non-degraded status for the volume? do I then need to run a scrub?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
If all goes well, yes "Healthy" status, no need to scrub, scrub and resilver are basically the same thing.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
It's kind of interesting, my USB stick went belly up earlier today. It suddenly decided it was a read-only / write-protected device and my system bombed. It's the second USB stick that's failed on my since running FreeNAS on it, and I don't make many changes other than a setting here or there once in awhile. Fortunately I backed up my config just before upgrading to 8.0.4-p1 yesterday. When I removed it from my FreeNAS system and put it in my FreeBSD system to "fsck" it, I also got write-protect errors. Then I tried to wipe it with "dd" and that bombed after 10-15 minutes.... write-protected error. Not sure how it just suddenly became a write-protected device, it's not one of the ones that has a write-protect switch either.
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
Very weird.

I'm pretty convinced though, now, that my USB stick never was the issue. Instead, when I had rebooted the system a few days ago - FreeNAS just wouldn't mount the pool because of the device that was barely still functioning. So instead of coming up and saying that device was dying slowly - it just hung.

Once I unplugged the bad device, everything did go pretty smoothly, so far at least. I have about an hour left of the resilver... Time for work but I'll report back when I get home.

Can I automate the scrub process weekly through the GUI?
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
Hmmm... what now?


Code:
# zpool status -v
  pool: DEC2010
 state: DEGRADED
 scrub: resilver completed after 12h20m with 0 errors on Fri Apr 13 04:52:20 2012
config:

        NAME                                            STATE     READ WRITE CKSUM
        DEC2010                                         DEGRADED     0     0     0
          raidz1                                        DEGRADED     0     0     0
            gptid/218a2962-c5d4-11e0-8fd1-0025900d25b0  ONLINE       0     0     0
            gpt/disk1                                   ONLINE       0     0     0
            gpt/disk2                                   ONLINE       0     0     0
            replacing                                   DEGRADED     0     0     0
              5817244552391206561                       OFFLINE      0     0     0  was /dev/gpt/disk3
              ada3p2                                    ONLINE       0     0     0  1.39T resilvered
            gpt/disk4                                   ONLINE       0     0     0
            gpt/disk5                                   ONLINE       0     0     0

errors: No known data errors

 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
nevermind, detached the bad drive, and all is well! AWESOME!!!!!!!!!!!!!!!!! thank you !!!!

I'm going to scrub it again. Because I'm nervous about it. haha
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Glad you figured out that last step ok, a lot of people get stuck there and have problems. You really don't need to do a scrub, resilvering does the same thing, it just puts unnecessary stress on your disks.

Anyway, glad I could help out and not have you panic and do something crazy. Patience can definitely make a difference with stuff like this.

Cheers!
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Every couple of weeks is suggested. If don't do any, one will automatically be done every 35 days. You can schedule them using CRON from the GUI. So for example just put the command you would use from the command line to start a scrub "zpool scrub DEC2010" as the CRON command and then choose the days/date/time etc. when you want it to run.
 
Status
Not open for further replies.
Top