Given a raidz1 vdev on FreeBSD 10 with this config:
root@gw:~ # zpool status
pool: data
state: ONLINE
status: One or more devices are configured to use a non-native block size.
Expect reduced performance.
action: Replace affected devices with devices that support the
configured block size, or migrate data to a properly configured
pool.
scan: resilvered 26.1G in 0h43m with 0 errors on Sat Dec 21 07:07:41 2013
config:
NAME STATE READ WRITE CKSUM
data ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0 block size: 512B configured, 4096B native
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0 block size: 512B configured, 4096B native
errors: No known data errors
I would like to correct for the blocksize. Is it possible to change the blocksize without offlining the pool? I just wanted to know if these are the right commands to execute. I could try without asking, but the devil never sleeps...
zpool detach data ada1
zpool labelclear ada1
zpool attach data ada1
Is it the right way to do it?
UPDATE - things I have tried:
"zpool remove" could be used to remove ada1 before clearing and adding it again. But "zpool remove" does not support raidz vdevs.
"zpool replace --f ada1" could be used to forcedly rebuild ada1 like if it was a new devide, but zpool does not allow this (even not forcedly) for a device that is already part of an active
I believe that I could achieve this the following way:
- shut down the system
- remove ada1 and wipe data on it completely
- put back ada1
- start up the system
- then issue "zpool replace data ada1"
Could this work? But only after shutting down the computer completely. :-(
I think the command you're looking for is
zpool offline
, like this:That last
replace
might not work specifying the firstada1
. If it doesn't, usezpool list
orzdb
to get the disk GUID. See https://askubuntu.com/questions/305830/replacing-a-dead-disk-in-a-zpool