Re-partitioning LUKS encrypted drive?

I set up my manjaro installation using the full drive with LUKS encryption. I’d like to set up a separate, smaller partition now, with a clean install of manjaro on it. It doesn’t matter to me whether this partition is LUKS encrypted or not. I’m actually just going to use it for a software build tutorial – and I’d rather do this than use a virtual machine. I am however getting warnings when I run sudo fdisk -l, that I want to address before continuing.

Output of sudo fdisk -l:

Disk /dev/nvme0n1: 238,47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: INTEL SSDPEKKF256G7L                    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A124B8E9-76EC-8340-A4C3-1536094E2C49

Device          Start       End   Sectors   Size Type
/dev/nvme0n1p1   4096    618495    614400   300M EFI System
/dev/nvme0n1p2 618496 500103449 499484954 238,2G Linux filesystem


Disk /dev/mapper/luks-0cfaf780-b691-4135-a8d1-370b79dabbf3: 238,17 GiB, 255734199296 bytes, 499480858 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Output of sudo fdisk -l:

Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.

The device contains 'crypto_LUKS' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x035894c8.

Command (m for help): 

So what would be the proper way to go about creating a new partition with this setup?

I see no warnings in your posted output of that command. :man_shrugging:

Likely the whole disk is used and is now encrypted.

To have room for an additional partition on that same disk would involve shrinking the filesystem inside the encrypted container
as well as the shrinking the container itself.

Something that can be rather easily done - but not something I’d recommend doing to someone of whom I don’t know how proficient he/she is …

What I’m referring to is these messages:

This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.

The device contains 'crypto_LUKS' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.

Which show up in bright red.

That doesn’t sound too complicated. Is there any problem with shrinking the volume while I’m running on it?

Normally, a filesystem that is in active use can’t be altered.

Do it from the outside - boot a live system …

… your second command output is NOT the result of what you said it is:
sudo fdisk -l

It rather is the result of a command like:
sudo fdisk /dev/nvme0n1

which is you, asking the actual device to possibly be changed …
not just listed …

You forgot the drive you used after that command…
If you used:

sudo fdisk -l /dev/nvme0n1p2

Then it is correct output, because a LUKS container is like a RAW drive/partition, which needs to be opened before you can see/modify the inside…
Eg. only via /dev/mapper/...