SOLVED How to replace the drive in Freenas 8.04?

Discussion in 'Storage' started by benjy23, Mar 31, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Mar 31, 2012

    Hi, I'm now running Raid Z with 6 x 1.5TB HDs.
    One of the Hard Drives kept disappearing from the NAS as in losing its link so I decided to replace it.
    Running Freenas 8.04.

    I first turned off my NAS replaced the disk and rebooted it.
    After which I went into storage area - View Disks and replaced the disk.
    However it still show its degraded... What did I miss out here... I know ZFS doesn't have to rebuild the array... :(

    Please HELP, Been trying to fix the issue for hours now...

    Thanks & Regards,
    Ben

    P.S. Sorry if there's already a thread about this but I've been searching for 1 before I posted this up.
  2. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Mar 31, 2012

    Ok, now all the disks are online but there's still an error... Degraded... Sorry I'm a noob.
    How can I find the problem?

    http://www.box.com/s/7a00368df218a2e564a4

    That's a screenshot of my system. THanks
  3. Offline

    ProtoSD FreeNAS Guru

    Member Since:
    Jul 1, 2011
    Messages:
    3,358
    Message Count:
    3,358
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Mar 31, 2012

    Hi Ben,

    It doesn't sound like you followed the documented procedure exactly, but I think you'll be ok. ZFS does have to "resilver", which can take a LONG time depending on how much data you have. In my case it took 10 hours for a 5 disk raidz2 array with about 4.5TB of data.

    If you do a "zpool status -v" from the command line, you shoud see an estimated completion time. AFTER it finishes resilvering, then the degraded should change. Are you seeing or hearing any disk activity?

    It is possible you're seeing the same thing that happened to me. If you built your array on an earlier version of FreeNAS (8.0), the swap size was smaller but when I tried to replace my failed disk on 8.03, the new swap size was larger (2GB vs. 1GB), and the "replace" silently failed without any notice.

    If "zpool status -v" isn't showing any progress and you're not seeing or hearing any disk activity, this could be your problem.

    Can you post the output of "gpart show" and also the last 20 or so lines from your /var/log/messages ??
  4. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Apr 1, 2012

    Thanks protosd.

    Initially I only went to Version 8 when it took like forever to rebuild the array in version 7.

    Ok finally figured how to get to command line... Shell first....
    Resilver in progress for 3h16m, 66.87% done, 1h37m to go.

    So looks like I just need to wait I guess... is there another way to check this status? Like through the Web GUI?
    Normally I don't attach her monitor to my NAS ha ha ha.

    I'll update when its done. Thanks protosd
  5. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Apr 1, 2012

  6. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Apr 1, 2012

    Looks like ada4?
    If that's the case how do I properly remove it... My version doesn't show a status like online or not... like in the instructions on removing a HD.
    Can I just shutdown. Replace the HD. Reboot then ask it to replace Ada4? Then wait for it to rebuild?
  7. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Apr 1, 2012

  8. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Apr 1, 2012

    Ok I finally figured how to offline the disk... I think
    and this what shows up... http://www.box.com/s/48f7073efdb1269d9d7d
    Sigh, finding it pretty hard to diagnose the problem... Hope I can fix it before another drive dies on me... :(
  9. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Apr 1, 2012

  10. Offline

    ProtoSD FreeNAS Guru

    Member Since:
    Jul 1, 2011
    Messages:
    3,358
    Message Count:
    3,358
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Apr 1, 2012

    Ben,

    Don't panic or do anything yet. I'm just waking up and probably shouldn't offer any advice until I've had more time for my eyes to come unglued ;)
  11. Offline

    ProtoSD FreeNAS Guru

    Member Since:
    Jul 1, 2011
    Messages:
    3,358
    Message Count:
    3,358
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Apr 1, 2012

    Ok, some of the glue is gone.... ;)

    Reading the docs ahead of time might have been helpful, but after just looking at them again they appear to have changed.

    Anyway, now you need to get that "OLD" disk to go away to start with, then we'll worry about the other problem...

    If the GUI is working correctly, you should be able to click the detach icon next the the disk that says "UNAVAILBLE" or "used to be ***x/OLD", then the status of your array should change from "DEGRADED" to "ONLINE".

    Lets get that settled first, then deal with the errors on the other disk, it does look like another disk could be failing. You can use "smartctl" with some options to run some diagnostics, let's do that after the detach stuff.
  12. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Apr 1, 2012

    Where do I do that? Am using the latest version of Freenas. Version 8.04. Sorry, still new to version 8 since I didn't play around with it since it was set up. Really still a noob.

    Problem is there is no disk that shows unavailable, in the GUI that is. I know it appears in command line. And when I try to offline it, it shows this... http://www.box.com/s/48f7073efdb1269d9d7d

    It just looks like this right now in the GUI... http://www.box.com/s/7a00368df218a2e564a4

    Any other ways to diagnose problem?
  13. Offline

    ProtoSD FreeNAS Guru

    Member Since:
    Jul 1, 2011
    Messages:
    3,358
    Message Count:
    3,358
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Apr 1, 2012

    You need to "detach" the UNAVAILABLE disk. It's been awhile, but I would try this:

    zpool detach BigDisk ada4p2/old (This is what "used to" work)

    You can also try changing the "/dev/ada4p2/old" with that big long number
  14. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Apr 1, 2012

    I see, I'll try that when I get back later. Yeah not in the US, so I can imagine your timing. Thanks Protos.
    Take it you're a Starcraft player ha ha. My favourite race as well :p
  15. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Apr 2, 2012

  16. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Apr 2, 2012

    Ok, after trying this. It just occurred to me...
    Am I trying to remove the wrong disk?

    http://www.box.com/s/b138dcde776b57e6140e

    Could the problem actually be ada3?
    Cos when I physically change ada4 to a new disk... my data is still all there... but I can't replace disk.
    Tried those commands with the so called problem disk and this occurs... so probably wrong disk?
  17. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
  18. Offline

    ProtoSD FreeNAS Guru

    Member Since:
    Jul 1, 2011
    Messages:
    3,358
    Message Count:
    3,358
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Apr 2, 2012

    Ben,

    You're making me *cringe*..... don't go swapping stuff around / changing disks or cables etc. at this stage or you risk frelling things up...

    Also, don't do "offline" or "remove", you're playing with fire ;)

    The reason your data still appears when you remove *any* disk right now is because you have raid Z1, and you've presumably resilvered your replacement disk... but since one of your other disks is showing signs of failing, you don't want to push your luck!

    The "zpool detach BigDisk 3379287697720297985" should have worked. Sorry you misinterpreted my instructions about /dev/ada4p2/old, that *used to work*.
  19. Offline

    ProtoSD FreeNAS Guru

    Member Since:
    Jul 1, 2011
    Messages:
    3,358
    Message Count:
    3,358
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Apr 2, 2012

    Well this is where I believe you went wrong to begin with, you should have offlined the bad disk before swapping it with the new one. Don't swap it back now!
  20. Offline

    benjy23

    Member Since:
    Jun 3, 2011
    Messages:
    21
    Message Count:
    21
    Likes Received:
    0
    Trophy Points:
    0
    benjy23, Apr 2, 2012

    So now that "zpool detach BigDisk 3379287697720297985" doesn't work... What's next?
    Right now I have my bad disk plugged in. And the new 1 on standby as I posted the last pic up.
Thread Status:
Not open for further replies.

Share This Page