ZFS: Grow or add more disk space to pool or filesystem

Contributor Icon Contributed by qmchenry  
Tag Icon Tagged: Solaris system administration  

Run out of disk space on your production server? Cringe at the downtime required to bring filesystems offline, backup, create bigger filesystems, and restore all the while typing with crossed fingers? Dread deciding the disk layout for your new server? Don’t panic! ZFS has you covered. In one simple command, you can add space to a ZFS pool without taking it offline.


Given a ZFS pool techrx and an unused disk denoted by c1t0d0, you can add the disk to the pool (a non-mirrored pool — that’s another recipe) with this command:

zpool add techrx c1t0d0

Before, the output of zfs list showed:

NAME USED AVAIL REFER MOUNTPOINT
techrx 295K 19.2G 25.5K /techrx

After the zpool command, the same command shows:

NAME USED AVAIL REFER MOUNTPOINT
techrx 296K 38.4G 25.5K /techrx

It’s worth pointing out again that this command works on a live, mounted filesystem. All of the filesystems in the techrx pool benefit from this increase in space (unless they have a quota).

 

1 Comment -


  1. Manuel Bejarano said on November 28, 2011

    Hello,

    Great page, im so interested in getting this recipe:

    You can add the disk to the pool (a non-mirrored pool — that’s another recipe)

    I have a mirrored pool 3 disks of 2 TB, and i want to add one of 3 TB but dont want to mess my data.

    How can i add it? hope you got the recipe

    Regards.

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -