0

I want to change one of my partitions from ext4 to something else (xfs or openzfs), the partition is sdc5_crypt and is mounted at startup. My intuition says that I can format it with something like zpool create sdc_pool sdc5_crypt without any impact into the LUKS encryption, so that it will still be mounted normally as it is done now, but the /dev/mapper/sdc5_crypt partition will now be zfs instead of ext4

this is my configuration right now:

>lsblk
...
sdc              8:32   0  1.9T  0 disk
├─sdc1           8:33   0    1K  0 part
└─sdc5           8:37   0  1.9T  0 part
  └─sdc5_crypt 254:2    0  1.9T  0 crypt /mnt/ssd-3

>mount | grep sdc
/dev/mapper/sdc5_crypt on /mnt/ssd-3 type ext4 (rw,relatime,discard)

Am I correct in assuming that the above approach will partition/reformat the sdc5_crypt partition without messing up LUKS headers (which are backed up in any case) or something else? Is it safe to do it like this? If not, what would be the suggested way to change the mounted ext4 partition to be used in a zfs pool?

1

Any operations on sdc5_crypt will not harm your LUKS configuration. You can treat it like a normal drive. So yes, you should be able to use that command to reformat your partition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.