Whenever I try to create encrypted swap using cryptfs, it fails with "invalid argument" errors.
I just finished setting up my new server with evms and raid 1 root. I used genkernel to create an evms2 kernel and initramfs. I set aisde two 512m partitions per HD for swap space. Everything boots fine, and the raid root is loaded. But when the init scripts begin to process the encrypted swap in cryptfs, it fails with an "invalid argument" error. I tried using cryptsetup to manually create the encrypted swap, but get the same error. I have tried pulling the two swap partitions out of evms management and telling cryptfs to mount them directly as /dev/hda2 and /dev/hdc2. Didn't work. I tried putting both swap partitions into an evms raid0 and telling cryptfs to mount it as /dev/evms/swap. That didn't work. I have tried every combination of the two, accessing the device/s using /dev/evms/hda2 and /dev/evms/hdc2; /dev/mapper/hda2 and /dev/mapper/hdc2; /dev/mapper/swap, and several other ways. Nothing has worked. I tried changing the order of volume managers in /etc/conf.d/rc, didn't work. I tried adding both hda2 and hdc2 to the sysfs exclude section of evms.conf, that didn't work. I can access the swap space directly using any of the above devices with no problems. But whenever cryptfs tries to get at it, I get the "inalid argument" error. Best I can tell that error means something else has control of that device.
