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.

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.

  • Changed this to the accepted answer as it is more accurate now. – Ross Tajvar Feb 25 at 7:36
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

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

  • 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 5 '18 at 4:25

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.