Score:0

How to find invalid XFS mount/fstab options?

in flag

I'm using latest Ubuntu Server 20.04 LTS on a HPE MicroServer, I have a HPE P420 RAID card with battery, with 4 HDDs attached in 2 logical arrays, one is a mirror of 2pcs of 1 TB HDDs (root), and one mirror of 2pcs of 4 TB HDDs (storage). I have Zoneminder running on it and I was trying to do a bit of a cleanup, and surprised how slow the rm -rf dir/* was taking. After a bit of research I realised it's a problem of XFS, so I was trying to tune it a bit, that's when I found this article (or other similar ones, I kept seeing the same things in multiple articles).

So I tried to add these mount options, but unfortunately mount refuses to mount the partition (storage for a start) with those new options. The problem is that doesn't tell me which option is incorrect, this is the only output of $ sudo mount -av:

part A         : ignored
swap           : ignored
/path/to/mount : wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.

(also tried debug options: export LIBMOUNT_DEBUG=all, but it doesn't seem to show anything extra, if there is no mount happening, if it actually mounts something, there are extra lines displayed.)

This is how is the /etc/fstab looks like for that partition:

# DOESN'T WORK:
/dev/disk/by-uuid/b...7 /path/to/mount xfs rw,relatime,attr2,logbufs=8,logbsize=256k,sunit=2048,swidth=2048,largeio,inode64,swalloc,allocsize=131072k,nobarrier,noquota 0 0

# the defauls work:
/dev/disk/by-uuid/b...7 /path/to/mount xfs defaults 0 0

Is there a way of quickly finding which mount option is incorrect? Other than going through all the options one by one then mount after eact, to see which is the incorrect one, which takes long...

Thank you!

cn flag
I do not believe this is possible. Idea to achieve this: create a script, code everything you want to check for and have that script do the mounting for you. Heck of a lot of work. It might be easier to file a feature request on the mount command
jpbrain avatar
ca flag
Hello. Which version of mount are yuo using. from "man xfs" seems that barrier/nobarrier was removed.
sancho.s ReinstateMonicaCellio avatar
What do you get when failiing to mount?
in flag
Version of package `mount` is `2.34-0.1ubuntu9.1`. - The version of the package `xfsprogs` is `5.3.0-1ubuntu2` - @jpbrain is this the version you're referring to? The man says in kernel v4.19 it was removed, so I imagine that can be the problem, as I'm on kernel version `5.4.0-90-generic`. I will retry it when I have a bit of free time, thanks.
Score:0
in flag

The real errors from mount are logged by the kernel rather than the command, so they should show up in /var/log/syslog when the mount is attempted.

in flag
I can't see anything in the logs yet, will try again soon.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.