3

I've ran out of disk space (heh). So, I cleverly mounted some shares via NFS (which is blindingly fast compared to any other type of file sharing, thanks to the advanced support macOS has for NFSv4, built into the kernel itself). For trivial things (music, video...) this works nicely.

The issue I've got is simply that some applications I have (games!!), to run from a NFS share, they need it to be mounted as case-insensitive, but NFS, by default, mounts filesystems as case-sensitive:

Unreal Engine Fortnite

On Synology (DS218play, DSM 7.2.1-69057 Update 3) everything is (supposedly) handled via the Shared Folder option in the Control Panel:

Synology Shared Folder Configuration

which, in turn, produces the following:

$ sudo cat /etc/exports
/volume1/movies 10.1.1.0/24(rw,async,no_wdelay,crossmnt,insecure,all_squash,insecure_locks,sec=sys,anonuid=1024,anongid=100)
/volume1/music  10.1.1.0/24(rw,async,no_wdelay,crossmnt,insecure,all_squash,insecure_locks,sec=sys,anonuid=1024,anongid=100)
... etc for other shares...

(10.1.1.0/24 being in this example the IP range for my home network)

On the macOS (Big Sur), I mount the NFS shares via the Finder, using Go > Connect to Server... which, in my experience, is the best way to get them to work (believe me, I've tried many alternatives explained thoroughly on several places, including here on Ask Different). I make them persistent simply by dragging them on the Login Items tab for my user under Users & Accounts.

The (working) result shows up as:

$ mount
synology.local:/volume1/music on /Volumes/music (nfs, nodev, nosuid, mounted by gwyneth)
synology.local:/volume1/movies on /Volumes/movies (nfs, nodev, nosuid, mounted by gwyneth)
... etc for other shares...

So far, so good, and this essentially works for everything that is fine with case-sensitive mounts — the default in the Unix world, after all.

But now I wish to tweak the parameters to get those mounts to be case-insensitive!

Mind you, I'm fine in having such tweaks either on the side of macOS or on the Synology; even a "temporary" solution (one that doesn't survive reboots, upgrades, etc.) would go a long, long way to get things running.

But I have taken a look at similar questions such as:

or even

One wild idea seems to sugggest that the NFS filesystem ought to be mounted as a sparse disk image (just like Time Machine does!):

Samba shares obviously can be mounted either way, but I really want to use NFS:

Similar (not exactly the same) issues with case-sensitivity vs. case-insensitive under Windows seem to have been fixed only last year by simply using a special parameter to toggle case sensitivity.

Cool! Is there a similar parameter for macOS?

(Or Synology DSM?)

Note: I'm aware I might be on a wild-goose chase here; nevertheless, who knows, maybe there is a way to override the case-sensivity at some kernel or networking layer, it's just that most people are unwilling to do it, thus the lack of proper replies to this issue.

1
  • Thanks so much to all who replied, even if the answer, ultimately, is "you can't do that" :) nohillside provided the first answer, which was absolutely correct, but I accepted jksoegaard as most helpful, since it included extra explanations. Both, however, essentially provide a workaround for what I need to do. I haven't done so yet, but I will, and post the results here for future searches! Again — thanks guys, you rock :) Commented Dec 4, 2023 at 15:21

2 Answers 2

2

The proper way to handle this is not through changing the NFS client configuration, which is why you do not see any case-sensitivity settings in mount_nfs or nfs.conf or similar places.

The preferred, native way of getting a case insensitive mount is to use a file system that is either case insensitive as such, or has the possibility of configuring case insensitivity.

In your case, you are using an ext4 file system — and ext4 does support configuring case insitivity through its "casefold" feature. Unfortunately, that feature requires at least a 5.2 Linux kernel (from July 2019), and the latest Synology DSM (the software you're using) only runs 4.4.

The Synology DSM software also supports creating btrfs file systems, but unfortunately they do not support case insensitivity.

So if you want native case-insensitivity, you're sadly out of luck for now. Presumably, Synology will later release a new version of DSM based on a newer Linux kernel. The 4.4-series Linux kernel that Synology uses is from 2016, so normally it would have been end of life long ago. That specific series has been chosen as for special "Super Long Term Support" though, which means that it will continue to be supported until January 2027. So you could risk having to wait for a really long time. The 6.1 release from December 2022 is the latest "Super Long Term Support" release, so hopefully Synology will adopt that sooner than later.

The most practical way forward will be to place an image file on the case-sensitive ext4 file system and mount that on your Mac NFS client. This way the file system inside the image file can be mounted case insensitive. However, this comes with the restriction that only 1 Mac at a time can mount the image file. If you accidentally mount it twice at the same time, you will risk corrupting the image file.

2
  • Thank you for your detailed answer! I was aware of the 4.4 issue (and always wondered why DSM used such an ancient kernel — now I know!). My Synology only supports ext4 natively (without hacking I mean), and btrfs is (sadly!) explicitly ruled out for my device. So, aye, it seems like the best solution is on your last paragraph: it should work, since there is only one Mac in our home network, so that "restriction" is perfectly acceptable for me. I'll twiddle a bit with it and will let you know how it went! Commented Dec 4, 2023 at 15:09
  • Half a year later and Synology is still stuck with kernel 4.4.302+... Commented yesterday
1

mount_nfs(8) doesn't list any options related to case-sensitivity, so at least up to Sonoma there doesn't seem to be an option for this.

Alternative approaches

  • Create an APFS-formatted DMG on the volume mounted from the NAS, and store game files there.
  • Create an additional Shared Folder via the Control Panel on the NAS, mount this case-insensitive via SMB and store game files there.
1
  • Thanks so much for your answer — it sort of confirms what I suspected regarding mount_nfs. I'm aware that either of your solutions should work; the first one is essentially what @jksoegaard also suggested (after you, in fact) and will probably what I'll try out. The SMB way naturally works, but, alas, it's not "fast enough" — good for several other purposes, but NFS is really superior in terms of raw speed. Sorry for not flagging your (excellent) question as accepted — it's just that @jksoegaard added a lot of extra explanations :) (but your answer is succinct and correct) Commented Dec 4, 2023 at 15:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .