# Resilvering Error



## wozzaj (Jan 15, 2013)

Hi all.

I have an issue where we had a disk die. I pulled the disk and replaced it with another 300Gb disk, setup the raid 0 and booted up. 

So far so good. I then did a replace using 'zpool replace z01 9523041407988920466 mfid12' and the resilvering began

After the resilvering had finsihed, it still show the reference to the faulty drive. I rebooted the machine and now shows the following:


```
[root@gins01] ~# zpool status
  pool: z01
 state: DEGRADED
 scrub: none requested
config:

        NAME                                          STATE     READ WRITE CKSUM
        z01                                           DEGRADED     0     0     0
          mirror                                      ONLINE       0     0     0
            mfid0p2                                   ONLINE       0     0     0
            mfid1p2                                   ONLINE       0     0     0
          mirror                                      DEGRADED     0     0     0
            mfid2p2                                   ONLINE       0     0     0
            replacing                                 DEGRADED     0     0     0
              9523041407988920466                     UNAVAIL      0     0     0                                                                               was /dev/mfid3p2
              mfid12                                  ONLINE       0     0     0
          mirror                                      ONLINE       0     0     0
            mfid3p2                                   ONLINE       0     0     0
            mfid4p2                                   ONLINE       0     0     0
          mirror                                      ONLINE       0     0     0
            mfid5p2                                   ONLINE       0     0     0
            mfid6p2                                   ONLINE       0     0     0
          mirror                                      ONLINE       0     0     0
            mfid7p2                                   ONLINE       0     0     0
            mfid8p2                                   ONLINE       0     0     0
        logs
          mirror                                      ONLINE       0     0     0
            mfid11p2                                  ONLINE       0     0     0
            mfid9p2                                   ONLINE       0     0     0
        cache
          gptid/7d893659-548e-11e1-a1e6-000423bbdad3  ONLINE       0     0     0
```

I am now at a loss as to what to do and am not sure if in fact the resilvering was a success or not. I too am also a newbie to this and this environment is totally alien to me as I inherited it and am concerned at losing data so any and all help would be appreciated,  and really struggling to get my head around it all!!

Many thanks in advance
Woz.


----------



## phoenix (Jan 16, 2013)

Either:
`# zpool offline <poolname> <serial number>`
Or:
`# zpool remove <poolname> <serial numer>`
Or:
`# zpool detach <poolname> <serial number>`
Where (serial numer) is that kong number in place of the old disk device.


----------



## usdmatt (Jan 16, 2013)

I used to have problems on older releases with replaced drives not actually disappearing after a resilver just like this. (Actually I've not had to do a live replace yet but I've done a fair amount of testing)

You may have to force it to remove the old drive. A replace entry is similar to a mirror so you can 'detach' one of the disks from it


```
# zpool detach z01 9523041407988920466
```


----------



## wozzaj (Jan 17, 2013)

*Solved (maybe)*

Thanks guys.

I decided to bite the bullet and do:
:zpool offilne

followed by

:zpool detach

zpool status then show all ok. Did a scrub to be sure and reported ok. The only other thing that kept bugging me was that the replacement drive was an identical 300Gb SAS drive in a mirrored pair (raid 0) and when the resilvering had completed, it was only showing 85Gb done. Does the resilvered figure only show data copied or could there still be another issue?

Thanks.
Woz.


----------



## kpa (Jan 17, 2013)

Resilvering copies only the data that needs to be copied, unused blocks are not replicated.


----------



## usdmatt (Jan 17, 2013)

Does you pool happen to be approx {(85/300)*100}% full? (assuming all the vdevs were present from the start so the data is spread evenly)


----------



## wozzaj (Jan 18, 2013)

Thanks kpa, that makes me feel better. Do you know if it is a common problem for the replaced disk to remain after the resilvering and change to a fualted state?

usdmatt, not sure how to check that?!?

Thanks guys.
Woz.


----------



## usdmatt (Jan 18, 2013)

```
# zpool list
NAME      SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
storage   928G   766G   162G    82%  1.00x  ONLINE  -
```


----------



## wozzaj (Jan 21, 2013)

That shows the total of the pool though. Is there a command to just show the data across the disks of the mirrored pair, particularly that of the resilvered disk as that only showed 85Gb whereas you can see below used is 382Gb?

NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
z01    815G   382G   433G    46%  ONLINE  /mnt


----------



## Sebulon (Jan 21, 2013)

wozzaj said:
			
		

> That shows the total of the pool though. Is there a command to just show the data across the disks of the mirrored pair, particularly that of the resilvered disk as that only showed 85Gb whereas you can see below used is 382Gb?
> 
> NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
> z01    815G   382G   433G    46%  ONLINE  /mnt



Try:
`# zpool iostat -v`

I think is the closest youÂ´ll get to what you wanted.

/Sebulon


----------



## wozzaj (Jan 22, 2013)

Thanks. That gives good info and thanks to all for your help.

Woz.


----------

