0

Before you read the title and roll your eyes, I've already read all of the various answers, posts, and articles that say you can't shrink a pool once you've made it. However, I saw this post which claims to do exactly that (i.e. remove a device from an active pool and shrink the pool to use the remaining disks). I tried to do it on my storage host and got this:

root@file2:~# zpool remove datastore sdh
cannot remove sdh: only inactive hot spares, cache, top-level, or log devices can be removed

So, I'm guessing I'm using an older/different version of zfs. Does anyone have experience with using this functionality? Am I totally wrong and it's still impossible?

If it matters, I'm running Ubuntu 15.10.

Ross Tajvar
  • 31
  • 1
  • 6
  • 1
    Looks like this will be available in the 0.8.0 release (currently at the rc2 level, not yet production) - see https://stackoverflow.com/questions/40714527/removing-disk-from-zfs-pool-permanently for more discussion. – James Moore Dec 02 '18 at 17:44

3 Answers3

3

This feature is not yet part of ZFS on Linux. There is an open feature request to implement it:

https://github.com/zfsonlinux/zfs/issues/3371

mzhaase
  • 3,798
  • 2
  • 20
  • 32
2

Device removal is available for on from v8.0-rc1 (2018-09-08):

New Features

  • Native encryption
  • Device removal
  • ...

Also available in from 11.4 Beta.

Note: As of 2019-02-17 the latest is v8.0-rc3 and the stable v8.0 will be a future release.

1

So, I'm guessing I'm using an older/different version of zfs.

Yes, you are using ZFS on Linux and the blog is about OpenZFS on Delphix. They are not the same thing.

Am I totally wrong and it's still impossible?

You already know the answer to this question, at least in relation to the version of ZoL on Ubuntu

root@file2:~# zpool remove datastore sdh cannot remove sdh: only inactive hot spares, cache, top-level, or log devices can be removed

user9517
  • 115,471
  • 20
  • 215
  • 297
  • 1
    I get this complaint from zpool even when trying to remove a cache drive, removing it by its gid instead of its dev device worked (show with `#zpool status -g`), maybe I just need a healthy dose of manuals, thought I don't see in the manual anything that clarifies valid "device"-syntax – ThorSummoner Sep 05 '18 at 04:25