Creating btrfs to SD-card

I use:
mkfs.btrfs -f /dev/mmcblk0p1
then however
btrfs filesystem show
gives NO result.

Note: RHEL 8, and therefore Rocky, does not provide support for btrfs. I presume you got the kernel modules and utilities from some third-party repo?

Does the mkfs.btrfs have verbosity option? Would it warn, if you try to initialize the block device again (since it already has metadata)?

(I’ve never used btrfs, so don’t know what btrfs is supposed to do.)

Not sure if this might help:

btrfs fi show -d

the -d parameter gets it to show all devices. Maybe by default it is only showing mounted devices. You could check and verify that, by mounting your SD card and then run btrfs fi show to see if it then shows it. That would at least confirm if it is only showing mounted partitions, rather than all devices/partitions available.

If it helps: you can check if/what version of btrfs is in your kernel(even though you probably already know if you compiled and added it yourself) with:

modinfo btrfs

On a side note, I wouldn’t use the “BTRFS” file-system on an SD-Card. BTRFS creates snapshots constantly when anything changes, which causes the card to fill up quickly, & as it is a solid-state disk, many writes to it will lower it’s life-expectancy greatly. Besides that the available space on the card reduces quickly unless you constantly remove old snapshots, which means a lot of maintenance work.

BTRFS doesn’t create snapshots on it’s own, what you are referring to is CoW Copy-on-Write. This can be disabled with a mount parameter, or by using chattr to change the attributes so that it’s not used. For example, I have CoW disabled, for all my virtual machines that are stored on BTRFS, otherwise I would have a big problem with fragmentation. The same for databases. Databases are problematic on BTRFS, if CoW is enabled.