I'm using two zram devices for swap. By design, those devices are created at boot and are uninitialized. It would be great if systemd had a simple 'Initialize=' boolean that would enable calling 'mkswap' to initialize the swap space. Preferably, with an fstab option to enable it transparently.
If we do this, we should make sure to first check that the swap partition does not contain a valid filesystem. This stuff could probably also be used for the encrypted swap stuff in our crypttab generator.
This is really dangerous business...
agreed, this could really destroy (potentially important) data.
We nowadays have this in place. Simply add "x-systemd.makefs" to your fstab mount options (or if you use a .swap unit directly pull in and order it after systemd-makefs@$DEVICE.service). Closing hence.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.