2

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. :-(

nagylzs
  • 657
  • 2
  • 8
  • 21

1 Answers1

1

I think the command you're looking for is zpool offline, like this:

zpool offline data ada1
zpool labelclear ada1
zpool replace data ada1 ada1

That last replace might not work specifying the first ada1. If it doesn't, use zpool list or zdb to get the disk GUID. See https://askubuntu.com/questions/305830/replacing-a-dead-disk-in-a-zpool

longneck
  • 22,793
  • 4
  • 50
  • 84
  • I got this: labelclear operation failed. Vdev /dev/ada1 is a member (ACTIVE), of pool "data". To remove label information from this device, export or destroy the pool, or remove /dev/ada1 from the configuration of this pool and retry the labelclear operation – nagylzs Sep 09 '16 at 19:39