Reversing an extend operation

AtariRiots

Cadet
Joined
Sep 30, 2020
Messages
6
Hi all,

I have a small NAS for my home just to mess around, 4x4TB IronWolves, SSD boot in a mirror and had another SSD for jails. Today I added an LSI 9211 card, flashed it, all went well. I wanted to mirror the jails pool to a new SSD I hooked up the card and installed (same brand and size).

I somehow thought that the extend operation will do this. Of course, it added the new disk as additional space and striped it. :(

Is there any way to reverse this, or is my only recourse to blow away the pool and recreate it as a mirror?

Thanks!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Depends on your pol layout. You may be able to remove it as a top level VDEV.

Let's have a look at zpool status -v and zpool list -v
 

AtariRiots

Cadet
Joined
Sep 30, 2020
Messages
6
Hey,

Here is zpool status -v:

Code:
  pool: jails_plugins

state: ONLINE

  scan: scrub repaired 0 in 0 days 00:00:22 with 0 errors on Wed Mar 10 13:28:45 2021

config:


        NAME                                          STATE     READ WRITE CKSUM

        jails_plugins                                 ONLINE       0     0     0

          gptid/194cbcda-f4a7-11ea-86af-708bcd58bb06  ONLINE       0     0     0

          gptid/3f00cebf-81e4-11eb-80e0-708bcd58bb06  ONLINE       0     0     0


errors: No known data errors


And zpool list -v:


Code:
jails_plugins                            888G  6.23G   882G        -         -     3%     0%  1.00x  ONLINE  /mnt

  gptid/194cbcda-f4a7-11ea-86af-708bcd58bb06   444G  6.10G   438G        -         -     6%     1%

  gptid/3f00cebf-81e4-11eb-80e0-708bcd58bb06   444G   131M   444G        -         -     0%     0%



Thanks!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK so here's how it will go:
Code:
# zpool status jails_plugins                                    
  pool: jails_plugins
state: ONLINE
  scan: resilvered 768K in 00:00:00 with 0 errors on Thu Mar 11 15:41:27 2021
remove: Removal of vdev 1 copied 36K in 0h0m, completed on Thu Mar 11 15:45:21 2021
    72 memory used for removed device mappings
config:

    NAME                                          STATE     READ WRITE CKSUM
    jails_plugins                                         ONLINE       0     0     0
      gptid/194cbcda-f4a7-11ea-86af-708bcd58bb06  ONLINE       0     0     0
      gptid/3f00cebf-81e4-11eb-80e0-708bcd58bb06  ONLINE       0     0     0

errors: No known data errors

# zpool remove jails_plugins gptid/3f00cebf-81e4-11eb-80e0-708bcd58bb06

# zpool status jails_plugins                                        
  pool: jails_plugins
state: ONLINE
  scan: resilvered 768K in 00:00:00 with 0 errors on Thu Mar 11 15:41:27 2021
remove: Removal of vdev 2 copied 40K in 0h0m, completed on Thu Mar 11 15:46:12 2021
    168 memory used for removed device mappings
config:

    NAME                                          STATE     READ WRITE CKSUM
    jails_plugins                                         ONLINE       0     0     0
      gptid/194cbcda-f4a7-11ea-86af-708bcd58bb06  ONLINE       0     0     0
 

AtariRiots

Cadet
Joined
Sep 30, 2020
Messages
6
Ah, thanks much for your help!

This will just de-extend the pool, I assume? I guess there is then a different way to actually add the second disk as a mirror? I am using 11.3-U4.1 and it doesn't seem to allow this in the UI (or at least I didn't find it anywhere), which led me to the predicament I had. I assume the zpool command is my friend here as well?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
This will just de-extend the pool, I assume?
Exactly
I guess there is then a different way to actually add the second disk as a mirror?
The GUI feature for that arrived in TrueNAS 12, so you don't have it.

I assume the zpool command is my friend here as well?
True:

Code:
# zpool status jails_plugins                                 
  pool: jails_plugins
state: ONLINE
  scan: resilvered 768K in 00:00:00 with 0 errors on Thu Mar 11 15:41:27 2021
remove: Removal of vdev 1 copied 36K in 0h0m, completed on Thu Mar 11 15:45:21 2021
    72 memory used for removed device mappings
config:

    NAME                                          STATE     READ WRITE CKSUM
    jails_plugins                                 ONLINE       0     0     0
      gptid/194cbcda-f4a7-11ea-86af-708bcd58bb06  ONLINE       0     0     0

errors: No known data errors

# zpool attach jails_plugins gptid/194cbcda-f4a7-11ea-86af-708bcd58bb06 gptid/3f00cebf-81e4-11eb-80e0-708bcd58bb06

# zpool status jails_plugins                                     
  pool: jails_plugins
state: ONLINE
  scan: resilvered 768K in 00:00:00 with 0 errors on Thu Mar 11 15:41:27 2021
remove: Removal of vdev 2 copied 40K in 0h0m, completed on Thu Mar 11 15:46:12 2021
    168 memory used for removed device mappings
config:

    NAME                                            STATE     READ WRITE CKSUM
    jails_plugins                                   ONLINE       0     0     0
      mirror-0                                      ONLINE       0     0     0
        gptid/194cbcda-f4a7-11ea-86af-708bcd58bb06  ONLINE       0     0     0
        gptid/3f00cebf-81e4-11eb-80e0-708bcd58bb06  ONLINE       0     0     0
 
Last edited:
Top