Skip to content

tmp.mount.hm4: After swap.target - #3087

Merged
poettering merged 1 commit into
systemd:masterfrom
frankheckenbach:tmp.mount-after-swap
Apr 22, 2016
Merged

tmp.mount.hm4: After swap.target#3087
poettering merged 1 commit into
systemd:masterfrom
frankheckenbach:tmp.mount-after-swap

Conversation

@frankheckenbach

Copy link
Copy Markdown
Contributor

fix issue #2930

@mbiebl

mbiebl commented Apr 21, 2016

Copy link
Copy Markdown
Contributor

Hm, shouldn't we also add this to tmp.mount units that are generated via /etc/fstab to be consistent?

@keszybz

keszybz commented Apr 22, 2016

Copy link
Copy Markdown
Member

Hm, shouldn't we also add this to tmp.mount units that are generated via /etc/fstab to be consistent?

Dunno. We could, but after all, the point of adding /tmp to /etc/fstab is to override the settings. It'll either be non-tmpfs-based, or you can still add x-systemd.requires=swap.target.

@poettering

Copy link
Copy Markdown
Member

I agree with @keszybz i must say.

@mbiebl

mbiebl commented Apr 22, 2016

Copy link
Copy Markdown
Contributor

my main concern is, that most users probably won't add x-systemd.requires=swap.target simply because they don't know, they should. Can we at least fix this with better documentation (somewhere) then?

@keszybz

keszybz commented Apr 22, 2016

Copy link
Copy Markdown
Member

OTOH, adding Requires makes things more prone to error (most systems will run just fine without swap.target, so Wants, as added in this PR, is much more appropriate). So I'd first add support for x-systemd.wants= in the fstab, and then add a recommendation to use x-systemd.wants=swap.target.

@poettering

Copy link
Copy Markdown
Member

@mbiebl I don't think that "most" users really should add that. People generally add an fstab entry for /tmp to make it a physical disk. But in that case it doesn't matter whether it is unmounted before or after the swap is torn down.

I mean, if you want /tmp to be on tmpfs, then you use our defaults. You only would add an fstab entry for /tmp, if you really don't want our defaults.

@poettering

Copy link
Copy Markdown
Member

@keszybz i don't think that either Wants= or Requires= is right here. After= is fully sufficient. Whether swap is enabled or not, should be an admin decision, but not a requirement of mounting /tmp!

@keszybz

keszybz commented Apr 22, 2016

Copy link
Copy Markdown
Member

Right, After is even better. But we only provide x.systemd-requires=. Maybe we should add x.systemd-{wants,after,before}=.

whot pushed a commit to whot/systemd that referenced this pull request Oct 10, 2017
fix issue systemd#2930
Cherry-picked from: a11fe93
Resolves: #1298355
Werkov pushed a commit to Werkov/systemd that referenced this pull request Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants