Bug 1294955 - set-label fails to set some unicode characters as the NTFS filesystem label
set-label fails to set some unicode characters as the NTFS filesystem label
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs-winsupport (Show other bugs)
6.8
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
Depends On:
Blocks: 1301844
  Show dependency treegraph
 
Reported: 2015-12-31 04:32 EST by Hu Zhang
Modified: 2016-11-08 11:50 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-08 11:50:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hu Zhang 2015-12-31 04:32:41 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):
libguestfs-1.20.11-16.el6.x86_64
libguestfs-winsupport-1.0-7.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. # guestfish -a test.raw
><fs> list-filesystems
/dev/sda1: ntfs

2. Set the label as "水"
><fs> set-label /dev/sda1 "水"
><fs>

3. Get the label
><fs> vfs-label /dev/sda1

><fs>


Actual results:
In step 3, nothing returned.

Expected results:
In step 2, the label should be set successfully.
In step 3, the character "水" should be returned.


Additional info:
Comment 1 Richard W.M. Jones 2016-01-04 10:31:42 EST
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.
Comment 2 Pino Toscano 2016-01-15 12:54:21 EST
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

Versions available:
- RHEL 6: ntfslabel v2.0.0 (libntfs 10:0:0)
- RHEL 7: ntfslabel v2015.3.14 (libntfs-3g)
Comment 4 Pino Toscano 2016-11-08 11:50:52 EST
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

Note You need to log in before you can comment on or make changes to this bug.