Allow formatting of individual unassigned drives with a selected filesystem


Recommended Posts

Let me start out by saying, I realize that this doesn't apply as much in enterprise situations. However, given that Unraid has the ability to add arbitrary drives to the array, it's much more common in the homelab community than something like FreeNAS, which pretty much requires you already have all the drives you're using.

 

I believe the homelab community, while not all of Unraid, is a large part of the Unraid community, and would benefit here.

 

A lot of us in this homelab community need, or want, a cheap way to back up data offsite, and probably have other hard drives lying around. The logical conclusion here is to pop a drive into Unraid, format it, and copy data over. And I'm sure a lot of us, myself included, would like to encrypt this data. Given that Unraid uses the key files stored locally to encrypt drives, this makes it dead simple, because you don't have to enter a passkey, or even think. You just mount the drives, and they get decrypted. This is great for security in case these drives fall in the wrong hands if they're being stored elsewhere.

 

Encryption seems to be most commonly encrypted XFS, to match the XFS typically used in the main array. The current solution for encrypted data here is to modify the cache pool. This involves a bunch of steps:

  1. Stop the array
  2. If you have multiple cache drives in a pool, drop that down to 1
    1. Confirm that you want to start with the missing cache drives, and start the array
    2. Stop the array again
  3. Stop and disable Docker containers and VMs that live on the cache (and can't run with the legitimate cache drives missing)
  4. Change cache filesystem to encrypted XFS (since you can't do XFS on cache with multiple drives)
  5. Swap the "cache" drive to the drive you intend to back up to
  6. Start the array
  7. Format the disk
  8. Stop the array
  9. Put your cache FS back to what it was before
  10. Swap the cache drives back to what they were, in the right order
  11. Start the array again

 

From there, you can use Unassigned Devices to mount the now encrypted drive, and copy data to it. This works flawlessly if you do it correctly, but it's a seemingly dangerous process, and is at the risk of losing data that lives on cache if you misstep. I think we can all agree that this is a lengthy, and potentially risky process, to obtain a drive formatted with an encrypted filesystem that Unraid knows how to decrypt.

 

I understand that 6.9 plans to bring multiple pools into the equation, which will help this greatly, but I assume it would be much cleaner to be able to have the option to take an unassigned drive that's not part of the array or cache, and be able to choose a filesystem to format it in. This way, without having to stop the array to reconfigure cache, or another pool (and thus, disrupting Docker, and VMs in the process, as well as any live transfers or work to or from the array itself), we could pop a drive in, and be able to format it as any filesystem Unraid supports.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.