I had similar problem and the reason turned out to be that the directory to be linked must be created BEFORE creating the link. I checked the instructions you are referring to, it seems that they have been updated.
The step you are referring to seems to be step 9 now:
ln -s /sys/kernel/config/nvmet/subsystems/nvme-subsystem-name /sys/kernel/config/nvmet/ports/1/subsystems/nvme-subsystem-name
This will only work if both /sys/kernel/config/nvmet/subsystems/nvme-subsystem-name
and /sys/kernel/config/nvmet/ports/1/subsystems/nvme-subsystem-name
already exist. Now, I don't see the latter folder being created anywhere, so I would try creating that folder:
mkdir -p /sys/kernel/config/nvmet/ports/1/subsystems/nvme-subsystem-name
The -p option enables mkdir to create all the missing directories in the given path if they are missing, so you can directly type mkdir -p a/b/c instead of first mkdir a, then mkdir a/b, then mkdir a/b/c.
ln: failed to create symbolic link
and: Operation not permitted
itself, you might needsudo chattr -i <file1>
first beforeln -sf <file2> <file1>
if usedchattr +i
to locked that file before. – Newsy