Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zpool replace unable to use disks with hotspares #1754

Closed
simonjgreen opened this issue Sep 27, 2013 · 6 comments
Closed

zpool replace unable to use disks with hotspares #1754

simonjgreen opened this issue Sep 27, 2013 · 6 comments
Milestone

Comments

@simonjgreen
Copy link

root@nas2:~# zpool status
  pool: data
 state: DEGRADED
status: One or more devices has been taken offline by the administrator.
        Sufficient replicas exist for the pool to continue functioning in a
        degraded state.
action: Online the device using 'zpool online' or replace the device with
        'zpool replace'.
  scan: resilvered 64.3M in 0h8m with 0 errors on Thu Jul 18 12:56:58 2013
config:

        NAME        STATE     READ WRITE CKSUM
        data        DEGRADED     0     0     0
          raidz1-0  DEGRADED     0     0     0
            A0      ONLINE       0     0     0
            A1      ONLINE       0     0     0
            A2      ONLINE       0     0     0
            A3      ONLINE       0     0     0
            B0      ONLINE       0     0     0
            B1      ONLINE       0     0     0
            B2      OFFLINE      0     0     0
            B3      ONLINE       0     0     0
          raidz1-1  DEGRADED     0     0     0
            A4      ONLINE       0     0     0
            A5      ONLINE       0     0     0
            A6      ONLINE       0     0     0
            A7      ONLINE       0     0     0
            B4      ONLINE       0     0     0
            B5      ONLINE       0     0     0
            B6      OFFLINE      0     0     0
            B7      ONLINE       0     0     0
          raidz1-2  ONLINE       0     0     0
            A8      ONLINE       0     0     0
            A9      ONLINE       0     0     0
            A10     ONLINE       0     0     0
            A11     ONLINE       0     0     0
            B8      ONLINE       0     0     0
            B9      ONLINE       0     0     0
            B10     ONLINE       0     0     0
            B11     ONLINE       0     0     0
          raidz1-3  ONLINE       0     0     0
            A12     ONLINE       0     0     0
            A13     ONLINE       0     0     0
            A14     ONLINE       0     0     0
            A15     ONLINE       0     0     0
            B12     ONLINE       0     0     0
            B13     ONLINE       0     0     0
            B14     ONLINE       0     0     0
            B15     ONLINE       0     0     0
        spares
          A16       AVAIL
          A17       AVAIL
          B16       AVAIL
          B17       AVAIL

errors: No known data errors

root@nas2:# zpool replace data B2 B16
cannot open '/dev/disk/by-vdev/B16': Device or resource busy


