45Drives Knowledge Base
KB450412 - Replacing Drives in ZFS Pool on Ubuntu 20.04
https://knowledgebase.45drives.com/kb/kb450412-replacing-drives-in-zfs-pool-on-ubuntu-20-04/

KB450412 - Replacing Drives in ZFS Pool on Ubuntu 20.04

Posted on March 24, 2021 by Bailey Allison


Scope/Description

Prerequisites

Steps

Through Houston UI

Through Command Line

root@ubuntu-45drives:~# zpool status

root@ubuntu-45drives:~# zpool offline tank 1-2

root@ubuntu-45drives:~# zpool replace tank 1-2 1-2

Verification

root@ubuntu-45drives:~# zpool status

Troubleshooting

KB450412 - Replacing Drives in ZFS Pool on Ubuntu 20.04 - 45Drives Knowledge Base
Did you know  45Drives offers free  public and private  webinars ? Click here to learn more  & register! Build & Price

KB450412 – Replacing Drives in ZFS Pool on Ubuntu 20.04

You are here:

Scope/Description

  • This article will walk through the steps to replace a failed drive in a Ubuntu 20.04  installation through either Houston UI, or through the terminal.

Prerequisites

  • Access to Houston UI
  • SSH access to Ubuntu 20.04
  • Replacement Drive

Steps

Through Houston UI

  • First, we’ll have to enter the ZFS tab in Houston UI.

  • Once here, we’ll select our pool, and then select the Status tab.

  • Once in the Status tab, we’ll have to identify the failed drive, as it should be listed with either sector errors, as faulted, failed, or degraded. For this article, we’ll use drive 1-2 as the problem drive.

  • Once we’ve identified the failed drive, we’ll then have to offline this drive by clicking on the options wheel beside it, then select Offline Disk.

  • Once it’s offline, Physically replace the disk.
  • Once it’s been replaced physically, then select the options wheel beside it, and select Replace Disk.

  • Which will open the window where we select the disk to replace it with. Ensure you select to identify by Virtual Device Mapping.

  • This will begin the resilvering process with the replacement drive, which you can then monitor from the Status tab. We can see the resilver completed here, as there is little data on the pool. For a pool with more data, this time will be longer as it must reintegrate the drive into the ZFS pool.

Through Command Line

  • First, we’ll do “zpool status” to identify the drive with issues. For this, we’ll use drive 1-2 as the problem drive.
root@ubuntu-45drives:~# zpool status

  • Then we’ll offline the drive with “zpool offline poolname drivename”
root@ubuntu-45drives:~# zpool offline tank 1-2

  • Then, we can replace the drive physically, and once that’s done we can then replace the drive with “zpool replace poolname old drive new drive”
root@ubuntu-45drives:~# zpool replace tank 1-2 1-2

Verification

  • Then, we can verify the drive has been replaced with “zpool status”
root@ubuntu-45drives:~# zpool status

Troubleshooting

Was this article helpful?
Dislike 1
Views: 3485
© 2024 - 45Drives Knowledge Base
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access