Mounting XFS with discard option only works for /boot but not /

Chris Murphy lists at colorremedies.com
Sun Nov 23 19:59:21 UTC 2014


On Sun, Nov 23, 2014 at 12:27 PM, John Tall <mjtallx at gmail.com> wrote:

> No. They are both regular GPT partitions.

What results do you get for:
# journalctl -b -l -o short-monotonic | grep -i discard

That may reveal the attempt to (re)mount sysroot with discard and why
it failed. If nothing comes up then boot debug options need to set.

See if this works while you're at it:
# mount -o remount,discard /

And then check mounts. It should now show discard is enabled.

And while you're at it confirm this:
# sgdisk -i4 /dev/sda

"partition GUID code" should be 0fc63daf-8483-4772-8e79-3d69d8477de4,
if you use one of the freedesktop discoverable partitions
partitiontypeGUIDs then systemd ignores fstab for that partition and
does its own automount.

Also FWIW discard isn't a good mount option to use for most SSDs with
non-queuable trim support. If it's one of the very newest SSDs
supporting queuable trim then it should be fine to set. Otherwise
you're better off with a weekly cron issuing fstrim.


-- 
Chris Murphy


More information about the test mailing list