diff options
author | Paul Zuchowski <31706010+PaulZ-98@users.noreply.github.com> | 2018-06-07 21:07:29 -0400 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2018-06-07 18:07:29 -0700 |
commit | 2ffd89fcb90969bd9e3a118cfe373dd356d1519a (patch) | |
tree | 1d2492c9dcef30ba37227e6fda0b0cf95a69973c /lib | |
parent | 174bcd581d546be77d055273d2bad67cc854fc01 (diff) |
Wrong error message when removing log device
In the case where the pool is loaded without the crypto
keys necessary to playback the intent log, and log device
removal is attempted, a generic busy message is received.
Change the message to inform the user that the datasets
must be mounted.
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Paul Zuchowski <pzuchowski@datto.com>
Closes #7518
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_pool.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index 16b30d177..ef98b25bc 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -24,7 +24,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2018 by Delphix. All rights reserved. * Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com> - * Copyright (c) 2017 Datto Inc. + * Copyright (c) 2018 Datto Inc. * Copyright (c) 2017 Open-E, Inc. All Rights Reserved. */ @@ -3293,11 +3293,26 @@ zpool_vdev_remove(zpool_handle_t *zhp, const char *path) break; case EBUSY: - zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, - "Pool busy; removal may already be in progress")); + if (islog) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "Mount encrypted datasets to replay logs.")); + } else { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "Pool busy; removal may already be in progress")); + } (void) zfs_error(hdl, EZFS_BUSY, msg); break; + case EACCES: + if (islog) { + zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, + "Mount encrypted datasets to replay logs.")); + (void) zfs_error(hdl, EZFS_BUSY, msg); + } else { + (void) zpool_standard_error(hdl, errno, msg); + } + break; + default: (void) zpool_standard_error(hdl, errno, msg); } |