In my RAIDZ2 array a disk has been marked as faulted because of lots of bad sector messages. I've contacted the shop where I bought the disk and it can be swapped under warranty. So, the question is how to proceed. The pool status is:
The steps I want to take are:
The only thing that worries me is the partitioning of the new disk. Currently the disk has the following layout:
Is this the correct way to handle this? I cannot do a
as I need to exchange the faulted disk and I don't have a spare.
Code:
# zpool status vault
pool: vault
state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
repaired.
scan: scrub repaired 0 in 21h44m with 0 errors on Fri Mar 28 14:11:22 2014
config:
NAME STATE READ WRITE CKSUM
vault DEGRADED 0 0 0
raidz2-0 DEGRADED 0 0 0
gpt/WD3T01 ONLINE 0 0 0
gpt/WD3T02 ONLINE 0 0 0
gpt/WD3T03 ONLINE 0 0 0
gpt/WD3T04 ONLINE 0 0 0
gpt/WD3T05 FAULTED 0 394 0 too many errors
gpt/WD3T06 ONLINE 0 0 0
errors: No known data errors
The steps I want to take are:
- Remove the faulted disk from the array:
Code:# zpool detach vault gpt/WD3T05
- Determine which disk I need to replace using the serial number from
camcontrol identify
and remove the disk, go to the store to get the replacement disk, and put the new disk in. Also make sure to add some labels to each disk for easier identification next time. - Prepare the new disk:
Code:# gpart create -s gpt -l WD3T07 -t freebsd-zfs <device> # gnop create -S 4096 /dev/gpt/WD3T07
- Add the new partition to the array:
Code:# zpool add vault /dev/gpt/WD3T07.nop # gnop destroy /dev/gpt/WD3T07.nop
The only thing that worries me is the partitioning of the new disk. Currently the disk has the following layout:
Code:
# gpart list ada6
Geom name: ada6
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 5860533134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada6p1
Mediasize: 3000592941056 (2.7T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
rawuuid: 4e88bd89-058e-11e2-a165-bc5ff4458016
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: WD3T05
length: 3000592941056
offset: 20480
type: freebsd-zfs
index: 1
end: 5860533127
start: 40
Consumers:
1. Name: ada6
Mediasize: 3000592982016 (2.7T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e3
Is this the correct way to handle this? I cannot do a
Code:
# zpool replace vault gpt/WD3T05 gpt/WD3T07