Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jun 2021 18:21:48 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 256582] ZFS unable to attach/replace disk to the mirror/raidz
Message-ID:  <bug-256582-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256582

            Bug ID: 256582
           Summary: ZFS unable to attach/replace disk to the mirror/raidz
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: serzh@expir.org

I had a mirror of root partition on four disk. It was created a long time a=
go,
last changes were made in 12.2-RELEASE

Yesterday I have faced a problem attaching new mirror to the pool, every ti=
me I
got an error like this:
cannot attach ada0s1 to diskid/DISK-K648T9125YHPs4: can only attach to mirr=
ors
and top-level disks

replace also didn't worked for me:
zpool replace tz diskid/DISK-K648T9125YHPs4 ada0s1
cannot replace diskid/DISK-K648T9125YHPs4 with ada0s1: already in
replacing/spare config; wait for completion or use 'zpool detach'

I was able to detach all the copies of the mirror, but even after left only=
 one
drive I sill was not able to add any mirrors to that pool

I even tried to do it on another machine with the same error.

Ok. maybe some problems with the pool, I wanted for a long time change mirr=
or
with raidz.

I have created new raidz pool on one disk, hoping to replace slices after
successful boot on the target machine. zfs send/receive have finished an the
system successfully booted from the new disk:

# zpool status -v t1
  pool: t1
 state: ONLINE
  scan: scrub repaired 0B in 00:10:16 with 0 errors on Sun Jun 13 19:43:27 =
2021
config:

        NAME        STATE     READ WRITE CKSUM
        t1          ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            ada0s1  ONLINE       0     0     0
            ada0s2  ONLINE       0     0     0
            ada0s3  ONLINE       0     0     0
            ada0s4  ONLINE       0     0     0

But I still unable to replace any disk in the pool:

# zpool replace t1 ada0s4 ada2s4
cannot replace ada0s4 with ada2s4: already in replacing/spare config; wait =
for
completion or use 'zpool detach'

# zdb -C t1

MOS Configuration:
        version: 5000
        name: 't1'
        state: 0
        txg: 1975
        pool_guid: 6410165186213320141
        errata: 0
        hostname: 'proxy.expir.org'
        com.delphix:has_per_vdev_zaps
        vdev_children: 1
        vdev_tree:
            type: 'root'
            id: 0
            guid: 6410165186213320141
            create_txg: 4
            children[0]:
                type: 'raidz'
                id: 0
                guid: 7617222505941286006
                nparity: 1
                metaslab_array: 256
                metaslab_shift: 30
                ashift: 9
                asize: 171779817472
                is_log: 0
                create_txg: 4
                com.delphix:vdev_zap_top: 129
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 8241112573820439777
                    path: '/dev/ada0s1'
                    whole_disk: 1
                    DTL: 1111
                    create_txg: 4
                    com.delphix:vdev_zap_leaf: 130
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 9546081964875052177
                    path: '/dev/ada0s2'
                    whole_disk: 1
                    DTL: 1110
                    create_txg: 4
                    com.delphix:vdev_zap_leaf: 131
                children[2]:
                    type: 'disk'
                    id: 2
                    guid: 14962733358913721879
                    path: '/dev/ada0s3'
                    whole_disk: 1
                    DTL: 1109
                    create_txg: 4
                    com.delphix:vdev_zap_leaf: 132
                children[3]:
                    type: 'disk'
                    id: 3
                    guid: 6900695808444206279
                    path: '/dev/ada0s4'
                    whole_disk: 1
                    DTL: 1108
                    create_txg: 4
                    com.delphix:vdev_zap_leaf: 133
        features_for_read:
            com.delphix:hole_birth
            com.delphix:embedded_data

I have tried to add new disks as spares, but still was not able to replace =
any
of the current members of raidz

What is going on? I think it is a bug, the error is certainly not related to
the current configuration.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-256582-227>