Project

General

Profile

Bug #6922

Emit ESC_ZFS_VDEV_REMOVE_AUX after removing an aux device

Added by Alan Somers over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2016-04-19
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

Description

ZFS does not do a config_sync after removing an aux (spare, log, or cache) device. AFAICT this isn't being done because it is slow and was deemed unnecessary. However, it should be such a rare operation that speed doesn't matter, and not doing it results in two problems:

1) It is theoretically possible to remove an aux device from one pool and attach it to another, then lose power. When power is restored, both pools would think that they own the aux device.

2) Removal of the aux device doesn't send any useful sysevents to userland.

History

#1

Updated by Alan Somers over 3 years ago

In the discussion at https://github.com/openzfs/openzfs/pull/99 we decided not to do a config_sync when removing an aux device. Instead, we'll create a new sysevent type and emit that when removing an aux device. The issue title, which I do not have permissions to change, should say "Emit ESC_ZFS_VDEV_REMOVE_AUX after removing an aux device"

#2

Updated by Igor Kozhukhov over 3 years ago

  • Subject changed from Always do a config sync after removing an aux device to Emit ESC_ZFS_VDEV_REMOVE_AUX after removing an aux device
#3

Updated by Electric Monk over 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 63364b0ee2604783e7a55f8425888867768eafa4

commit  63364b0ee2604783e7a55f8425888867768eafa4
Author: Alan Somers <asomers@gmail.com>
Date:   2016-05-24T00:19:51.000Z

    6922 Emit ESC_ZFS_VDEV_REMOVE_AUX after removing an aux device
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF