Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1294955

Summary: set-label fails to set some unicode characters as the NTFS filesystem label
Product: Red Hat Enterprise Linux 6 Reporter: Hu Zhang <huzhan>
Component: libguestfs-winsupportAssignee: Richard W.M. Jones <rjones>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: leiwang, linl, ptoscano, wshi, xchen
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-08 16:50:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1301844    

Description Hu Zhang 2015-12-31 09:32:41 UTC
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 15:31:42 UTC
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 17:54:21 UTC
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 16:50:52 UTC
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