Steps to replace a failed drive

Status
Not open for further replies.

sjieke

Contributor
Joined
Jun 7, 2011
Messages
125
Hi,

I'm new to all this NAS stuff and while waiting the arrival of my new hardware to build my first NAS, I'm playing with FreeNAS inside virtualbox.

When I try to simmulate a failed drive I do the following:
1. Shutdown FreeNAS
2. Remove one of the drives
3. Boot FreeNAS
4. Check status => shows as degraded, so far so good
5. Shutdown FreeNAS
6. Add a new drive in place of the removed one
7. Boot FreeNAS
8. Check status => shows as degraded

So now I guess I need to take some actions to perform the actual replace.
In the UI I go to view Disks of my pool. And there I hit the replace button of the disk I removed and replaced. But nothing happens. The pool stays degraded.

I can get it replaced in the console of FreeNAS doing following actions:
1. zpool status tank => gives me info on the pool, 1 disk degraded and the name changed by a long id.
2. zpool offline tank <longID> => takes the disk offline
3. zpool replace tank <longID> <nameOfNewDisk>
=> finding the name of the new disk is hit and miss, at the moment I just guess. Is there a way to find the name?
=> if I got the name of the new disk right, it starts a resilvering
4. resilver finished, but still degraded => old and new disk stay in replacing state
5. zpool detach tank <longID> => old diks is gone and pool is ONLINE again.
6. In UI disks don't match reality.
7. In UI export pool
8. In UI auto import
9. Pool is back and UI and disks match reality.

My question is the following: are these the correct steps to take? Can't the UI handle this replace, or is the replace button in the UI something else?
 

sjieke

Contributor
Joined
Jun 7, 2011
Messages
125
Ok, I did some extra testing. This time when I removed and added a new disk, I made sure it was on the same sata port (didn't bother to check on my previous attempts).

1. Removing a disk resulted in a degraded state, as expected.
2. The removed disk appears as UNAVAILABLE when issuing a zpool status.
3. Replacing the disk with a new one has the same result.
4. In the UI, I go to view disks. There I hit the replace button and in the popup I can only choose 'in-place'. This is what I want so I hit 'OK'.
5. After a little while there appears a message in the top of the UI saying 'disk replacement initiated'.
6. If I look at 'zpool status' again, I see a scrub was run and the disk changed from UNAVAILABLE to FAULTED.
7. Not knowing what I should do, I guess a reboot my be needed
8. After the reboot the disk changed back to UNAVAILABLE.

So my question is now: Is it possible to replace a disk using only the UI interface, without using the cli? And if so, what actions/steps need to be performed. Obviously my actions aren't the correct ones.
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
Same here! :) I've got 2 drives to replace in my RAIDZ2 and right now I am stuck in limbo because of this.

@Sjike does your system log something about the new drive being identified as /dev/NONE?
 

sjieke

Contributor
Joined
Jun 7, 2011
Messages
125
If I recall correctly from memory, going to the view disks page of my pool after a replace, the name of the drive was indeed None.
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353

sjieke

Contributor
Joined
Jun 7, 2011
Messages
125
Thx for the info, as soon as beta3 is out I will test it again :)
 

sjieke

Contributor
Joined
Jun 7, 2011
Messages
125
I haven't found the time to test it. As soon as I do I will post my results, but it could take a while...
 
Status
Not open for further replies.
Top