Ich habe vor, auf einem Rechner, der mit Btrfs läuft, nachträglich eine swapfile zu erstellen.
Ich verwende also die mir bisher bekannten Befehle dafür:
Hm, Widerspruch … immerhin wird bei der automatischen Installation mit Btrfs und swapfile selbige als Subvolume erstellt. Musss also einen Sinn haben (weniger Fragmentierung?). Da ich aber das bestehende manulle Partitionsschema nicht verändern will, fällt die automatische Installation aus.
If you are using btrfs, it is /swap that should be a subvolume. You then put the swapfile inside that subvolume.
If /swap isn’t already a subvolume, you should create one there first.
The reason you use a separate subvolume for swap is that you cannot activate a swapfile on a subvolume that has snapshots. That is why you use a separate subvolume.
As a side note, you no longer need to follow all the above steps. If /swap is a subvolume, you can do this instead: