Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fstrim --all should ignore bind mounts maybe #857

Closed
mgedmin opened this issue Sep 5, 2019 · 1 comment
Closed

fstrim --all should ignore bind mounts maybe #857

mgedmin opened this issue Sep 5, 2019 · 1 comment

Comments

@mgedmin
Copy link

mgedmin commented Sep 5, 2019

I've an Ubuntu 16.04 LTS server that runs `fstrim --all`` every week from cron. And every week I receive an email saying

fstrim: /var/spool/postfix/etc/sasldb2: not a directory

My /etc/fstab contains the following line

/etc/sasldb2 /var/spool/postfix/etc/sasldb2 none bind 0 0

because I need postfix's smtpd to access /etc/sasldb2 (which is a regular file) inside the postfix chroot.

I think fstrim --all should ignore bind mounts if it doesn't know what to do with them.

Ubuntu bug report: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1800167

karelzak added a commit that referenced this issue Sep 5, 2019
It seems better to silently ignore mount binds on file (= mountpoint
is not a directory).

This patch also fixes use-after-free bug from commit 402006f.

Addresses: #857
Signed-off-by: Karel Zak <kzak@redhat.com>
@karelzak
Copy link
Collaborator

karelzak commented Sep 5, 2019

Good catch.

You're right non-directory mountpoints should be silently ignored on --all/--fstab. Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants