Re: Are Japanese characters allowed in hostname in /etc/exports?
From: Hanxiao Chen (Fujitsu) <hidden>
Date: 2024-02-01 06:07:07
-----邮件原件----- 发件人: Dan Shelton [off-list ref] 发送时间: 2024年2月1日 11:49 收件人: Linux NFS Mailing List [off-list ref] 主题: Are Japanese characters allowed in hostname in /etc/exports? Hello! Can I use Japanese characters in the hostname for an export line in /etc/exports? Or first convert hostname into a punycode string, and then put that string into /etc/exports?
I did a simple test on my machine:
1) NFS server:
# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.122.16 アイウエオ
# cat /etc/exports
/nfsroot アイウエオ(rw)
# exportfs -arv
exporting アイウエオ:/nfsroot
2) client:
# mount -t nfs -o vers=4.2 192.168.122.15:/nfsroot /mnt
192.168.122.15:/nfsroot on /mnt type nfs4 (rw,relatime,vers=4.2,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.122.16,local_lock=none,addr=192.168.122.15)
Looks like all good.
But as [1] mentioned...
The Internet standards (Request for Comments) for protocols specify that labels may contain only the ASCII letters a through z (in a case-insensitive manner), the digits 0 through 9, and the hyphen-minus character ('-').
Regards,
- Chen
[1] https://en.wikipedia.org/wiki/Hostname