SUSE Support

Here When You Need Us

Read-only or corrupted filesystem after fstrim operation on Eternus series provided storage LUN

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

Environment

SUSE Linux Enterprise Server 12 Service Pack 2 (SLES 12 SP2)
SUSE Linux Enterprise Server 12 Service Pack 3 (SLES 12 SP3)
Fujitsu Eternus series storage

Situation

A path loss is observed after performing DISCARD operations executed by fstrim on a LUN provided by an Eternus DXM, DXL or DXH series storage system. This results in read-only or even corrupted file systems. 

Resolution

With kernel 4.4.92-6.18.1 (SLES 12 SP3 or later) and 4.4.90-92.45.1 (SLES 12 SP2 and later), the path loss and subsequent possible data corruption have been addressed. Yet the DISCARD operation still fails. The following udev rule causes the kernel to use SCSI 'UNMAP' commands rather than 'WRITE SAME 16 with UNMAP bit', so that unused blocks can be discarded successfully.


/etc/udev/rules.d/55-eternus.rules
ACTION=="add", SUBSYSTEM=="scsi_disk", \
   ATTRS{vendor}=="FUJITSU", ATTRS{model}=="ETERNUS_DXM", \
   ATTR{provisioning_mode}="unmap"


This rule is needed until correct support support for "WRITE SAME 16 with UNMAP bit" method of discarding blocks is implemented in the Eternus DXM firmware. In case a different model is being used, please adjust the ATTRS{model} string accordingly (/sbin/udevadm info -e | grep ID_MODEL=ETERNUS). 

Cause

While executing DISCARD operations triggered by fstrim, the kernel sends a WRITE SAME 16 with UNMAP bit to the storage which it does not support at the moment. This leads to a path loss situation that turns the file system read-only or in a worst case corrupts it.

Additional Information

Please note: fstrim.service is enabled by default and run on a regular base, see systemctl list-timers output for details.

When running a manual rescan of a device (echo 1 > /sys/block/sd?/device/rescan) the settings from the udev rule are reset. This is currently handled insufficiently by the kernel and under investigation. For the time being, please run

udevadm trigger

when executing manual device rescan. 

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:7022268
  • Creation Date: 02-Nov-2017
  • Modified Date:22-Oct-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.