Can't Remove a bad drive

Status
Not open for further replies.

mikei

Dabbler
Joined
Aug 9, 2012
Messages
13
Running FreeNAS-8.3.0-RELEASE-x64 (r12689) on an HP microserver with 5gb and 3 2tb drives and one 250gb drive

I started having SMART issues with my ada3 drive in my pool. I received an rma from segate and started the process (by reading and re-reading here) replacing the failed drive. At this point I'm stuck. I tried to scrub the volume and then offline the drive and it wouldn't let me offline, crabbing that there was no current #&#*& (forgot the error - but it means no current scrub) I powered down and removed the drive, put in the new one. When it came back up it said my pool had an invalid size and was 'unknown' but there was an entry for it (IppoDisk) When I tried to view volumes I got an error from the system (perhaps a bug) I replaced the old drive and it was good again (but still smart errors) I clicked replace on the drive and it resilver'd and I tried the swap out again with same results. Now I've added the new drive and kept the old drive in and I'm scrubbing again.

How do I get rid of the ada3 drive from my pool without it trashing my pool??

Code:
[root@freenas] ~# zpool status
  pool: IppoDisk
 state: DEGRADED
  scan: scrub in progress since Sat Nov  3 15:57:00 2012
        4.21G scanned out of 1.19T at 82.9M/s, 4h10m to go
        0 repaired, 0.35% done
config:

	NAME                                            STATE     READ WRITE CKSUM
	IppoDisk                                        DEGRADED     0     0     0
	  gptid/6eca644a-d1c9-11e1-b73e-00155d001316    ONLINE       0     0     0
	  replacing-1                                   DEGRADED     0     0     0
	    gptid/6f65a903-d1c9-11e1-b73e-00155d001316  ONLINE       0     0     0
	    14457425943962256445                        OFFLINE      0     0     0  was /dev/gptid/dae9adc9-250c-11e2-b95a-6805ca08a389
	  gptid/583367d1-198b-11e2-aa25-6805ca08a389    ONLINE       0     0     0
	  gptid/41b34ae2-19ea-11e2-ac4d-6805ca08a389    ONLINE       0     0     0

errors: No known data errors
[root@freenas] ~# camcontrol devlist
<VB0250EAVER HPG0>                 at scbus0 target 0 lun 0 (pass0,ada0)
<ST32000542AS CC34>                at scbus1 target 0 lun 0 (pass1,ada1)
<ST32000542AS CC34>                at scbus2 target 0 lun 0 (pass2,ada2)
<ST32000542AS CC34>                at scbus3 target 0 lun 0 (pass3,ada3)
<ST32000542AS CC34>                at scbus4 target 0 lun 0 (pass4,ada4)
<EDGE DiskGO PMAP>                 at scbus6 target 0 lun 0 (pass5,da0)
[root@freenas] ~# gpart show
=>       34  488397101  ada0  GPT  (232G)
         34         94        - free -  (47k)
        128    4194304     1  freebsd-swap  (2.0G)
    4194432  484202703     2  freebsd-zfs  (230G)

=>        34  3907029101  ada1  GPT  (1.8T)
          34          94        - free -  (47k)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834703     2  freebsd-zfs  (1.8T)

=>        34  3907029101  ada2  GPT  (1.8T)
          34          94        - free -  (47k)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834703     2  freebsd-zfs  (1.8T)

=>        34  3907029101  ada3  GPT  (1.8T)
          34          94        - free -  (47k)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834702     2  freebsd-zfs  (1.8T)
  3907029134           1        - free -  (512B)

=>     63  7831489  da0  MBR  (3.8G)
       63  1930257    1  freebsd  (942M)
  1930320       63       - free -  (31k)
  1930383  1930257    2  freebsd  [active]  (942M)
  3860640     3024    3  freebsd  (1.5M)
  3863664    41328    4  freebsd  (20M)
  3904992  3926560       - free -  (1.9G)

=>      0  1930257  da0s1  BSD  (942M)
        0       16         - free -  (8.0k)
       16  1930241      1  !0  (942M)

=>      0  1930257  da0s2  BSD  (942M)
        0       16         - free -  (8.0k)
       16  1930241      1  !0  (942M)

=>        34  3907029101  ada4  GPT  (1.8T)
          34          94        - free -  (47k)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834703     2  freebsd-zfs  (1.8T)

[root@freenas] ~# glabel status
                                      Name  Status  Components
