按 ID 為名稱的 ZFS 導入池已存在

按 ID 為名稱的 ZFS 導入池已存在

我的原始系統無法啟動(啟動)。有很多錯誤我無法解決。我已在新裝置上安裝了 ubuntu,並且可以從舊磁碟看到舊池。

我無法導入池,因為它們具有相同的名稱。如何匯入 rpool?

~$ zpool status
  pool: bpool
 state: ONLINE
config:

        NAME                                    STATE     READ WRITE CKSUM
        bpool                                   ONLINE       0     0     0
          04ef5f14-e5f9-b647-b997-245aa36411f5  ONLINE       0     0     0

errors: No known data errors

  pool: rpool
 state: ONLINE
config:

        NAME                                    STATE     READ WRITE CKSUM
        rpool                                   ONLINE       0     0     0
          93f2c53e-2192-d942-a117-c0109619b3c8  ONLINE       0     0     0


$ sudo zpool import
   pool: bpool
     id: 13370236194316687362
  state: ONLINE
status: Some supported features are not enabled on the pool.
        (Note that they may be intentionally disabled if the
        'compatibility' property is set.)
 action: The pool can be imported using its name or numeric identifier, though
        some features will not be available without an explicit 'zpool upgrade'.
 config:

        bpool                                   ONLINE
          683100ad-262c-0548-8f70-ea093bdbce23  ONLINE

   pool: rpool
     id: 8969077933931556505
  state: ONLINE
 action: The pool can be imported using its name or numeric identifier.
 config:

        rpool                                   ONLINE
          0e34f9cd-4128-6343-b54b-c5f8250b5d19  ONLINE

答案1

您可以透過新名稱下的 id 匯入池,將其匯入到某個備用根也是明智的:

zpool import -o altroot=/oldrpool 8969077933931556505 oldrpool

相關內容