3,702 bytes added
, 23:27, 23 February 2020
After Setting Up [[Zombi:HDD Encryption]] boot into the new system and install zfs using [https://github.com/zfsonlinux/zfs/wiki/Debian this manual]. Then Create new Partitions that use the free space on all disks using <code>cfdisk</code> or the partitioning tool of your choice. Your Partition Table should look more or less like this by now:
<pre>
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 2.7T 0 disk
|-sda1 8:1 0 512M 0 part
| `-md0 9:0 0 511M 0 raid1 /boot
|-sda2 8:2 0 83.3G 0 part
| `-md1 9:1 0 249.8G 0 raid5
| `-cryptroot 253:0 0 249.8G 0 crypt
| |-vg0-root 253:1 0 20G 0 lvm /
| |-vg0-docker 253:2 0 200G 0 lvm /var/lib/docker
| `-vg0-swap 253:3 0 8G 0 lvm [SWAP]
|-sda3 8:3 0 1M 0 part
`-sda4 8:4 0 2.7T 0 part
sdb 8:16 0 2.7T 0 disk
|-sdb1 8:17 0 512M 0 part
| `-md0 9:0 0 511M 0 raid1 /boot
|-sdb2 8:18 0 83.3G 0 part
| `-md1 9:1 0 249.8G 0 raid5
| `-cryptroot 253:0 0 249.8G 0 crypt
| |-vg0-root 253:1 0 20G 0 lvm /
| |-vg0-docker 253:2 0 200G 0 lvm /var/lib/docker
| `-vg0-swap 253:3 0 8G 0 lvm [SWAP]
|-sdb3 8:19 0 1M 0 part
`-sdb4 8:20 0 2.7T 0 part
sdc 8:32 0 2.7T 0 disk
|-sdc1 8:33 0 512M 0 part
| `-md0 9:0 0 511M 0 raid1 /boot
|-sdc2 8:34 0 83.3G 0 part
| `-md1 9:1 0 249.8G 0 raid5
| `-cryptroot 253:0 0 249.8G 0 crypt
| |-vg0-root 253:1 0 20G 0 lvm /
| |-vg0-docker 253:2 0 200G 0 lvm /var/lib/docker
| `-vg0-swap 253:3 0 8G 0 lvm [SWAP]
|-sdc3 8:35 0 1M 0 part
`-sdc4 8:36 0 2.7T 0 part
sdd 8:48 0 2.7T 0 disk
|-sdd1 8:49 0 512M 0 part
| `-md0 9:0 0 511M 0 raid1 /boot
|-sdd2 8:50 0 83.3G 0 part
| `-md1 9:1 0 249.8G 0 raid5
| `-cryptroot 253:0 0 249.8G 0 crypt
| |-vg0-root 253:1 0 20G 0 lvm /
| |-vg0-docker 253:2 0 200G 0 lvm /var/lib/docker
| `-vg0-swap 253:3 0 8G 0 lvm [SWAP]
|-sdd3 8:51 0 1M 0 part
`-sdd4 8:52 0 2.7T 0 part
</pre>
Execute this command to create the ZFS Pool:<br />
<code>zpool create data raidz /dev/sda4 /dev/sdb4 /dev/sdc4 /dev/sdd4</code><br />
and prevent it from mounting:<br />
<code>zfs set mountpoint=none data</code><br />
Create the encrypted zfs filesystem:<br />
<code>
zfs create data/encrypted -o mountpoint=/data -o encryption=aes-256-gcm -o keyformat=passphrase -o compression=lz4
</code><br />
Nach einem Neustart muss das ZFS mit folgendem Befehl eingehangen werden:<br />
<code>zfs load-key data/encrypted</code>
[[Category:Documentation]]