Restore ZFS Pool and storage data after a system re-install

The original installation of zpool was from a POPOS 20 install. After Installing a new Ubuntu system over the top of POPOS, the zpool was not listed. Here are the steps to restore the zpool.

Install zfsutils

 sudo apt install zfsutils-linux

Make a directory

 cd /
sudo mkdir myzpool

When trying to import, I received a notice:

sudo zpool import
sudo zpool import
   pool: myzpool
     id: 13464327419314907931
  state: ONLINE
status: The pool was last accessed by another system.
 action: The pool can be imported using its name or numeric identifier and
        the '-f' flag.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-EY
 config:

        myzpool                                         ONLINE
          mirror-0                                      ONLINE
            ata-WDC_WD2002FFSX-68PF8N0_WD-WCC6N7PRY8JJ  ONLINE
            ata-WDC_WD2002FFSX-68PF8N0_WD-WCC6N7PRY1VJ  ONLINE

Import using the -f flag and the pool name that was created originally.

sudo  zpool import -f myzpool

Resources:

https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-EY/

Leave a Comment