Setting up encrypted swap: "swapon" vs. "swapctl -a"

David Wolfskill david at catwhisker.org
Wed Dec 11 22:35:39 UTC 2019


I find that swapon(8) allows a -E flag:

| The swapon utility adds the specified swap devices to the system...
| The -E option causes each of following devices to receive a BIO_DELETE
| command....

While "swapctl -a" is (otherwise) similar to "swapon,":

| swapctl -E -a /dev/nda11p5.eli
| usage: swapctl [-AghklmsU] [-a file ... | -d file ...]
| swapctl -a /dev/nda11p5.eli
| swapctl: adding /dev/nda11p5.eli as swap device
| swapoff /dev/nda11p5.eli
| swapon -E /dev/nda11p5.eli

That said, I also note:

| The swapctl utility exists primarily for those familiar with other
| BSDs and may be used to add, remove, or list swap devices....

Should "swapctl -a" also accept & make use of -E?

Peace,
david
-- 
David H. Wolfskill				david at catwhisker.org
Some might think an oath of office is as meaningful as a marriage vow.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20191211/7dffba9e/attachment.sig>


More information about the freebsd-hackers mailing list