how to create a ZFS pool with normalization=formD

mjt5282

Contributor
Joined
Mar 19, 2013
Messages
139
I would like to create my ZFS pool with normalization=formD in order to deal with Mac OS X finder issues when mounting via NFS and not displaying files with non ASCII file names. I would like to create the pool through the GUI but there are no options for extra arguments. Is there a "best" way to do this?
 

eraser

Contributor
Joined
Jan 4, 2013
Messages
147
Not sure of the "best" way, but you could create the pool and/or dataset from the GUI, then open up a shell and change that property yourself.

Something like:

[root@server ~] # zfs set normalization=formD tank/dataset1
 

mjt5282

Contributor
Joined
Mar 19, 2013
Messages
139
i just tried this and it failed :
sudo zfs set normalization=formD media/music
cannot set property for 'media/music': 'normalization' is readonly

usually this property is set at volume creation time and all the datasets inherit it. So, from the command line I will have to create my Volume. Any particular gotchas? Lots of warnings to not do it from the command line ... only through the GUI !
 

eraser

Contributor
Joined
Jan 4, 2013
Messages
147
Oops, how embarrassing -- I didn't actually try testing that command before submitting my reply. I am sorry about that.

A search tells me that "The casesensitivity option is just like utf8only and normalization, it can only be set at creation time." [ https://www.mail-archive.com/zfs-discuss@opensolaris.org/msg22012.html ].

So perhaps we should create a new dataset from the command line? Something like:

[root@server] ~# zfs create -o normalization=formD tank/music2
[root@server] ~# zfs get normalization tank/music2
NAME PROPERTY VALUE SOURCE
tank/music2 normalization formD -
 
D

dlavigne

Guest
Sounds like a good feature request. If you make one at bugs.freenas.org, post the issue number here.
 

eraser

Contributor
Joined
Jan 4, 2013
Messages
147
usually this property is set at volume creation time and all the datasets inherit it. So, from the command line I will have to create my Volume. Any particular gotchas? Lots of warnings to not do it from the command line ... only through the GUI !

Yea if you need that parameter set at the very top level Volume then I would hold off until you hear back from a developer.

dlavigne's suggestion to create a feature request is a good idea.

You could also try asking your question on the #freenas IRC channel (FreeNode) -- there are usually quite a few people hanging out there.
 

mjt5282

Contributor
Joined
Mar 19, 2013
Messages
139
Oops, how embarrassing -- I didn't actually try testing that command before submitting my reply. I am sorry about that.

A search tells me that "The casesensitivity option is just like utf8only and normalization, it can only be set at creation time." [ https://www.mail-archive.com/zfs-discuss@opensolaris.org/msg22012.html ].

So perhaps we should create a new dataset from the command line? Something like:

[root@server] ~# zfs create -o normalization=formD tank/music2
[root@server] ~# zfs get normalization tank/music2
NAME PROPERTY VALUE SOURCE
tank/music2 normalization formD -

eraser - that suggestion worked, I was able to create a new dataset with the formD normalization. This seems like the way to go forward. THANKS!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Do you have any links explaining this formD thing? I'm flabbergasted because I've never heard of this before on the forums.
 

mjt5282

Contributor
Joined
Mar 19, 2013
Messages
139

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Wow. That's pretty amazing. I read that and I have to think there's as many as a dozen other threads for MacOSX that have had problems that are almost explained exactly how that thread explains it!
 
Joined
Nov 28, 2016
Messages
1
I wanted to have normalization=formD on my storage pool so I opted to destroy my pool and recreate it from the command line with the same options that FreeNAS chooses. You'll need the list of GUIDs for the drives in your pool. They were in the form of gptid/d5302574-b5e1-11e6-a70b-0cc47ac565d6 for me. Which translated to /dev/gptid/d5302574-b5e1-11e6-a70b-0cc47ac565d6 on the actual file system. And then in my case, I needed to put my 8 drives into a raidz2 pool so I ended up with this command:


zpool create -f -O atime=off -O aclmode=passthrough -O \
aclinherit=passthrough -O compression=lz4 -O normalization=formD \
-o cachefile=/data/zfs/volume.cache -o failmode=continue \
-o autoexpand=on storage raidz2 \
/dev/gptid/d0130e9d-b5e1-11e6-a70b-0cc47ac565d6 \
/dev/gptid/d05abc23-b5e1-11e6-a70b-0cc47ac565d6 \
/dev/gptid/d079e689-b5e1-11e6-a70b-0cc47ac565d6 \
/dev/gptid/d2757c6a-b5e1-11e6-a70b-0cc47ac565d6 \
/dev/gptid/d2988a0b-b5e1-11e6-a70b-0cc47ac565d6 \
/dev/gptid/d3dcd271-b5e1-11e6-a70b-0cc47ac565d6 \
/dev/gptid/d482edfc-b5e1-11e6-a70b-0cc47ac565d6 \
/dev/gptid/d5302574-b5e1-11e6-a70b-0cc47ac565d6
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
I realize this thread is years old, but I came upon it after reading the zfs man page and searching the web about options when creating zfs pools. I'll be setting up my first FreeNAS soon, and I'm pretty sure I want the 'utf8only' option and maybe normalization too. It seems neither are available from the GUI. I found one ticket and created another:

https://redmine.ixsystems.com/issues/54180
https://redmine.ixsystems.com/issues/71029

Since this thread started about Mac OS X issues, I should add that in the intervening years, macOS has a new default filesystem, APFS. In the various links above, you should substitute "HFS+" where you read "Mac OS X". As best as I can tell, current APFS requires filenames to be UTF-8 (not any random bytes) and is normalization preserving but normalization insensitive.
 
Last edited:
Top