You are not logged in.

#1 2018-08-07 06:31:07

scolby33
Member
Registered: 2018-08-07
Posts: 6

systemd-fsck Fails on exfat Volume Only at Boot

Hello all,

I am having an issue that has proven impossible to Google for.

$ sudo journalctl -b -u systemd-fsck*
*snip*
Aug 03 22:47:17 cobalt systemd[1]: Starting File System Check on /dev/disk/by-uuid/10DF-38AB...
Aug 03 22:47:17 cobalt systemd-fsck[712]: fsck.exfat: invalid option -- 'a'
Aug 03 22:47:17 cobalt systemd-fsck[712]: Usage: fsck.exfat [-V] <device>
Aug 03 22:47:17 cobalt systemd-fsck[712]: exfatfsck 1.2.8
Aug 03 22:47:17 cobalt systemd[1]: Started File System Check on /dev/disk/by-uuid/10DF-38AB.
*snip*

However, running the exact command on a running system gives results like

$ sudo systemctl status systemd-fsck*
*snip*
● systemd-fsck@dev-disk-by\x2duuid-10DF\x2d38AB.service - File System Check on /dev/disk/by-uuid/10DF-38AB
   Loaded: loaded (/usr/lib/systemd/system/systemd-fsck@.service; static; vendor preset: disabled)
   Active: active (exited) since Fri 2018-08-03 22:47:17 PDT; 3 days ago
     Docs: man:systemd-fsck@.service(8)
  Process: 712 ExecStart=/usr/lib/systemd/systemd-fsck /dev/disk/by-uuid/10DF-38AB (code=exited, status=0/SUCCESS)
 Main PID: 712 (code=exited, status=0/SUCCESS)
Aug 03 22:47:17 cobalt systemd[1]: Starting File System Check on /dev/disk/by-uuid/10DF-38AB...
Aug 03 22:47:17 cobalt systemd-fsck[712]: fsck.exfat: invalid option -- 'a'
Aug 03 22:47:17 cobalt systemd-fsck[712]: Usage: fsck.exfat [-V] <device>
Aug 03 22:47:17 cobalt systemd-fsck[712]: exfatfsck 1.2.8
Aug 03 22:47:17 cobalt systemd[1]: Started File System Check on /dev/disk/by-uuid/10DF-38AB.
*snip*
$ sudo /usr/lib/systemd/systemd-fsck /dev/disk/by-uuid/10DF-38AB
$ echo $?
0

I am confused on two counts:

  • Why does the failed fsck.exfat run at boot still result in a non-failed systemd-fsck@ unit?

  • Why does the same command work after boot? Am I missing a module in the initramfs or something?

As I said, I was unable to find anything similar to this with several searches. Any advice is welcome!

Offline

#2 2018-08-07 07:09:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,842

Re: systemd-fsck Fails on exfat Volume Only at Boot

The fsck.exfat versions of the system and in the initramfs might differ, w/ the latter not providing the "-a" option. Try to rebuild the initramfs.

Offline

#3 2018-08-07 08:08:13

scolby33
Member
Registered: 2018-08-07
Posts: 6

Re: systemd-fsck Fails on exfat Volume Only at Boot

No luck, unfortunately. mkinitcpio -p linux runs with no warnings or errors but the same issue is present after a reboot.

Offline

#4 2018-08-07 10:45:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,842

Re: systemd-fsck Fails on exfat Volume Only at Boot

Ok, checked.  fsck.exfat simply has no "-a" option (that's fsck.vfat only), so there's actually no way that the "exact command" works.
For some reason™ the command was invoked w/ this bogus switch once, last friday - but that seems to be an isolated incident?

Offline

#5 2018-08-10 09:11:49

scolby33
Member
Registered: 2018-08-07
Posts: 6

Re: systemd-fsck Fails on exfat Volume Only at Boot

No, I do agree that that argument doesn't exist for fsck.exfat. What I mean is that the exact command listed in systemd-fsck@.service works: /usr/lib/systemd/systemd-fsck /dev/disk/by-uuid/10DF-38AB exits with 0 (not surprising, since that's what happens even when the error is shown) and outputs no warnings or errors.

Unfortunately this isn't a one-off event; I just don't reboot that often. After a full system update today that rebuilt the initramfs, I rebooted and have the exact same errors in my logs.

I know ExFAT isn't the most common filesystem around. Can anyone reproduce this? I suspect there might be a bug in systemd-fsck that hasn't been caught due to ExFAT's relative rarity...

Offline

#6 2018-08-10 09:30:03

scolby33
Member
Registered: 2018-08-07
Posts: 6

Re: systemd-fsck Fails on exfat Volume Only at Boot

Yep, I think this is a systemd problem. If you look at the source here, you'll see it assembles a command line like

/sbin/fsck -a -T -l -M [-C fd] /dev/disk/by-uuid/...

All of these are arguments to /sbin/fsck except -a which is passed on to the actual checker. I'll open an issue over there, I guess.

EDIT:
systemd/systemd#9849

Last edited by scolby33 (2018-08-10 09:44:03)

Offline

Board footer

Powered by FluxBB