mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-06-28 12:07:40 +03:00

* Detect IO errors during device removal While device removal cannot verify the checksums of individual blocks during device removal, it can reasonably detect hard IO errors from the leaf vdevs. Failure to perform this error checking can result in device removal completing successfully, but moving no data which will permanently corrupt the pool. Situation 1: faulted/degraded vdevs In the configuration shown below, the removal of mirror-0 will permanently corrupt the pool. Device removal will preferentially copy data from 'vdev1 -> vdev3' and from 'vdev2 -> vdev4'. Which in this case will result in nothing being copied since one vdev in each of those groups in unavailable. However, device removal will complete successfully since all IO errors are ignored. tank DEGRADED 0 0 0 mirror-0 DEGRADED 0 0 0 /var/tmp/vdev1 FAULTED 0 0 0 external fault /var/tmp/vdev2 ONLINE 0 0 0 mirror-1 DEGRADED 0 0 0 /var/tmp/vdev3 ONLINE 0 0 0 /var/tmp/vdev4 FAULTED 0 0 0 external fault This issue is resolved by updating the source child selection logic to exclude unreadable leaf vdevs. Additionally, unwritable destination child vdevs which can never succeed are skipped to prevent generating a large number of write IO errors. Situation 2: individual hard IO errors During removal if an unexpected hard IO error is encountered when either reading or writing the child vdev the entire removal operation is cancelled. While it may be possible to reconstruct the data after removal that cannot be guaranteed. The only strictly safe thing to do is to cancel the removal. As a future improvement we may want to instead suspend the removal process and allow the damaged region to be retried. But that work is left for another time, hard IO errors during the removal process are expected to be exceptionally rare. Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Tom Caputi <tcaputi@datto.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #6900 Closes #8161
34 lines
1.3 KiB
Makefile
34 lines
1.3 KiB
Makefile
#
|
|
# This file and its contents are supplied under the terms of the
|
|
# Common Development and Distribution License ("CDDL"), version 1.0.
|
|
# You may only use this file in accordance with the terms of version
|
|
# 1.0 of the CDDL.
|
|
#
|
|
# A full copy of the text of the CDDL should have accompanied this
|
|
# source. A copy of the CDDL is also available via the Internet at
|
|
# http://www.illumos.org/license/CDDL.
|
|
#
|
|
|
|
#
|
|
# Copyright (c) 2014, 2015 by Delphix. All rights reserved.
|
|
#
|
|
|
|
pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/removal
|
|
|
|
dist_pkgdata_SCRIPTS = \
|
|
cleanup.ksh removal_all_vdev.ksh removal_check_space.ksh \
|
|
removal_condense_export.ksh removal_multiple_indirection.ksh \
|
|
removal_remap_deadlists.ksh removal_remap.ksh \
|
|
removal_reservation.ksh removal_resume_export.ksh \
|
|
removal_sanity.ksh removal_with_add.ksh removal_with_create_fs.ksh \
|
|
removal_with_dedup.ksh removal_with_errors.ksh \
|
|
removal_with_export.ksh removal_with_faulted.ksh \
|
|
removal_with_ganging.ksh removal_with_remap.ksh \
|
|
removal_with_remove.ksh removal_with_scrub.ksh \
|
|
removal_with_send.ksh removal_with_send_recv.ksh \
|
|
removal_with_snapshot.ksh removal_with_write.ksh \
|
|
removal_with_zdb.ksh remove_mirror.ksh remove_mirror_sanity.ksh \
|
|
remove_raidz.ksh remove_expanded.ksh removal.kshlib
|
|
|
|
pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/removal
|