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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • 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. Unix file basics : Inode, Soft Vs Hard link, Device files, Named pipes
  2. How to make telnet listen to a different port in Solaris
  3. How to send mails with attachments using the solaris mailx command
  4. Beginners guide to Oracle Solaris Live Upgrade
  5. Solaris 11 IPS pkg Command Examples
  6. The ultimate Solaris Volume Manager (SVM) interview questions
  7. Oracle Solaris 11 Zones : New Features
  8. Solaris : how to truncate the wtmpx file
  9. Beginners Guide to Solaris 11 Network Administration
  10. How to configure Solaris 10 Probe based IPMP

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright