This short tutorial describes how to expand mirror volume by replacing disk drives by larger. For this example I used FreeNAS installed on VirtualBox with two 10GB drives (10GB total in mirror mode). The existing disk volume will be extended to 20GB by replacing of both disks by larger.
First of all go to ‘Storage’ section.
In this case we have 6 GB used (78% of volume space is used). Let’s try to expand volume from 10GB to 20GB (by replacing 10GB by 20GB disks).
Select ‘test-volume’ and click ‘Volume status’ button on the bottom of page. You will see current status of the volume including disk drives.
We can see that ‘test-volume’ contains two physical disks. Let’s replace them (one by one) by larger. Select first disk and click ‘Replace’ button on the bottom of the page.
You will see the following dialog box.
Select from drop-down list one of the 20GB disks and click ‘Replace Disk’. Wait until resilvering process end. Status of the volume looks like following.
Note that currently volume contains three disk drives. After resilvering unused 10GB will be offline.
Do it exactly the same with second 10GB drive. Wait for the end of resilvering process. After data migration volume will have 20GB of capacity (and only 34% used).
Described solution bases on ZFS filesystem features and it is very reliable. There is no risk of data lost because we have untouched copy of data on the replaced (old) disk. Despite this it is recommended to do backup before this operation.