首先把zfs池里面的所有硬盘插到新机器上面
导入 ZFS 存储池
确定要导入的池后,即可通过将该池的名称或者其数字标识符指定为 zpool import 命令的参数来将其导入。例如:
# zpool import tank
如果多个可用池具有相同名称,则必须使用数字标识符指定要导入的池。例如:
# zpool import
pool: dozer
id: 2704475622193776801
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
dozer ONLINE
c1t9d0 ONLINE
pool: dozer
id: 6223921996155991199
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
dozer ONLINE
c1t8d0 ONLINE
# zpool import dozer
cannot import 'dozer': more than one matching pool
import by numeric ID instead
# zpool import 6223921996155991199
如果该池的名称与现有的池名称冲突,则可以使用其他名称导入该池。例如:
# zpool import dozer zeepool
此命令使用新名称 zeepool 导入已导出的池 dozer。新的池名称是持久性的。
如果池未正常导出,则 ZFS 需要使用 -f 标志,以防止用户意外导入仍在其他系统中使用的池。例如:
# zpool import dozer cannot import 'dozer': pool may be in use on another system use '-f' to import anyway # zpool import -f dozer