Skip to content

systemd-remount-fs.service: Failed with result 'exit-code' when F2FS is used as root partitition #26763

Closed

Description

@ms178

systemd version the issue has been seen with

systemd-git 253.r62916.df40b7ef5a

Used distribution

CachyOS

Linux kernel version used

6.2.5

CPU architectures issue was seen on

x86_64

Component

systemd

Expected behaviour you didn't see

Seeing the service up and running by default without using any of the mentioned workarounds from the Arch Wiki. I've verified that the mentioned workarounds indeed work though.

Unexpected behaviour you saw

❯ sudo systemctl status systemd-remount-fs.service
× systemd-remount-fs.service - Remount Root and Kernel File Systems
     Loaded: loaded (/usr/lib/systemd/system/systemd-remount-fs.service; enabled-runtime; preset: disabled)
     Active: failed (Result: exit-code) since Sat 2023-03-11 21:46:51 CET; 6min ago
       Docs: man:systemd-remount-fs.service(8)
             https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
    Process: 984 ExecStart=/usr/lib/systemd/systemd-remount-fs (code=exited, status=1/FAILURE)
   Main PID: 984 (code=exited, status=1/FAILURE)
        CPU: 10ms

Mär 11 21:46:51 klx99 systemd[1]: Starting Remount Root and Kernel File Systems...
Mär 11 21:46:51 klx99 systemd-remount-fs[1031]: mount: /: Einhängepunkt ist noch nicht eingehängt oder es wurden ungültige Optionen angegeben.
Mär 11 21:46:51 klx99 systemd-remount-fs[984]: /usr/bin/mount for / exited with exit status 32.
Mär 11 21:46:51 klx99 systemd[1]: systemd-remount-fs.service: Main process exited, code=exited, status=1/FAILURE
Mär 11 21:46:51 klx99 systemd[1]: systemd-remount-fs.service: Failed with result 'exit-code'.
Mär 11 21:46:51 klx99 systemd[1]: Failed to start Remount Root and Kernel File Systems.

Steps to reproduce the problem

The issue is not present when using the ext4 file system with the same device, I've only come across it by using F2FS. Booting up the system should reproduce it.

For context, this is my /etc/fstab:

UUID=588A-4B41 /boot/efi      vfat    defaults,noatime 0 2
UUID=99dfb41a-c18e-4872-a1f5-d9531643c2da / f2fs defaults,compress_algorithm=lz4,compress_chksum,atgc,gc_merge,lazytime 0 1
tmpfs /tmp tmpfs   defaults,noatime,mode=1777 0 0

Additional program output to the terminal or log subsystem illustrating the issue

No response

Activity

  1. added
    bug 🐛
    on Mar 11, 2023
  2. changed the title [-]systemd-remount-fs.service: Failed with result 'exit-code' when F2FS is used as root partition[/-] [+]systemd-remount-fs.service: Failed with result 'exit-code' when F2FS is used as root partitition[/+] on Mar 11, 2023
  3. ms178 commented on Mar 11, 2023

    @ms178
    Author

    Might be a duplicate of #22982

  4. YHNdnzj commented on Mar 11, 2023

    @YHNdnzj
    Member

    ArchWiki has made it clear that this is a mount option problem for F2FS and has nothing to do with systemd itself. systemd-remount-fs.service uses exactly the mount options user specified in fstab to remount rootfs, as if one has run mount -o remount,... / manually according to fstab.

  5. ms178 commented on Mar 11, 2023

    @ms178
    Author

    So with which project should I file a bug to get this fixed properly eventually? Is this a distribution problem or a Kernel issue?

  6. YHNdnzj commented on Mar 11, 2023

    @YHNdnzj
    Member

    So with which project should I file a bug to get this fixed properly eventually?

    The Linux kernel I suppose. The following are quoted from ArchWiki:

    The F2FS kernel module does not permit this operation as F2FS file systems are unable to be remounted with added or cleared atgc options.

  7. ms178 commented on Mar 11, 2023

    @ms178
    Author

    Thanks, I'll close this one here and open a Kernel bug report instead. Thanks a lot for taking your time as the implications weren't clear enough for me from reading the Arch Wiki myself.

  8. YHNdnzj commented on Mar 11, 2023

    @YHNdnzj
    Member

    BTW, did you add atgc yourself after doing genfstab or it was there already?

  9. ms178 commented on Mar 11, 2023

    @ms178
    Author

    It was there already. I now use one of the workarounds that solve this.

  10. YHNdnzj commented on Mar 11, 2023

    @YHNdnzj
    Member

    Then maybe I can add a quirk to genfstab so that the option will be removed from the generated entry :)

  11. ms178 commented on Mar 11, 2023

    @ms178
    Author

    A quick search revealed that the atgc feature itself might be very useful for F2FS devices. A helpful error message with a hint to the workaround might be also very helpful or something that points to the Arch wiki.

    Something like "You can workaround this issue on F2FS devices by adding "rootflags=atgc" to your Linux command line." would do the trick.

  12. YHNdnzj commented on Mar 11, 2023

    @YHNdnzj
    Member

    I'll try my best. But I believe the first goal is to provide the users with a fully-functioning fstab 😉

  13. added a commit that references this issue on Mar 11, 2023
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

    bug 🐛not-our-bugremount-fs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions