Increase Your Space By Replacing Your Hard Drives

This article will show you how to increase your Nas4Free storage by replacing your hard drives.

Click here for video tutorial of this post.

This scenario assumes a mirrored ZFS setup but the process will be the same if you are using another ZFS setup like raidz etc…
In this setup I have configured a basic mirrored setup with 2 x 2gb hdd and we’ll go through and upgrade the drives to 8gb.

Full Drives

1 Start Point 2GB Mirror

Start Point 2GB Mirror

2 Full Disks

Storage Space 98% Full

Replace Old Drives with Larger Capacity Drives

Start by switching OFF the NAS and replace only ONE of the existing drives with the new larger disk using the same cables. This will simplify the upgrade as won’t be changing the device id’s.
Boot up and you’ll see that the NAS says that the Pool is in a degraded state

3 Replace disk 1

Status Degraded

Under “Disks -> Management” you’ll see an error in red. It’s important to take a note of the “Device” ie ada1

NOTE: do NOT import or clear config as this will complicate the process. If you have imported or cleared the config the easiest thing to do is shutdown and put in the old drive and re-import then start this process again.

4 Disk Error

Disks -> Management

You can also check the device id by going to “Disks -> ZFS – > Information

5 Disk ZFS information

Pools Information

Go to “Disks -> ZFS” then select “Tools

  • Command -> Replace
  • Option -> Device
  • Pool -> “Select your Pool here”
  • Devices -> “Select the device number noted above”
  • New Device -> “Select the same device number as above”
6 ZFS Tools Replace

ZFS Tools Repace Command

Click “Send Command”
Select “Information” you should see “Resilvering”
This will take a while depending on how large your drive is and how much data it needs to copy
NOTE: while NOT recommended you can still use the NAS while this is happening but make sure you allow this to complete fully before switching it off

7 Resilvering D1

Resilvering Disk 1 (ada1)

Once Resilvering is complete your Pool will now say ONLINE again although it will still be full.

Now go back into “Disks -> Management” and “Clear config and import disks” you’ll now see the new larger drive in place of the old one

8 Resilvering Online

Resilvering Disk 1 Complete Pool Online

Now shutdown the NAS and repeat with the other drives.

12 Resilvering D2

Resilvering Disk 2

12a Clear config import

New Larger Capacity Disks Showing

 

Use up all Available Space on New Drives

Once all the drives have been replaced and resilvered you’ll probably notice that the space still hasn’t increased.

We now need to tell it to use all the extra space on the new larger drives

  • Advanced -> Command
  • Type in “zpool online -e PoolData ada1
  • Insert your pool name in “PoolData” and change “ada1‘ to whatever was replaced on your own system
13 zpool expand ada1

zpool expand ada1

Repeat the process for each device that was replaced

14 zpool expand ada2

zpool expand ada2

Now go back to your home page and you’ll see that the extra storage space has been applied

15 New Disks Ready

New Disks Ready with Larger Storage Available

Tags:
  • Riccardo Redaelli

    Hi, I’ve a question!
    I want to expand my ZFS1 pool (4x500GB) by replacing the disks (4x2TB) using your procedure. I didn’t see in your procedure any formatting phase of the disks. I’m asking that because the new disks I’ll buy are pre-formatted in NTFS (basically this is true for all commercial disks).
    So, I’ve to format them before resilvering or it will be done automatically by the nas4free system during the resilvering procedure?
    If I’ve to format them, is correct to do the following: shutdown the server, replace one disk, switch on the server, check the name of the new disk, format the disk (new operation in the procedure), execute the replace command and wait resilvering, etc….
    Thank you,

    Riccardo