• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Solaris ZFS : How to import 2 pools that have the same names

By admin

It is possible that you may have to manage 2 pools that have the same name. For example, if you have a pool name “datapool” and you have another from some other storage array called “datapool”. You may wish to import this second pool (with the same name) to your system. ZFS will not allow the system to have 2 pools with the same name. Therefore we have to rename one of the pool to some other name. There are 2 scenarios when importing pools with same name.

1. One pool is already imported
2. Both pools are exported

Scenario 1 : One pool is already imported

In this case one pool is already imported with name datapool and other pool is yet to be imported.

# zpool list
NAME       SIZE  ALLOC   FREE    CAP  HEALTH  ALTROOT
datapool  1008M   154K  1008M     0%  ONLINE  -

In order to import the other datapool, we have to import it with some other name.

# zpool import datapool datapool_other

Verify that you have both the pools with different names.

# zpool list
NAME             SIZE  ALLOC   FREE    CAP  HEALTH  ALTROOT
datapool        1008M    97K  1008M     0%  ONLINE  -
datapool_other  1008M   115K  1008M     0%  ONLINE  -

Scenario 2 : Both pools are exported

Consider a case where neither of the 2 pools have been imported. All the vdevs are visible to the operating system. If we try to import, zfs does not know which one to import therefore you would get an error as below :

# zpool import datapool
cannot import 'datapool': more than one matching pool
import by numeric ID instead

In this case we need to import the first pool by ID. This pool will be import with original name. To get Pool ID do:

# zpool import
  pool: datapool
    id: 4752417439350054830
 state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

        datapool    ONLINE
          c1t2d0    ONLINE

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

        datapool    ONLINE
          c1t3d0    ONLINE

Now import first pool with pool ID :

# zpool import -f 4752417439350054830

We will have to import the second datapool with a new name.

# zpool import datapool datapool_other

Verify the zpool list to see the 2 pools datapool and datapool_other imported at the same time.

# zpool list
NAME             SIZE  ALLOC   FREE    CAP  HEALTH  ALTROOT
datapool        1008M  95.5K  1008M     0%  ONLINE  -
datapool_other  1008M   356K  1008M     0%  ONLINE  -

Filed Under: Solaris, ZFS

Some more articles you might also be interested in …

  1. How to mount the zfs rpool while booted from CD [SPARC]
  2. Understanding “Holding a ZFS Snapshot” Feature
  3. How to Install Oracle Solaris 11 (Text Installer)
  4. How to measure NIC Performance/Throughput in Solaris 11 using iftop
  5. How to Configure a Solaris 10 Jumpstart server and client [SPARC]
  6. How To Increase rpool Size On Solaris 11 (Requires a Reboot)
  7. Beginners Guide to Solaris 11 Network Administration
  8. How to configure Solaris Zone to access a CDROM
  9. Comparing Network configuration : Solaris 10 Vs Solaris 11
  10. Troubleshooting Solaris IPMP

You May Also Like

Primary Sidebar

Recent Posts

  • SQL script to find tables that are fragmented
  • TRUNCATE TABLE not releasing space from tablespace
  • How to reclaim entire space of an oracle database table with “Truncate Table” statement
  • Oracle SQL Script to Report Tablespace Free and Fragmentation
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary