SUSE Support

Here When You Need Us

How to specify custom mount options for root filesystem

This document (7016840) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Desktop 12

Situation

Mount options specified in /etc/fstab are not set for the root filesystem after performing a reboot.

Resolution

On specific mount options (options that can not be activated via a remount) on the root file system (only on /), the mount option(s) have to be specified on the kernel command line, via the grub2 bootloader.

While SUSE is in the process of developing a final fix for this, a workaround would be to:

Edit the grub2 boot loader config at /etc/default/grub and add the:
rootflags=
option with the file system flag added to the GRUB_CMDLINE_LINUX_DEFAULT="" variable, for example:
GRUB_CMDLINE_LINUX_DEFAULT="rootflags=discard"
Make sure to run:
grup2-install
or
grub2-mkconfig -o /boot/grub2/grub2.cfg
afterwards to enable these settings.

Cause

The systemd fstab generator, used to mount the root filesystem, only takes into account the mount options specified in the kernel command line through the "rootflags=" variable.
If this variable is not specified, the root filesystem is mounted firstly with the default mount options and then remounted with the options specified in /etc/fstab.
However, some filesystems (e.g. XFS) do not support changing the mount options during remount.
Thus the settings in /etc/fstab are ignored.

Additional Information


Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7016840
  • Creation Date: 17-Sep-2015
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.