Can you change a dataset to case sensitive?

I’m a newbie and have been reading so many docs and forum posts, I’m getting confused.

I just noticed that a dataset I created doesn’t have Case Sensitivity.

I can’t get it on so I assume it was set when I created the dataset and now it’s default and not able to change.

I’m a moron. I need case sensitivity since most of our computers at home are Macs. The Mac file system has case sensitive files and so we have potential issues with case sensitive files.

If I understand correctly, you can’t change a dataset once it’s been created. Is this correct?

And there is no way to change the dataset to case sensitive?

To solve this issue I would need to create a new dataset with case sensitivity set to on. Then migrate files to this new dataset>

Thanks in advance for your help.

You chose “SMB” as “Share Type” during dataset creation, didn’t you? :wink:

Case sensitivity for Samba shares is likely disabled because, well, MS-Windows, (need I say more?).

I don’t know if Samba has features / capability to make case sensitivity or not, but their is a ZFS Dataset parameter;

zfs get casesensitivity POOL/DATASET
POOL/DATASET  casesensitivity       sensitive

I don’t know if just changing the dataset parameter is all that is needed. You can change with;
zfs set casesensitivity=sensitive POOL/DATASET
Edit: Added strike through on above, because that parameter can’t be changed. Only set on Dataset creation.


You can’t. It’s an immutable property, set upon dataset creation. :pensive:


@winnielinnie - Yes, a simple test proves that. Well, OP has the answer.

MacOS defaults to case-insensitive APFS. One can create a case-sensitive file system, but macOS will still install in a case-insensitive “System” volume and restrict case-sensitivity to the “Data” volume.

If the OP does want to have a case-sensitive share, and enforce that, he should create a new case-sensitive dataset and share it through (case-sensitive) NFS (or AFS from CORE, while the protocol is still available).

SMB serviec can also manage case-sensitive datasets.

Thanks everyone for helping me understand the possibilities and limitations. Much appreciated :+1:

Yes I did.

I’m still setting up my new TrueNAS. As I’ve added more disks, I’d like to migrate some data over from the old drive mirror to the new drive mirror. I’ve got a bunch of Apple files that have all that AppleDouble and .DS garbage. I understand it helps Macs but makes life difficult. I realized that case sensitivity was off because I’ve got files like and that happily sit on the old drives but cause error in this new SMB data set. :upside_down_face: live and learn.

I have to get a better handle on how the original mirror has been set up so I can get the same / similar settings in ZFS.

I suppose I should have set multi-protocol rather than SMB?

Appledouble files should not be getting generated with our default SMB configuration (we store this metadata in xattrs).

1 Like

The “Share Type” is a TrueNAS thing, not a ZFS feature. It basically forces certain options, such as Case Sensitivity and ACL Mode.

It depends on your needs / preferences.

Most of my datasets (on Core) were created with “Share Type” as “Generic”, which doesn’t apply any presets.

1 Like

Yes, it just applies ZFS dataset presets and a default ACL that makes sense for most users.

I’ve created a new “generic” dataset and set up SMB sharing. It looks to be working fine, so I’m going to migrate all the files over.

A final question regarding this if you don’t mind.
Do Macs that connect to this “generic” dataset file share using SMB even need all this AFP stuff anymore? Would I be able to delete all those .AppleDouble etc. files?

Thanks again for everyone’s help. I think I’m starting to understand. :smiley:

There shouldn’t have been these written to start with unless you disabled alternate data streams. There is no special configuration needed for MacOS in general.

Thanks for the quick reply @awalkerix
I rsync’d the files over so everything that ever was in that original ZFS volume was moved over. I checked using diff to make sure I didn’t lose any files. I have 100% identical.
But that means that all the old Apple file system hidden files came along also.
So if Macs don’t need that anymore, then I hope to just remove those files.

Where did this data come from? Ie what was it rsynced from?

If you erase the AppleDouble files you have the potential to lose the Apple HFS metadata and resource fork data.

Of course, this may not matter.

Hi @Stux
The data came originally from individual Macs and I have Macs accessing this data. I don’t want to lose any file data that would be needed to access the files.

When you rsync data directly, the MacOS metadata may not be stored in a way that is accessible via SMB on TrueNAS. Generally, you should go through SMB for this.

1 Like

Case sensitivity cannot be changed after saving a dataset.

Depending on the version of SCALE installed, you can select the Dataset Preset on a simplified Add Dataset configuration screen to apply standard settings for the preset you select, or click Advanced Options to access settings like Case Sensitivity.
If setting up an SMB share, select SMB as the preset for the dataset.

1 Like