Project

General

Profile

Actions

Bug #4128

closed

disks in zpools never go away when pulled

Added by Robert Mustacchi about 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Category:
kernel
Start date:
2013-09-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

ZFS uses ldi_open_by_devid(9F), et al, to gain access to block devices when importing a pool. This bumps the devi_ref member of the opened device node, so that it doesn't become unreferenced (and thus freed) while we have it open. Unfortunately, very little will cause ZFS to actually close its LDI handle, and leave it closed; least of all with timing adequate to effect device removal.

As it turns out, LDI provides a basic facility for notifying the owner of an open handle that the device has been offlined (or otherwise faulted, removed, etc). This should really not be considered optional, as correct operation of device removal seems impossible without it. Regardless, ZFS needs to listen for these events and close its LDI handle at appropriate moments.

In addition to closing the device handle, we should also update the state of the vdev that was using the device to be REMOVED.

Actions #1

Updated by Robert Mustacchi almost 10 years ago

  • Status changed from New to Resolved
  • % Done changed from 90 to 100

Resolved in 39cddb10a31c1c2e66aed69e6871d09caa4c8147.

Actions

Also available in: Atom PDF