Partitions on Encrypted zpool

clarknova

Explorer
Joined
Sep 22, 2015
Messages
66
If I use TrueNAS to create an encrypted zpool:
  1. is a partition table created on the member disks?
  2. If so, is the partition table readable by any partitioning tool, or is it also encrypted?
 

AlexGG

Contributor
Joined
Dec 13, 2018
Messages
171
Yes, the partition table is created and it is readable by any partitioning tool. The encryption does not protect outer metadata, as the partition table is outside the zpool.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Hey @clarknova,

Be careful here...

Technically, Yes, there will be partitions on the disk. There will be 2 : one for the swap and one for ZFS. It is technically possible to create multiple partitions to use in multiple vDev / multiple pools at once. But this is very bad idea and should not be done. Everything is designed assuming that a single drive is part of a single vDev, and a single vDev is part of a single pool. To go against that is maximum risk.

In a ZFS pool, you usually create datasets and zvol to separate your different data when they require different parameters, quotas and things like that.

A dataset or a zvol is NOT a partition. It is a concept that resides entirely in ZFS and is a logical unit that only ZFS will understand.
 

clarknova

Explorer
Joined
Sep 22, 2015
Messages
66
Thank you, the warnings are well received for future reference. In my case I'm asking only because I just finished testing some disks in an encrypted zpool and after moving the test disks to a new host (not TrueNAS) the disks are not detected at all. So I was wondering how they might appear to another OS seeing the devices for the first time.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Hi again,

When you say "Not detected at all", do you mean at file level ? That is normal. Even a disk from an unencrypted pool is unreadable by anything else and for anything else than rebuilding the entire pool. As your was also encrypted, there is nothing intelligible on these drives. Know that the swap is also encrypted. That one is in fact always encrypted.

Your drive should be detected at hardware level (SATA or whatever technology they are using).
 

clarknova

Explorer
Joined
Sep 22, 2015
Messages
66
After vetting the drives I installed them into some Coraid devices that we have here, but while Coraid usually detects the drives right away, I'm not seeing that with these drives. I wondered if possibly the testing had made the GPT unreadable, and if Coraid possibly didn't like them for that reason, but I'm probably wrong on both counts, so I'll likely have to wait to hear back from Coraid support.
 
Top