SOLVED Remove Disk from Mirror in FreeNAS 11

Status
Not open for further replies.

Solero

Dabbler
Joined
Apr 19, 2016
Messages
14
Hello,

right now I am using a NAS with four Bays.
Three 4 TB disks as encrypted mirrors.
I would like to switch this setup in the following way:

1 zpool consisting of 3 mirrored disks --> 1 zpool consisting of 2 vdevs. Each vdev as its own 2 disk mirror.

I know that you cannot remove disks from a vdev but mirror-vdevs are an exception. ZFS supports the command
zpool detach POOLNAME DISKNAME
in order to do so.
I would like to know whether this is supported by FreeNAS 11.

A the moment I am running FreeNAS-9.10.2-U5 but plan on upgrading to FreeNas 11.
Can I do the following with the GUI or do I have to go down to CLI? Can FreeNAS handle this procedure via CLI on an encrypted zpool?

Best regards
Solero
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
Removing a disk from a three way mirror is pretty harmless, however you do have the added complexity of encryption. Because of that, I wouldn't recommend doing this unless you're prepared to fully understand GELI and how it works on FreeNAS to make sure you don't lose your pool.
 

Solero

Dabbler
Joined
Apr 19, 2016
Messages
14
Thanks for the explanation but I still don't know, whether removing the disk is supported by FreeNAS 11 GUI or just the CLI. I would feel safer if the feature is part of FreeNAS GUI, amongst others, because of the GELI encryption.

I am going to have a full backup of the data before I start the process. Never the less I want to mitigate any chance of needing this backup as far as possible.

Solero
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
If you're already breaking the pool and have a backup, you might as well rebuild without encryption, unless it's required by law or corporate policy.
 

Solero

Dabbler
Joined
Apr 19, 2016
Messages
14
If you're already breaking the pool and have a backup, you might as well rebuild without encryption, unless it's required by law or corporate policy.
Encryption ist required my me. Running without it is not an option.

Destroying the pool and building it anew from backup is always an option (a bad one in my opinion).

I would like to know whether FreeNAS 11 offers some kind of option to remove the disk via CLI. I haven't found one in FreeNAS 9.10.
Should I upgrade to 11 before or after removal of the disk?

Solero
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
whether removing the disk is supported by FreeNAS 11 GUI
No, it isn't. You'd use the standard zpool commands; there wouldn't be anything special to FreeNAS.
 

Solero

Dabbler
Joined
Apr 19, 2016
Messages
14
No, it isn't. You'd use the standard zpool commands; there wouldn't be anything special to FreeNAS.
Thank you. That's the information I was looking for.
Do you know about any implications with the GELI encryption? I would do a ReKey and download the recovery key, of course.

Solero
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I don't believe that removing a disk from a mirror would cause issues with the encryption, but I'm afraid I don't have any personal experience with that to be able to say.
 

Solero

Dabbler
Joined
Apr 19, 2016
Messages
14
After I will have acquired my Backup NAS I will upgrade my primary NAS to 11, remove the disk from the mirror and post the result here.

Thanks for the guidance.
 

Solero

Dabbler
Joined
Apr 19, 2016
Messages
14
After I will have acquired my Backup NAS I will upgrade my primary NAS to 11, remove the disk from the mirror and post the result here.

It worked like a charm. Here is what I did (all commands are executed as root under FreeNAS-11.0-U2):

1. Find the right disk as it is addressed by the gptid (you need to know the adaX name of you disk)
gpart list
Look for the disk matching your adaX and search for the rawuuid of the non-swap partition
Have a look at the zpool with
zpool status

---
Edit:
Step 1. should be even easier by just using glabel status
---

2. Remove the disk from the mirror with
zpool detach <yourpoolname> gptid/<rawuuid>.eli
The following part may be unnecessary but it wont hurt either:
  • Do an Encryption Re-key
  • Download the Key
  • Download the Recovery-key

3. Remove the disk from the NAS and reboot. Done
 
Last edited:
Status
Not open for further replies.
Top