ZFS-Importpool nach ID, da Name bereits vorhanden ist

ZFS-Importpool nach ID, da Name bereits vorhanden ist

Mein ursprüngliches System lässt sich nicht booten. Es gibt viele Fehler, die ich nicht lösen kann. Ich habe Ubuntu auf einem neuen Gerät installiert und kann die alten Pools von der alten Festplatte sehen.

Ich kann die Pools nicht importieren, da sie denselben Namen haben. Wie kann ich den Rpool importieren?

~$ 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

Antwort1

Sie können den Pool anhand der ID unter einem neuen Namen importieren. Außerdem wäre es sinnvoll, ihn in ein alternatives Stammverzeichnis zu importieren:

zpool import -o altroot=/oldrpool 8969077933931556505 oldrpool

verwandte Informationen