How do I check if native ZFS encryption is used on a dataset vs GELI or LUKS?
- User
How do I check if native ZFS encryption is used on a dataset vs GELI or LUKS?
- Assistant
You can check if native ZFS encryption is used on a dataset by running the following command:
zfs get encryption <dataset>If the output shows "encryption: on", then the dataset is encrypted with native ZFS encryption.
To check if GELI or LUKS is used, you can look at the encryption properties of the underlying block device. For example, if the dataset is stored on a GELI encrypted disk, you can run the command:
sudo geli status <disk>If the output shows that the disk is encrypted with GELI, then the dataset is using GELI encryption.
Similarly, if the dataset is stored on a LUKS encrypted disk, you can run the command:
sudo cryptsetup status <disk>If the output shows that the disk is encrypted with LUKS, then the dataset is using LUKS encryption.
- User
from zfs I get: NAME PROPERTY VALUE SOURCE microtank encryption aes-256-gcm -
- Assistant
Based on the output you provided, it seems that the "microtank" dataset is using native ZFS encryption with the algorithm set to "aes-256-gcm".
- User
cryptsetup wants a disk name, but all i have is a dataset name
- Assistant
To determine the underlying disk associated with a ZFS dataset, you can use the
zfs listcommand. This command will display a list of all datasets on the system along with their mount points. You can use the mount point to identify the underlying block device.For example, let's say you have a dataset named "tank/home/user1". You can run the following command to find the mount point for this dataset:
zfs list -o name,mountpoint | grep tank/home/user1This will output the mount point for the dataset. Let's assume the mount point is "/tank/home/user1". To find the underlying device, you can run the
dfcommand with the mount point as an argument:df /tank/home/user1This will display the file system usage for the mounted disk, which should include the device name. The device name will typically be listed in the "Filesystem" column and may include a reference to the ZFS dataset. For example, you may see something like "/dev/zvol/dsk/data/tank/home/user1".
Once you have the device name, you can use it with the relevant encryption command (GELI or LUKS) to determine if the disk is encrypted.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.