Author Topic: Got problems with sv_SE locale. Can't create directory's with åäö.  (Read 4375 times)

Offline nucce

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Hi,

Im trying to accomplish a folder with the name täst (like test but with an ä instead of a e in the word test(sv_SE).

Output listning of the folder:
Code: [Select]
root@nas:/media/FlexRAID# ls -all
ls: kan inte komma åt täst: Filen eller katalogen finns inte
ls: kan inte komma åt t�st: Filen eller katalogen finns inte
totalt 108
drwxrwxrwx   2 root root  4096 2012-10-20 03:56 .
drwxr-xr-x   4 root root  4096 2012-10-20 17:52 ..
drwxr-xr-x   2 root root  4096 2012-10-21 00:12 nucce
d?????????   ? ?    ?        ?                ? t?st/
drwxr-xr-x   4 root root  4096 2012-10-21 06:19 training
d?????????   ? ?    ?        ?                ? täst/
The first folder named in the list t?st/ was created when I did use wrong locale, when I did create this folder the output was:
Code: [Select]
root@nas:/media/FlexRAID# mkdir täst
mkdir: cannot create directory `t\344st': No such file or directory
But after this I've installed the proper locale, and change my settings to UTF-8 in putty that im using for remote control, when Im now creating a folder by name täst it created(but with all the corrupt attributes as you can see in the list above, and I cant enter it with cd or delete it with rm command*  :'(

*Edit Update 1: I just found out something intrested, when im creating directory "täst" the responese are like this:
Code: [Select]
root@nas:/media/FlexRAID# mkdir täst
mkdir : cannot create directory 'täst' : no such file or directory
ls -all shows the directory with the following attributes:
Code: [Select]
root@nas:/media/FlexRAID# ls -all
ls cannot access täst: No such file or directory
drwxrwxrwx   2 root root  4096 2012-10-20 03:56 .
drwxr-xr-x   4 root root  4096 2012-10-20 17:52 ..
d?????????   ? ?    ?        ?                ? täst
BUT, if i browse to the directory where the partition actuelly is mounted(Intresting point is that the directory got correct name and proper attributes):
Code: [Select]
root@nas:~/FlexRAID-Managed-Pool/class1_0/{e0f2d1c0-6ecb-414f-a3c4-84dccaf8f27f}# ls -all
totalt 68
drwxr-xr-x 17 root root 4096 2012-10-22 00:14 .
drwxr-xr-x  6 root root 4096 2012-10-20 17:40 ..
drwxr-xr-x  2 root root 4096 2012-10-20 12:26 _flxr_
drwxr-xr-x  2 root root 4096 2012-10-22 00:14 täst
And, at last, I can enter the directory, and I can remove it:
Code: [Select]
root@nas:~/FlexRAID-Managed-Pool/class1_0/{e0f2d1c0-6ecb-414f-a3c4-84dccaf8f27f}# cd täst/
root@nas:~/FlexRAID-Managed-Pool/class1_0/{e0f2d1c0-6ecb-414f-a3c4-84dccaf8f27f}/täst# cd ..
root@nas:~/FlexRAID-Managed-Pool/class1_0/{e0f2d1c0-6ecb-414f-a3c4-84dccaf8f27f}# rm -rf täst/
So, my only guess is that we need some kind of buggfix to correct this issue?


Ive changed in the Locale.js so it looks like the following:
Code: [Select]
root@nas:/# cat ./var/lib/flexraid/Locale.js
var userLocale = 'se_SV';



Just some extra output of my configuration to clear all questions:
Code: [Select]
root@nas:/# env
TERM=xterm
SHELL=/bin/bash
XDG_SESSION_COOKIE=4a808ac36de2174394a9b1cf5081cc61-1350827119.646549-716071170
SSH_CLIENT=192.168.0.125 59299 22
SSH_TTY=/dev/pts/0
LC_ALL=sv_SE.UTF-8
USER=root
LS_COLORS=rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
MAIL=/var/mail/root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/etc/alternatives/gem-bin
PWD=/
LANG=sv_SE.UTF-8
HISTCONTROL=ignoreboth
SHLVL=1
HOME=/root
LANGUAGE=sv_SE.UTF-8
LOGNAME=root
LC_CTYPE=sv_SE.UTF-8
SSH_CONNECTION=192.168.0.125 59299 192.168.0.150 22
LESSOPEN=| /usr/bin/lesspipe %s
DISPLAY=localhost:10.0
LESSCLOSE=/usr/bin/lesspipe %s %s
_=/usr/bin/env
OLDPWD=/media/FlexRAID
Code: [Select]
root@nas:/# locale
LANG=sv_SE.UTF-8
LANGUAGE=sv_SE.UTF-8
LC_CTYPE="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_PAPER="sv_SE.UTF-8"
LC_NAME="sv_SE.UTF-8"
LC_ADDRESS="sv_SE.UTF-8"
LC_TELEPHONE="sv_SE.UTF-8"
LC_MEASUREMENT="sv_SE.UTF-8"
LC_IDENTIFICATION="sv_SE.UTF-8"
LC_ALL=sv_SE.UTF-8

Code: [Select]
root@nas:/# locale -a
C
en_AG
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NG
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
POSIX
sv_FI.utf8
sv_SE.utf8


Ive been reading the following tip and forum post without sucess:
http://wiki.flexraid.com/2012/03/04/issues-with-special-characters-on-linux/
http://forum.flexraid.com/index.php/topic,434.msg3973.html#msg3973
« Last Edit: October 21, 2012, 06:09:47 pm by nucce »

Offline Brahim

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8,547
  • Karma: +204/-16
    • View Profile
Re: Got problems with sv_SE locale. Can't create directory's with åäö.
« Reply #1 on: October 21, 2012, 08:26:46 pm »
See the bug report and how it was resolved: http://bug.flexraid.com/view.php?id=250

Offline nucce

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Got problems with sv_SE locale. Can't create directory's with åäö.
« Reply #2 on: October 22, 2012, 02:46:52 am »
See the bug report and how it was resolved: http://bug.flexraid.com/view.php?id=250

Hi Brahim, thanks for fast reaply but I dont really see any solution in that buggfix thread, last comment is from you saying "User has reported that is issue was resolved with changes to his system." which arent very helpful. I'll send you my TW login details and you could take a look(if you want).

Offline gprime

  • Newbie
  • *
  • Posts: 17
  • Karma: +1/-0
    • View Profile
Re: Got problems with sv_SE locale. Can't create directory's with åäö.
« Reply #3 on: October 22, 2012, 06:36:58 am »
i have not really solved it .. i had to change my server and i've reinstalled it with ubuntu server instead of centos and everything is working now ..

The only this i haven't tried when i had the problem was to completly remove flexraid and all the remaning config file and start from scratch or restore a config file ...

it's like if you don't have the right locales at first when you install flexraid, you still get something remembered of theses locales by flexraid ..
strange

try to completly remove flex and reinstall

Offline Brahim

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8,547
  • Karma: +204/-16
    • View Profile
Re: Got problems with sv_SE locale. Can't create directory's with åäö.
« Reply #4 on: October 22, 2012, 06:42:58 am »
[Edit] One thing I don't see in your locales is: C.UTF-8.
This is the most important one to have.

I would say, remove all non-UTF8 locales from your system config.
With many software running on the system it is hard to say whether or not something is changing things globally.

If you look at this screenshot of a working system, you will see that the only locales present are UTF8 locales.
« Last Edit: October 22, 2012, 06:49:54 am by Brahim »

Offline nucce

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Got problems with sv_SE locale. Can't create directory's with åäö.
« Reply #5 on: October 22, 2012, 07:12:19 am »
Hi guys, the thread got some attention at last, thanks for coming in to the discussion gprime.  ;D

However, I finally found what the issue was, it was the init.d job of FlexRAID that started before the default LANG and LANGUAGE flag has been set, I've pasted my working /etc/init.d/FlexRAID startup job below(made comment in the file how to fix locale as well):
Code: [Select]
#! /bin/sh
#
# PURPOSE: Script to start, stop and restart the FlexRAID server
#
# nucce comment: Make sure to change LANG and LANGUAGE to UTF-8 for non-enlgish languages.
# This should also be done thru all your other files as /etc/enviroment, /etc/default/local and at last exist in /var/lib/locales/supported.d/local. Your language must even exist below this folder.
# Like in this example the file sv looks like:
# sv_SE.UTF-8 UTF-8
# sv_FI.UTF-8 UTF-8
#

set -e

LOGDIR=/var/log
RUNDIR=/var/run
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

export LANG="sv_SE.UTF-8"
export LANGUAGE="sv_SE.UTF-8"

test -x /var/lib/flexraid/FlexRAID || exit 0

case "$1" in
  start)
        echo "Starting FlexRAID Server: "
        start-stop-daemon -S -o -b -d /var/lib/flexraid/ -x /var/lib/flexraid/FlexRAID
        echo "FlexRAID started"
        ;;
  stop)
        echo "Stopping FlexRAID Server: "
        start-stop-daemon -K -o -x /var/lib/flexraid/FlexRAID
        echo "FlexRAID stopped"
        ;;

  restart)
        echo "Restarting FlexRAID Server: "
        start-stop-daemon -K -o -x /var/lib/flexraid/FlexRAID
        sleep 1
        start-stop-daemon -S -o -b -d /var/lib/flexraid/ -x /var/lib/flexraid/FlexRAID
        echo "FlexRAID restarted"
        ;;
  *)
        N=/etc/init.d/FlexRAID
        echo "Usage: $N {start|stop|restart}" >&2
        exit 1
        ;;
esac

Thanks guys!

//nucce

Offline gprime

  • Newbie
  • *
  • Posts: 17
  • Karma: +1/-0
    • View Profile
Re: Got problems with sv_SE locale. Can't create directory's with åäö.
« Reply #6 on: October 22, 2012, 10:17:09 am »
Nice :)


Offline gprime

  • Newbie
  • *
  • Posts: 17
  • Karma: +1/-0
    • View Profile
Re: Got problems with sv_SE locale. Can't create directory's with åäö.
« Reply #7 on: October 28, 2012, 09:44:11 am »
the problem reappeared and thanks to your solution it's working again !

Thanks ! :)

Offline MasterCATZ

  • Jr. Member
  • **
  • Posts: 64
  • Karma: +0/-0
    • View Profile
still not having much luck even when changing the startup file


root@aio:~# rsync -aW --progress --stats /ZFSRaidz/Multimedia/ /mnt/FlexRAID_POOL/
sending incremental file list
Anime/
Anime/[Anime-Koi] Blood-C: The Last Dark [h264-1080p][637FF878].mkv
  4190267960 100%   35.75MB/s    0:01:51 (xfer#1, to-check=1544/1555)
Anime/Bleach/.actors/Kishô_Taniyama.tbn
       44025 100%   65.14kB/s    0:00:00 (xfer#2, to-check=1042/1555)
rsync: mkstemp "/mnt/FlexRAID_POOL/Anime/.[Anime-Koi] Blood-C: The Last Dark [h264-1080p][637FF878].mkv.asBzxk" failed: No such file or directory (2)
rsync: mkstemp "/mnt/FlexRAID_POOL/Anime/Bleach/.actors/.Kishô_Taniyama.tbn.q3mAa3" failed: No such file or directory (2)
Anime/Ghost in the Shell S.A.C. Individual Eleven 2006 1080p BluRay x264 DTS-THORA/한글 자막 - 보실 때 압축풀고 압축파일은 보관해주세요.zip
      131915 100%   47.28MB/s    0:00:00 (xfer#3, to-check=1016/2887)
Anime/Ghost in the Shell S.A.C. The Laughing Man[1080p,BluRay,x264]_-_THORA/한글 자막 - 보실 때 압축풀고 압축파일은 보관해주세요.7z
       50962 100%  145.52kB/s    0:00:00 (xfer#4, to-check=1010/2887)


*edit* how ever it might be now because of permission problems .. starting another thread
( flex raid keeps randomly making its self read only)
« Last Edit: May 11, 2013, 04:08:39 pm by MasterCATZ »