Solved How to change the zpool id with a different number...

Hello.

Today I have cloned the disk ada0 to ada1 :

Code:
Geom name: ada0
Providers:
1. Name: ada0
   Mediasize: 500107862016 (466G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   descr: CT500MX500SSD4
   lunid: 500a0751e20b2ae5
   ident: 1924E20B2AE5
   rotationrate: 0
   fwsectors: 63
   fwheads: 16

Geom name: ada1
Providers:
1. Name: ada1
   Mediasize: 500107862016 (466G)
   Sectorsize: 512
   Mode: r0w0e0
   descr: Samsung SSD 860 EVO 500GB
   lunid: 5002538e4097d8a2
   ident: S3Z2NB0KB99028V
   rotationrate: 0
   fwsectors: 63
   fwheads: 16

So,now ada1 is the same as ada0,because I have cloned it with dd,like this :

Code:
# dd if=/dev/ada0 of=/dev/ada1

ada0 and ada1 now have the same zpool name and id number :

Code:
pool: zroot3
     id: 7607196024616605116
  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:

    zroot3                        ONLINE
      diskid/DISK-1924E20B2AE5p4  ONLINE


after this,I have renamed the zpool3 in zpool4 with this command :

Code:
# zpool import -fR /mnt/zroot4 zroot3 zroot4

so,now the zpools have different names,but the same ID number,so they conflict. I need to change it.
 
The correct way would have been creating a mirror via zpool attach and then zpool split the mirror in 2 distinct pools.
 
I like man pages man,but only if they aren't too technicals. A moderate dose of technicalities is good.
 
Back
Top