gptid/41b34ae2-19ea-11e2-ac4d-6805ca08a389     N/A  ada0p2
gptid/583367d1-198b-11e2-aa25-6805ca08a389     N/A  ada1p2
gptid/6eca644a-d1c9-11e1-b73e-00155d001316     N/A  ada2p2
gptid/6f65a903-d1c9-11e1-b73e-00155d001316     N/A  ada3p2
                             ufs/FreeNASs3     N/A  da0s3
                             ufs/FreeNASs4     N/A  da0s4
                    ufsid/5075d1f77192f9ac     N/A  da0s1a
                            ufs/FreeNASs1a     N/A  da0s1a
                            ufs/FreeNASs2a     N/A  da0s2a
gptid/24610372-25f0-11e2-ad34-6805ca08a389     N/A  ada4p2
[root@freenas] ~# 
 

Yell

Explorer
Joined
Oct 24, 2012
Messages
74
wait for the scrub to finish then remove the offline drive
Code:
zpool remove IppoDisk 14457425943962256445


(if you dont like waiting and dont care for you data you may cancle the scrub [read the man page] should "-s")
 

mikei

Dabbler
Joined
Aug 9, 2012
Messages
13
wait for the scrub to finish then remove the offline drive
Code:
zpool remove IppoDisk 14457425943962256445


(if you dont like waiting and dont care for you data you may cancle the scrub [read the man page] should "-s")

When I run it I get:

Code:
cannot remove 14457425943962256445: only inactive hot spares, cache, top-level, or log devices can be removed
 

mikei

Dabbler
Joined
Aug 9, 2012
Messages
13
Still struggling with this. The system will not allow me to remove ada3, when I do it trashes the pool. How do I get the system to allow me to remove the disk?

Code:
[root@freenas] ~# zpool status
  pool: IppoDisk
 state: DEGRADED
  scan: resilvered 15.3G in 2h5m with 0 errors on Sat Nov  3 23:55:05 2012
config:

	NAME                                            STATE     READ WRITE CKSUM
	IppoDisk                                        DEGRADED     0     0     0
	  gptid/6eca644a-d1c9-11e1-b73e-00155d001316    ONLINE       0     0     0
	  replacing-1                                   DEGRADED     0     0     0
	    gptid/6f65a903-d1c9-11e1-b73e-00155d001316  ONLINE       0     0     0
	    14457425943962256445                        OFFLINE      0     0     0  was /dev/gptid/dae9adc9-250c-11e2-b95a-6805ca08a389
	    7896334196074028922                         UNAVAIL      0     0     0  was /dev/ada4
	  gptid/583367d1-198b-11e2-aa25-6805ca08a389    ONLINE       0     0     0
	  gptid/41b34ae2-19ea-11e2-ac4d-6805ca08a389    ONLINE       0     0     0

errors: No known data errors
[root@freenas] ~# camcontrol devlist
<VB0250EAVER HPG0>                 at scbus0 target 0 lun 0 (pass0,ada0)
<ST32000542AS CC34>                at scbus1 target 0 lun 0 (pass1,ada1)
<ST32000542AS CC34>                at scbus2 target 0 lun 0 (pass2,ada2)
<ST32000542AS CC34>                at scbus3 target 0 lun 0 (pass3,ada3)
<EDGE DiskGO PMAP>                 at scbus6 target 0 lun 0 (pass4,da0)
[root@freenas] ~# gpart show
=>       34  488397101  ada0  GPT  (232G)
         34         94        - free -  (47k)
        128    4194304     1  freebsd-swap  (2.0G)
    4194432  484202703     2  freebsd-zfs  (230G)

=>        34  3907029101  ada1  GPT  (1.8T)
          34          94        - free -  (47k)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834703     2  freebsd-zfs  (1.8T)

=>        34  3907029101  ada2  GPT  (1.8T)
          34          94        - free -  (47k)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834703     2  freebsd-zfs  (1.8T)

=>        34  3907029101  ada3  GPT  (1.8T)
          34          94        - free -  (47k)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834702     2  freebsd-zfs  (1.8T)
  3907029134           1        - free -  (512B)

=>     63  7831489  da0  MBR  (3.8G)
       63  1930257    1  freebsd  (942M)
  1930320       63       - free -  (31k)
  1930383  1930257    2  freebsd  [active]  (942M)
  3860640     3024    3  freebsd  (1.5M)
  3863664    41328    4  freebsd  (20M)
  3904992  3926560       - free -  (1.9G)

=>      0  1930257  da0s1  BSD  (942M)
        0       16         - free -  (8.0k)
       16  1930241      1  !0  (942M)

=>      0  1930257  da0s2  BSD  (942M)
        0       16         - free -  (8.0k)
       16  1930241      1  !0  (942M)
 

