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

# apt install zfsutils-linux

When trying to import, I received an error:

# 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
root@skynet:/home/rogerp# zpool import myzpool
cannot import 'myzpool': pool was previously in use from another system.
Last accessed by pop-os (hostid=b5f0b0a0) at Tue May  4 04:27:02 2021
The pool can be imported, use 'zpool import -f' to import the pool.

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

# zpool import -f myzpool

Resources:

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

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.