ltfs
ltfs copied to clipboard
Cannot read or write names with accented characters: Cannot convert system locale to UTF-16
We have been using ltfs on a CentOS 7 system for the last 3 years.
Suddenly, we cannot use filenames containing accented characters. Neither write them to tape, nor read them from an LTO-7 tape which was written on the same system a few months ago.
I have now upgraded from ltfs 2.4.3.2 to version 2.4.4.0, but that makes no difference.
This is the log when trying to write files with accents:
7d02 LTFS11337I Update index-dirty flag (1) - 18L076 (0x0x1684240).
7f14 LTFS11248E Cannot convert system locale to UTF-16: failed to get output buffer size (12) for '/2-caractères.txt'.
7f14 LTFS11039E Cannot open file: failed to format the path (-1044).
Here are a few details about the system:
$ cat /etc/system-release
CentOS Linux release 7.9.2009 (Core)
$ ltfs --version
LTFS version 2.4.4.0 (10470).
$ uname -a
Linux zukini 3.10.0-1160.62.1.el7.x86_64 #1 SMP Tue Apr 5 16:57:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
It is possible, though I'm not sure, that the OS has had a routine update in the last months. Unfortunately, we don't have a different system on which we could test it.
The error code 12 is U_ILLEGAL_CHAR_FOUND.
7f14 LTFS11248E Cannot convert system locale to UTF-16: failed to get output buffer size (12) for '/2-caractères.txt'.
U_ILLEGAL_CHAR_FOUND = 12, /**< Character conversion: Illegal input sequence/combination of input units. */
~1. Do you know what version of LTFS is used for writing the file that cause the problem?~ ~2. Can you create a new file which has the same name again into another tape?~
~And I would like to have the index captured by ltfsindextool for further investigation.~
--
Sorry I made a misunderstand. I assume you already wrote the file on tapa and LTFS reported an error at mount time.... But I realized you just write a file with accented characters.
Well, this weird problem disappeared by itself! I retried a few days later, and it just worked normally. With the same source files, copied to the same tape with the same LTFS version 2.4.4.0.
We strongly disapprove the use of accented characters in file names, because sooner or later they always end up causing some problem in some situation. So it is quite exceptional to need to write them to tape.
I will however try it a few more times to see if it can be reproduced.
Well, this weird problem disappeared by itself! I retried a few days later, and it just worked normally. With the same source files, copied to the same tape with the same LTFS version 2.4.4.0.
Indeed.
My wild guess is environmental value is nor set correctly on the window that LTFS is launched. (LTFS set it forcibly by itself but it fails in some reasons.)
And it is corrected by next login.
Close this. Please feel free if you have new findings.