Which version of ZFS allows shrinking of a pool?
Solution 1
No current release can shrink a pool and I have not heard any announcements of an upcoming feature to do so. Considering how rare it is that a properly designed pool would need the ability, I wouldn't expect it anytime soon.
Solution 2
The new ZFS version in Solaris 11.4 allows shrinkage of arrays. Say you have 5-disk array, you can now shrink to 4-disk array.
And, dedup has been fixed! It is using Greenbyte superior deduplication.
Solution 3
I cant find that it is supported, yet anyways.
Here's a printout from my Solaris 11 Express running ZFS pool version 31.
zpool upgrade -v
This system is currently running ZFS pool version 31.
The following versions are supported:
VER DESCRIPTION
--- --------------------------------------------------------
1 Initial ZFS version
2 Ditto blocks (replicated metadata)
3 Hot spares and double parity RAID-Z
4 zpool history
5 Compression using the gzip algorithm
6 bootfs pool property
7 Separate intent log devices
8 Delegated administration
9 refquota and refreservation properties
10 Cache devices
11 Improved scrub performance
12 Snapshot properties
13 snapused property
14 passthrough-x aclinherit
15 user/group space accounting
16 stmf property support
17 Triple-parity RAID-Z
18 Snapshot user holds
19 Log device removal
20 Compression using zle (zero-length encoding)
21 Deduplication
22 Received properties
23 Slim ZIL
24 System attributes
25 Improved scrub stats
26 Improved snapshot deletion performance
27 Improved snapshot creation performance
28 Multiple vdev replacements
29 RAID-Z/mirror hybrid allocator
30 Encryption
31 Improved 'zfs list' performance
For more information on a particular version, including supported releases,
see the ZFS Administration Guide.
Solution 4
It looks that Alex Reece works on implementing the feature in the OpenZFS project: OpenZFS Device Removal blog.
Thorough ZFS in Solaris and OpenZFS are two different projects (see Wikipedia: ZFS).
Related videos on Youtube
![700 Software](https://i.stack.imgur.com/s77Za.jpg?s=256&g=1)
700 Software
Updated on September 17, 2022Comments
-
700 Software almost 2 years
I found a list of versions and their Solaris release numbers http://download.oracle.com/docs/cd/E19253-01/819-5461/appendixa-1/index.html
I know that you can grow a pool by replacing drives with larger ones or adding new drives or mirrors to the pool. I heard that ZFS did not yet support shrinking pools by removing drives/mirrors. But that has probably been changed.
Which version (if any) released the ability to shrink a pool?
-
Aleksandr Levchuk about 13 yearsA really desired feature if you have disk fail with no ability to find a replacement. In that case some free space can be traded-in to restore the ZRAID redundancy.
-
700 Software about 13 years@Aleksandr: Interesting concept :) You could use free space for redundancy even if there was no failure in disks. You would just have to make sure that the feature will trade in redundancy for extra space if you have too much usage, or if the usage goes up right after a disk failure. (better cap your usage or else it is possible to lose redundancy even without disk failure) (I am glad I am not the programmer making it work!)
-
Kalle Richter over 6 yearsI suggested to add shrinking facilities for zfsonlinux at github.com/zfsonlinux/zfs/issues/6857.
-
-
Slizzered about 9 yearsAs @jan pointed out, there some feature in the works, that does at least allow some forms of vdev removal. Nothing released as of yet, but at least an announcement
-
700 Software almost 8 yearsLink-only answers are not generally accepted on Stack Exchange. Perhaps explain the gist of how they are doing this, i.e. it looks like they are copying the contents to a smaller pool.
-
Kalle Richter over 6 yearsThe first link is dead.
-
Eugen Konkov over 6 years@GeorgeBailey: I have updated answer