meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:fs:zfs:shrink [2021/11/30 11:32] niziaklinux:fs:zfs:shrink [2024/02/16 07:49] (current) niziak
Line 1: Line 1:
-====== ZFS shrink pool ======+====== ZFS: resize zpool ======
  
-Shrink zpool is not possible, but trick with 2nd device (or even file) works:+===== extend pool ===== 
 + 
 +Get device name used in pool: 
 +<code bash> 
 +zpool status nvmpool 
 +</code> 
 + 
 +<code bash> 
 +# resize /dev/nvme0n1p3 
 +parted /dev/nvme0n1 
 +</code> 
 + 
 +<code> 
 +resizepart 3 
 +End ? [X.XGB]? 
 +quit 
 +</code> 
 + 
 +<code bash> 
 +zpool online -e nvmpool nvme0n1p3 
 +</code> 
 + 
 +====== ZFS: shrink zpool ====== 
 + 
 +Shrinking of zpool is not possible, but trick with 2nd device (or even file) works:
   * add 2nd device to zpool (can be smaller - only to fit data)   * add 2nd device to zpool (can be smaller - only to fit data)
   * remove 1st device - zpool will copy all data to another device.   * remove 1st device - zpool will copy all data to another device.