Debian-13-minimal: fstrim: the discard operation is not supported

Hi,

I am observing something I can’t explain:

On debian-13-xfce:

# fstrim -v /
/: 13.7 GiB (14715064320 bytes) trimmed

# lsblk --discard
NAME    DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
xvda           0      512K       2T         0
├─xvda1        0      512K       2T         0
├─xvda2        0      512K       2T         0
└─xvda3        0      512K       2T         0
xvdb           0      512K       2T         0
xvdc           0      512K       2T         0
├─xvdc1        0      512K       2T         0
└─xvdc3        0      512K       2T         0
xvdd           0        0B       0B         0

On debian-13-minimal:

# fstrim -v /
fstrim: /: the discard operation is not supported

# lsblk --discard
NAME    DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
xvda           0        0B       0B         0
├─xvda1        0        0B       0B         0
├─xvda2        0        0B       0B         0
└─xvda3        0        0B       0B         0
xvdb           0        0B       0B         0
xvdc           0        0B       0B         0
├─xvdc1        0        0B       0B         0
└─xvdc3        0        0B       0B         0
xvdd           0        0B       0B         0

What is the reason for this discrepancy?
Any possible fix?

1 Like

fstrim -av works for me in the minimal template.

1 Like

Is the ‘root’ volume of debian-13-minimal stored on a different pool that’s using the legacy ‘file’ driver?

Is Bleachbit free space cleaner an alternative to insecure disk wipe?

@rustybird

Is the ‘root’ volume of debian-13-minimal stored on a different pool that’s using the legacy ‘file’ driver?

Yes.
Why does it create this problem?

Just one of the many problems with the legacy ‘file’ driver. In this case, it’s because its device-mapper based snapshot implementation in dom0 does not support discard on the kernel level.

5 Likes

@rustybird

You are a living encyclopedia of file/snapshot/volume management stuff. :slight_smile:
Thank you!

3 Likes