Skip to content

enable discard mount option in /etc/fstab by default #367

Closed

Description

@adrelanos

Would it be a good idea to enable the discard mount option by default in /etc/fstab by default?

Purpose: Automatic shrinking of VM disk image to safe disk space.

Activity

  1. mika commented on Jan 13, 2026

    @mika
    Member

    Is there any known drawback or possible if discard is present but not support by the underlying stack?

  2. evgeni commented on Jan 13, 2026

    @evgeni
    Member

    fstrim advises against discard: https://man7.org/linux/man-pages/man8/fstrim.8.html#DESCRIPTION

    (No idea how much of this is applicable to VMs)

  3. changed the title [-]enable discard mount option by default in /etc/fstab by default[/-] [+]enable discard mount option in /etc/fstab by default[/+] on Jan 13, 2026
  4. mika commented on Jan 13, 2026

    @mika
    Member

    I'm afraid, managing /etc/fstab is an exercise for the admin with configuration management etc, depending on the actually used stack, and we can't just enable this by default?

    @zeha, what's your take on this?

  5. evgeni commented on Jan 13, 2026

    @evgeni
    Member

    If the intent is to shrink VM images, should we call fstrim as the last step when running in VM mode?

  6. mika commented on Jan 14, 2026

    @mika
    Member

    If the intent is to shrink VM images, should we call fstrim as the last step when running in VM mode?

    I like that idea, thx! @adrelanos did you look into this already?

  7. mika commented on Feb 11, 2026

    @mika
    Member

    We don't plan to enable discard in fstab by default, but we're considering the fstrim approach, see #369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions