Red Hat Bugzilla – Bug 1294955
set-label fails to set some unicode characters as the NTFS filesystem label
Last modified: 2016-11-08 11:50:52 EST
Description of problem:
set-label fails to set some unicode characters as the NTFS filesystem label. This works well on rhel7.2
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. # guestfish -a test.raw
2. Set the label as "水"
><fs> set-label /dev/sda1 "水"
3. Get the label
><fs> vfs-label /dev/sda1
In step 3, nothing returned.
In step 2, the label should be set successfully.
In step 3, the character "水" should be returned.
One line reproducer:
guestfish -N fs:ntfs set-label /dev/sda1 水 : vfs-label /dev/sda1
Upstream: works OK
RHEL 7.2: works OK
RHEL 6.8: fails as described in the bug
I'm inclined to say this is a real bug, but one which we're not
really interested in fixing in RHEL 6. However I'll leave it up
to Pino to comment.
This seems due to the different ntfsprogs version available in libguestfs-winsupport:
libguestfs: trace: set_label "/dev/sda1" "\xe6\xb0\xb4"
libguestfs: send_to_daemon: 68 bytes: 00 00 00 40 | 20 00 f5 f5 | 00 00 00 04 | 00 00 01 36 | 00 00 00 00 | ...
guestfsd: main_loop: proc 278 (mkfs) took 0.14 seconds
guestfsd: main_loop: new request, len 0x40
blkid -c /dev/null -o value -s TYPE /dev/sda1
ntfslabel /dev/sda1 \xe6\xb0\xb4
Unable to convert label string to Unicode: Invalid or incomplete multibyte or wide character.
libguestfs: recv_from_daemon: 40 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 01 36 | 00 00 00 01 | 00 12 34 02 | ...
libguestfs: trace: set_label = 0
- RHEL 6: ntfslabel v2.0.0 (libntfs 10:0:0)
- RHEL 7: ntfslabel v2015.3.14 (libntfs-3g)
Moving to libguestfs-winsupport, which is the package providing the support for NTFS filesystem.
Also, closing this bug as WONTFIX, since:
- it is not a regression, but simply a bug in the old libntfs
- it is not a problem in libguestfs-winsupport for RHEL 7, since libntfs-3g there is more recent and supports this case better
- it is a corner case, usually ASCII characters are used for labels of filesystems