Remove redundancy from mirrored-pool

Status
Not open for further replies.

mka

Contributor
Joined
Sep 26, 2013
Messages
107
hi, I'm currently wondering on my evaluation system: can I remove the redundancy from a pool? I have one pool with mirroring of two hard drives. Both drives are online and neither one is defective.

Can I remove the redundancy from the pool, so the pool as a consequence will exist as a single disc while the other disc can be removed from the system without degrading the pool?

I could only find removing mirrored drives which are defective... but not something about removing the redundancy per se. Thank you!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
It's possible, but not through the web GUI; you'd need to use the command line. First you'd need to detach the pool from the web GUI, and of course DO NOT check the box to mark disks as new. Then log into the shell and do this:
Code:
[root@freenas] ~# zpool import
  pool: tank
    id: 393516748554493526
  state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:

tank                                            ONLINE
  mirror-0                                      ONLINE
    gptid/8c9228b1-6e74-11e4-808f-08002762ec9a  ONLINE
    gptid/0bced4c9-6e75-11e4-b33f-08002762ec9a  ONLINE
[root@freenas] ~# zpool import tank
cannot mount '/tank': failed to create mountpoint
cannot mount '/tank/.system': failed to create mountpoint
cannot mount '/tank/.system/cores': failed to create mountpoint
cannot mount '/tank/.system/rrd-93bc65e2ee7f41d0a1fe412de34ba473': failed to create mountpoint
cannot mount '/tank/.system/samba4': failed to create mountpoint
cannot mount '/tank/.system/syslog-93bc65e2ee7f41d0a1fe412de34ba473': failed to create mountpoint
[root@freenas] ~# zpool status
  pool: tank
state: ONLINE
  scan: resilvered 1.64M in 0h0m with 0 errors on Mon Nov 17 08:16:11 2014
config:

NAME                                            STATE     READ WRITE CKSUM
tank                                            ONLINE       0     0     0
  mirror-0                                      ONLINE       0     0     0
    gptid/8c9228b1-6e74-11e4-808f-08002762ec9a  ONLINE       0     0     0
    gptid/0bced4c9-6e75-11e4-b33f-08002762ec9a  ONLINE       0     0     0
errors: No known data errors
[root@freenas] ~# zpool detach tank gptid/8c9228b1-6e74-11e4-808f-08002762ec9a
[root@freenas] ~# zpool status
  pool: tank
state: ONLINE
  scan: resilvered 1.64M in 0h0m with 0 errors on Mon Nov 17 08:16:11 2014
config:

NAME                                          STATE     READ WRITE CKSUM
tank                                          ONLINE       0     0     0
  gptid/0bced4c9-6e75-11e4-b33f-08002762ec9a  ONLINE       0     0     0

errors: No known data errors

[root@freenas] ~# zpool export tank


Then use the auto-import feature of the web GUI to re-import the pool.

Caveat: This worked for me, and it's based on Oracle's ZFS docs. However, if you hose your data, it's on you. The "party line" is, if you can't do it from the GUI, don't do it.
 
Status
Not open for further replies.
Top