mikei

Dabbler
Joined
Aug 9, 2012
Messages
13
Update.. I was able to detach the drives via
Code:
zpool detach IppoDisk 7896334196074028922 (and) 14457425943962256445 
Now I have a 'clean' list
Code:
[root@freenas] ~# zpool status -v
  pool: IppoDisk
 state: ONLINE
  scan: scrub in progress since Sun Nov  4 09:02:03 2012
        50.6G scanned out of 1.19T at 60.9M/s, 5h27m to go
        0 repaired, 4.15% done
config:

	NAME                                          STATE     READ WRITE CKSUM
	IppoDisk                                      ONLINE       0     0     0
	  gptid/6eca644a-d1c9-11e1-b73e-00155d001316  ONLINE       0     0     0
	  gptid/6f65a903-d1c9-11e1-b73e-00155d001316  ONLINE       0     0     0
	  gptid/583367d1-198b-11e2-aa25-6805ca08a389  ONLINE       0     0     0
	  gptid/41b34ae2-19ea-11e2-ac4d-6805ca08a389  ONLINE       0     0     0

errors: No known data errors
[root@freenas] ~# 
[root@freenas] ~# camcontrol devlist
<VB0250EAVER HPG0>                 at scbus0 target 0 lun 0 (pass0,ada0)
<ST32000542AS CC34>                at scbus1 target 0 lun 0 (pass1,ada1)
<ST32000542AS CC34>                at scbus2 target 0 lun 0 (pass2,ada2)
<ST32000542AS CC34>                at scbus3 target 0 lun 0 (pass3,ada3)
<EDGE DiskGO PMAP>                 at scbus6 target 0 lun 0 (pass4,da0)
[root@freenas] ~# 
[root@freenas] ~# gpart show
=>       34  488397101  ada0  GPT  (232G)
         34         94        - free -  (47k)
        128    4194304     1  freebsd-swap  (2.0G)
    4194432  484202703     2  freebsd-zfs  (230G)

=>        34  3907029101  ada1  GPT  (1.8T)
          34          94        - free -  (47k)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834703     2  freebsd-zfs  (1.8T)

=>        34  3907029101  ada2  GPT  (1.8T)
          34          94        - free -  (47k)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834703     2  freebsd-zfs  (1.8T)

=>        34  3907029101  ada3  GPT  (1.8T)
          34          94        - free -  (47k)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834702     2  freebsd-zfs  (1.8T)
  3907029134           1        - free -  (512B)

=>     63  7831489  da0  MBR  (3.8G)
       63  1930257    1  freebsd  (942M)
  1930320       63       - free -  (31k)
  1930383  1930257    2  freebsd  [active]  (942M)
  3860640     3024    3  freebsd  (1.5M)
  3863664    41328    4  freebsd  (20M)
  3904992  3926560       - free -  (1.9G)

=>      0  1930257  da0s1  BSD  (942M)
        0       16         - free -  (8.0k)
       16  1930241      1  !0  (942M)

=>      0  1930257  da0s2  BSD  (942M)
        0       16         - free -  (8.0k)
       16  1930241      1  !0  (942M)

[root@freenas] ~# 
[root@freenas] ~# glabel status
                                      Name  Status  Components
gptid/41b34ae2-19ea-11e2-ac4d-6805ca08a389     N/A  ada0p2
gptid/583367d1-198b-11e2-aa25-6805ca08a389     N/A  ada1p2
gptid/6eca644a-d1c9-11e1-b73e-00155d001316     N/A  ada2p2
gptid/6f65a903-d1c9-11e1-b73e-00155d001316     N/A  ada3p2
                             ufs/FreeNASs3     N/A  da0s3
                             ufs/FreeNASs4     N/A  da0s4
                    ufsid/5075d1f77192f9ac     N/A  da0s1a
                            ufs/FreeNASs1a     N/A  da0s1a
                            ufs/FreeNASs2a     N/A  da0s2a
[root@freenas] ~# 


I'm now scrubbing to get back to clean. However ada3 is still failing smart tests and I need to replace the disk.
 

mikei

Dabbler
Joined
Aug 9, 2012
Messages
13
Back to square one. Scrubbed disk and it still won't let me remove it.
Code:
Nov  4 11:25:05 freenas manage.py: [middleware.exceptions:38] [MiddlewareError: Disk offline failed: "cannot offline gptid/6f65a903-d1c9-11e1-b73e-00155d001316: no valid replicas, "]


help
 
Status
Not open for further replies.
Top