Project

General

Profile

Actions

Bug #7614

closed

zfs device evacuation/removal

Added by Matthew Ahrens about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
High
Category:
zfs - Zettabyte File System
Start date:
2018-04-03
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

This project allows top-level vdevs to be removed from the storage pool with “zpool remove”, reducing the total amount of storage in the pool. This operation copies all allocated regions of the device to be removed onto other devices, recording the mapping from old to new location. After the removal is complete, read and free operations to the removed (now “indirect”) vdev must be remapped and performed at the new location on disk. The indirect mapping table is kept in memory whenever the pool is loaded, so there is minimal performance overhead when doing operations on the indirect vdev.

The size of the in-memory mapping table will be reduced when its entries become “obsolete” because they are no longer used by any block pointers in the pool. An entry becomes obsolete when all the blocks that use it are freed. An entry can also become obsolete when all the snapshots that reference it are deleted, and the block pointers that reference it have been “remapped” in all filesystems/zvols (and clones). Whenever an indirect block is written, all the block pointers in it will be “remapped” to their new (concrete) locations if possible. This process can be accelerated by using the “zfs remap” command to proactively rewrite all indirect blocks that reference indirect (removed) vdevs.

Note that when a device is removed, we do not verify the checksum of the data that is copied. This makes the process much faster, but if it were used on redundant vdevs (i.e. mirror or raidz vdevs), it would be possible to copy the wrong data, when we have the correct data on e.g. the other side of the mirror. Therefore, mirror and raidz devices can not be removed.


Subtasks 1 (0 open1 closed)

Bug #9434: Speculative prefetch is blocked by device removal codeClosedAlexander Motin2018-04-03

Actions

Related issues

Related to illumos gate - Feature #10166: loader: support com.delphix:removingClosedToomas Soome2018-12-26

Actions
Has duplicate illumos gate - Feature #6903: delphix vdev/device removal/evacuationClosed2016-04-11

Actions
Actions #1

Updated by Yuri Pankov over 6 years ago

  • Has duplicate Feature #6903: delphix vdev/device removal/evacuation added
Actions #2

Updated by Electric Monk almost 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 5cabbc6b49070407fb9610cfe73d4c0e0dea3e77

commit  5cabbc6b49070407fb9610cfe73d4c0e0dea3e77
Author: Prashanth Sreenivasa <pks@delphix.com>
Date:   2018-01-10T16:00:10.000Z

    7614 zfs device evacuation/removal
    Reviewed by: Alex Reece <alex@delphix.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: John Kennedy <john.kennedy@delphix.com>
    Reviewed by: Prakash Surya <prakash.surya@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Richard Laager <rlaager@wiktel.com>
    Reviewed by: Tim Chase <tim@chase2k.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Actions #3

Updated by Toomas Soome about 4 years ago

  • Related to Feature #10166: loader: support com.delphix:removing added
Actions

Also available in: Atom PDF