Skip to content

node_filesystem_readonly seems to be reporting _everything_ as read-write #3576

Closed

Description

@io7m

Hello!

Possibly related to #3484 although the symptom in my case seems a little more extreme. The node_filesystem_readonly always reports 0 indicating that all filesystems are read-write.

In my case, most read-only filesystems are archival ZFS filesystems set as read-only. For example:

$ grep vanilla /proc/1/mounts
storage/backup/archived/vanilla /backup/archived/vanilla zfs ro,seclabel,relatime,xattr,noacl,casesensitive 0 0
$ mount | grep vanilla
storage/backup/archived/vanilla on /backup/archived/vanilla type zfs (ro,relatime,seclabel,xattr,noacl,casesensitive)
node_filesystem_readonly{device="storage/backup/archived/vanilla"}  => 0

This has caused a lot of alerting to start complaining, because it thinks those filesystems are full (because they're resized with a quota down to 100% usage before being made read-only, and read-only filesystems are normally excluded from alerting here).

I'm on:

$ /usr/bin/prometheus-node-exporter --version
node_exporter, version 1.10.2 (branch: tarball, revision: 3.el9)
  build user:       
  build date:       20260130
  go version:       go1.25.5 (Red Hat 1.25.5-2.el9_7)
  platform:         linux/amd64
  tags:             rpm_crashtraceback,libtrust_openssl,netgo,osusergo,static_build
$ uname -a
Linux backup02 5.14.0-611.36.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 3 17:30:12 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux

Activity

  1. Vedant-Mhatre commented on Mar 14, 2026

    @Vedant-Mhatre
    Contributor

    I rechecked this locally on current master (March 13, 2026) and could reproduce it with a targeted Linux collector test.

    This appears to be the same underlying bug as #3484 / PR #3507.

    Root cause:

    • mountOptionsString() currently concatenates mount options without commas
    • isFilesystemReadOnly() later splits on commas and looks for "ro"

    So a mount like ro,seclabel,relatime,xattr,noacl,casesensitive is turned into a single string, which causes readonly detection to fail.

    I also verified locally that applying the same comma-separated join logic from #3507 fixes the repro.

  2. discordianfish commented on Mar 20, 2026

    @discordianfish
    Member

    @Vedant-Mhatre Wanna revive #3507 - looks like the author is not responding

  3. added a commit that references this issue on Jun 9, 2026
    65902fa
  4. io7m commented on Jun 11, 2026

    @io7m
    Author

    Apologies for the lack of response. I didn't receive any GitHub notifications for some reason.

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