root@nas2:# strace zpool replace data B2 B16
execve("/sbin/zpool", ["zpool", "replace", "data", "B2", "B16"], [/* 15 vars /]) = 0
brk(0) = 0x884000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f91d79e3000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=30715, ...}) = 0
mmap(NULL, 30715, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f91d79db000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libnvpair.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260>\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=76064, ...}) = 0
mmap(NULL, 2171240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f91d75b0000
mprotect(0x7f91d75c2000, 2093056, PROT_NONE) = 0
mmap(0x7f91d77c1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x7f91d77c1000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libuutil.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260P\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=69256, ...}) = 0
mmap(NULL, 2168920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f91d739e000
mprotect(0x7f91d73ae000, 2093056, PROT_NONE) = 0
mmap(0x7f91d75ad000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x7f91d75ad000
mmap(0x7f91d75af000, 2136, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f91d75af000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libzpool.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\226\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1097512, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f91d79da000
mmap(NULL, 3243608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f91d7086000
mprotect(0x7f91d718d000, 2097152, PROT_NONE) = 0
mmap(0x7f91d738d000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x107000) = 0x7f91d738d000
mmap(0x7f91d7392000, 48728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f91d7392000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libzfs.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\203\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=253992, ...}) = 0
mmap(NULL, 2349240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f91d6e48000
mprotect(0x7f91d6e84000, 2097152, PROT_NONE) = 0
mmap(0x7f91d7084000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3c000) = 0x7f91d7084000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\25\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=18896, ...}) = 0
mmap(NULL, 2113944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f91d6c43000
mprotect(0x7f91d6c47000, 2093056, PROT_NONE) = 0
mmap(0x7f91d6e46000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f91d6e46000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200l\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=135366, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f91d79d9000
mmap(NULL, 2212904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f91d6a26000
mprotect(0x7f91d6a3e000, 2093056, PROT_NONE) = 0
mmap(0x7f91d6c3d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f91d6c3d000
mmap(0x7f91d6c3f000, 13352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f91d6c3f000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1811128, ...}) = 0
mmap(NULL, 3925208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f91d6667000
mprotect(0x7f91d681c000, 2093056, PROT_NONE) = 0
mmap(0x7f91d6a1b000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b4000) = 0x7f91d6a1b000
mmap(0x7f91d6a21000, 17624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f91d6a21000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31752, ...}) = 0
mmap(NULL, 2128984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f91d645f000
mprotect(0x7f91d6466000, 2093056, PROT_NONE) = 0
mmap(0x7f91d6665000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f91d6665000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P \0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=92720, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f91d79d8000
mmap(NULL, 2187824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f91d6248000
mprotect(0x7f91d625e000, 2093056, PROT_NONE) = 0
mmap(0x7f91d645d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f91d645d000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0pU\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1030512, ...}) = 0
mmap(NULL, 3125544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f91d5f4c000
mprotect(0x7f91d6047000, 2093056, PROT_NONE) = 0
mmap(0x7f91d6246000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfa000) = 0x7f91d6246000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f91d79d7000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f91d79d5000
arch_prctl(ARCH_SET_FS, 0x7f91d79d5b80) = 0
mprotect(0x7f91d6a1b000, 16384, PROT_READ) = 0
mprotect(0x7f91d6246000, 4096, PROT_READ) = 0
mprotect(0x7f91d645d000, 4096, PROT_READ) = 0
mprotect(0x7f91d6c3d000, 4096, PROT_READ) = 0
mprotect(0x7f91d6665000, 4096, PROT_READ) = 0
mprotect(0x7f91d6e46000, 4096, PROT_READ) = 0
mprotect(0x7f91d75ad000, 4096, PROT_READ) = 0
mprotect(0x7f91d77c1000, 4096, PROT_READ) = 0
mprotect(0x7f91d738d000, 4096, PROT_READ) = 0
mprotect(0x7f91d7084000, 4096, PROT_READ) = 0
mprotect(0x619000, 4096, PROT_READ) = 0
mprotect(0x7f91d79e5000, 4096, PROT_READ) = 0
munmap(0x7f91d79db000, 30715) = 0
set_tid_address(0x7f91d79d5e50) = 10988
set_robust_list(0x7f91d79d5e60, 0x18) = 0
futex(0x7fffb8eb6f0c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7f91d79d5b80) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7f91d6a2c750, [], SA_RESTORER|SA_SIGINFO, 0x7f91d6a35cb0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f91d6a2c7e0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f91d6a35cb0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192
1024, rlim_max=RLIM_INFINITY}) = 0
brk(0) = 0x884000
brk(0x8a5000) = 0x8a5000
access("/sys/module/zfs", F_OK) = 0
open("/dev/zfs", O_RDWR) = 3
open("/etc/mtab", O_RDONLY) = 4
open("/etc/dfs/sharetab", O_RDONLY) = 5
open("/etc/dfs/sharetab", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f91d79e2000
read(6, "", 4096) = 0
close(6) = 0
munmap(0x7f91d79e2000, 4096) = 0
ioctl(3, 0x5a04, 0x7fffb8eb2920) = 0
ioctl(3, 0x5a12, 0x7fffb8eb2920) = 0
ioctl(3, 0x5a05, 0x7fffb8eae2f0) = 0
brk(0x8c6000) = 0x8c6000
ioctl(3, 0x5a14, 0x7fffb8eb28f0) = 0
ioctl(3, 0x5a14, 0x7fffb8eae2f0) = -1 ESRCH (No such process)
ioctl(3, 0x5a2a, 0x7fffb8eab170) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=756, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f91d79e2000
lseek(4, 0, SEEK_SET) = 0
read(4, "/dev/mapper/nas2-root / ext4 rw,"..., 4096) = 756
ioctl(3, 0x5a14, 0x7fffb8eb28f0) = 0
ioctl(3, 0x5a14, 0x7fffb8eae2f0) = -1 ESRCH (No such process)
lseek(4, 756, SEEK_SET) = 756
ioctl(3, 0x5a14, 0x7fffb8eb28f0) = -1 ENOMEM (Cannot allocate memory)
ioctl(3, 0x5a14, 0x7fffb8eb28f0) = 0
ioctl(3, 0x5a14, 0x7fffb8eae2f0) = -1 ESRCH (No such process)
lseek(4, 756, SEEK_SET) = 756
ioctl(3, 0x5a14, 0x7fffb8eb28f0) = 0
ioctl(3, 0x5a14, 0x7fffb8eae2f0) = -1 ESRCH (No such process)
lseek(4, 756, SEEK_SET) = 756
ioctl(3, 0x5a14, 0x7fffb8eb28f0) = -1 ESRCH (No such process)
lseek(4, 756, SEEK_SET) = 756
mkdir("/etc/dfs", 0755) = -1 EEXIST (File exists)
open("/etc/dfs/sharetab.zU93uQ", O_RDWR|O_CREAT|O_EXCL, 0600) = 6
fcntl(6, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(6, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f91d79e1000
lseek(6, 0, SEEK_CUR) = 0
fsync(6) = 0
close(6) = 0
munmap(0x7f91d79e1000, 4096) = 0
rename("/etc/dfs/sharetab.zU93uQ", "/etc/dfs/sharetab") = 0
close(3) = 0
close(4) = 0
munmap(0x7f91d79e2000, 4096) = 0
close(5) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1613376, ...}) = 0
mmap(NULL, 1613376, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f91d784b000
close(3) = 0
access("/sys/module/zfs", F_OK) = 0
open("/dev/zfs", O_RDWR) = 3
open("/etc/mtab", O_RDONLY) = 4
open("/etc/dfs/sharetab", O_RDONLY) = 5
ioctl(3, 0x5a05, 0x7fffb8eae820) = 0
access("/dev/disk/by-vdev/B16", F_OK) = 0
open("/dev/disk/by-vdev/B16", O_RDWR|O_EXCL|O_DIRECT) = -1 EBUSY (Device or resource busy)
stat("/dev/disk/by-vdev/B16", {st_mode=S_IFBLK|0660, st_rdev=makedev(66, 48), ...}) = 0
open("/dev/disk/by-vdev/B16", O_RDONLY|O_EXCL) = -1 EBUSY (Device or resource busy)
open("/dev/disk/by-vdev/B16", O_RDONLY) = 6
fstat(6, {st_mode=S_IFBLK|0660, st_rdev=makedev(66, 48), ...}) = 0
mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f91d780a000
pread(6, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 262144, 0) = 262144
pread(6, "\f\261\272\0\0\0\0\0\34\0\0\0\0\0\0\0\0\311\0\0\0\0\0\0w5\251\177\7\21\263j"..., 262144, 262144) = 262144
pread(6, 0x7f91d780a010, 262144, 18446744073709027328) = -1 EINVAL (Invalid argument)
pread(6, 0x7f91d780a010, 262144, 18446744073709289472) = -1 EINVAL (Invalid argument)
munmap(0x7f91d780a000, 266240) = 0
close(6) = 0
open("/dev/disk/by-vdev/B16", O_WRONLY|O_EXCL) = -1 EBUSY (Device or resource busy)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f91d784a000
read(6, "# Locale name alias data base.\n#"..., 4096) = 2570
read(6, "", 4096) = 0
close(6) = 0
munmap(0x7f91d784a000, 4096) = 0
open("/usr/share/locale/en_GB/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_GB/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_GB/LC_MESSAGES/zfs-linux-user.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/zfs-linux-user.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_GB/LC_MESSAGES/zfs-linux-user.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/zfs-linux-user.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "cannot open '/dev/disk/by-vdev/B"..., 61cannot open '/dev/disk/by-vdev/B16': Device or resource busy
) = 61
close(3) = 0
close(4) = 0
close(5) = 0
exit_group(1) = ?
root@nas2:~#

@simonjgreen
Copy link
Author

This is also possibly relevant:

root@nas2:~# cat /etc/zfs/vdev_id.conf
multipath       no
topology        sas_direct
phys_per_port   4
#       PCI     HBA     NAME
channel 0a:00.0 0       A
channel 0a:00.0 1       B

@simonjgreen
Copy link
Author

If I remove the disk from the pool of spares then I can replace with no issues:

root@nas2:~# zpool remove data B16
root@nas2:~# zpool status
  pool: data
 state: DEGRADED
status: One or more devices has been taken offline by the administrator.
        Sufficient replicas exist for the pool to continue functioning in a
        degraded state.
action: Online the device using 'zpool online' or replace the device with
        'zpool replace'.
  scan: resilvered 64.3M in 0h8m with 0 errors on Thu Jul 18 12:56:58 2013
config:
        NAME        STATE     READ WRITE CKSUM
        data        DEGRADED     0     0     0
          raidz1-0  DEGRADED     0     0     0
            A0      ONLINE       0     0     0
            A1      ONLINE       0     0     0
            A2      ONLINE       0     0     0
            A3      ONLINE       0     0     0
            B0      ONLINE       0     0     0
            B1      ONLINE       0     0     0
            B2      OFFLINE      0     0     0
            B3      ONLINE       0     0     0
          raidz1-1  DEGRADED     0     0     0
            A4      ONLINE       0     0     0
            A5      ONLINE       0     0     0
            A6      ONLINE       0     0     0
            A7      ONLINE       0     0     0
            B4      ONLINE       0     0     0
            B5      ONLINE       0     0     0
            B6      OFFLINE      0     0     0
            B7      ONLINE       0     0     0
          raidz1-2  ONLINE       0     0     0
            A8      ONLINE       0     0     0
            A9      ONLINE       0     0     0
            A10     ONLINE       0     0     0
            A11     ONLINE       0     0     0
            B8      ONLINE       0     0     0
            B9      ONLINE       0     0     0
            B10     ONLINE       0     0     0
            B11     ONLINE       0     0     0
          raidz1-3  ONLINE       0     0     0
            A12     ONLINE       0     0     0
            A13     ONLINE       0     0     0
            A14     ONLINE       0     0     0
            A15     ONLINE       0     0     0
            B12     ONLINE       0     0     0
            B13     ONLINE       0     0     0
            B14     ONLINE       0     0     0
            B15     ONLINE       0     0     0
        spares
          A16       AVAIL
          A17       AVAIL
          B17       AVAIL
errors: No known data errors
root@nas2:~# zpool replace data B2 B16
root@nas2:~# zpool status
  pool: data
 state: DEGRADED
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
  scan: resilver in progress since Fri Sep 27 09:49:58 2013
    68.5M scanned out of 13.9T at 2.36M/s, (scan is slow, no estimated time)
    2.10M resilvered, 0.00% done
config:
        NAME             STATE     READ WRITE CKSUM
        data             DEGRADED     0     0     0
          raidz1-0       DEGRADED     0     0     0
            A0           ONLINE       0     0     0
            A1           ONLINE       0     0     0
            A2           ONLINE       0     0     0
            A3           ONLINE       0     0     0
            B0           ONLINE       0     0     0
            B1           ONLINE       0     0     0
            replacing-6  OFFLINE      0     0     0
              B2         OFFLINE      0     0     0
              B16        ONLINE       0     0     0  (resilvering)
            B3           ONLINE       0     0     0
          raidz1-1       DEGRADED     0     0     0
            A4           ONLINE       0     0     0
            A5           ONLINE       0     0     0
            A6           ONLINE       0     0     0
            A7           ONLINE       0     0     0
            B4           ONLINE       0     0     0
            B5           ONLINE       0     0     0
            B6           OFFLINE      0     0     0
            B7           ONLINE       0     0     0
          raidz1-2       ONLINE       0     0     0
            A8           ONLINE       0     0     0
            A9           ONLINE       0     0     0
            A10          ONLINE       0     0     0
            A11          ONLINE       0     0     0
            B8           ONLINE       0     0     0
            B9           ONLINE       0     0     0
            B10          ONLINE       0     0     0
            B11          ONLINE       0     0     0
          raidz1-3       ONLINE       0     0     0
            A12          ONLINE       0     0     0
            A13          ONLINE       0     0     0
            A14          ONLINE       0     0     0
            A15          ONLINE       0     0     0
            B12          ONLINE       0     0     0
            B13          ONLINE       0     0     0
            B14          ONLINE       0     0     0
            B15          ONLINE       0     0     0
        spares
          A16            AVAIL
          A17            AVAIL
          B17            AVAIL
errors: No known data errors

@Ukko-Ylijumala
Copy link

I thought hotspares were fixed with #250

Which version of ZoL?

@behlendorf
Copy link
Contributor

@simonjgreen This was fixed back for the 0.6.1 tag, can you please include your ZoL version. Perhaps there's another subtle case which was missed.

@simonjgreen
Copy link
Author

apologies you are right, i was on 0.6.0.

@behlendorf
Copy link
Contributor

@simonjgreen No problem, "already fixed" is my favorite kind of bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants