Red Hat Bugzilla – Bug 1471095
"Unknown command" when trying to run 'thin_trim'
Last modified: 2018-04-10 09:18:07 EDT
Description of problem: When trying to run 'thin_trim' I get: Unknown command 'thin_trim' This tool is in "rpm -ql device-mapper-persistent-data" and there is a working manpage for it. This was working in RHEL 7.3 (0.6.3-1.el7.x86_64) Version-Release number of selected component (if applicable): 0.7.0-0.1.rc6.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.'thin_trim' Actual results: Unknown command 'thin_trim' Expected results: Usage: thin_trim [options] --metadata-dev {device|file} --data-dev {device|file} Options: {-h|--help} {-V|--version} Additional info:
Reproduced.
I consider this to be a 7.5 + 7.4.z bug - not a 7.4 blocker. We currently don't have a way to activate sub-LVs (metadata and data areas) in LVM that would make it simple to use tools like thin_repair/thin_trim manually. Thus the number of people impacted by this before we can get a 7.4.z fix out for it would be very small. Priority may be higher if other dmpd tools were affected, like 'thin_repair', 'thin_dump', etc.
thin_show_duplicates also doesn't working. # for bin in `rpm -ql device-mapper-persistent-data | grep /usr/sbin`; do $bin ; done 2>&1 | grep "Unknown command" Unknown command 'thin_show_duplicates' Unknown command 'thin_trim'
Seems the quickest "fix" is to update the spec file to %configure using --enable-dev-tools. Reassigning to Peter to see if he could enable that configure flag and respin for 7.5 (and 7.4.z). Peter what do you think?
Just changing the flag is insufficient. Also needs: BuildRequires: ncurses-devel Installed (but unpackaged) file(s) found: /usr/sbin/thin_generate_metadata /usr/sbin/thin_ll_dump /usr/sbin/thin_scan Should those be shipped too? Alternatively - the smallest fix - is perhaps just to adjust the #ifdef selection in the source file so that thin_trim and thin_show_duplicates work again.
Created attachment 1299797 [details] Proposed patch to reinstate trim and show_duplicates to rpm
Oh, I see! It's the links are there, but support is not compiled.
Check BZ1469178, it is about thin_show_duplicates. It was filed before this and is related to this as thin_show_duplicates got added here. The difference between trim and show_duplicates bug is, show _duplicates is not a regression plus it is also missing a manpage. There is a part duplicity and I believe it should be resolved based on how this bug will be solved.
IMO the question is shall we drop them or keep pushing forward basically an useless patch? Given it is not easy to use these, the simplest fix is to remove the "dangling" symlinks. If we ever decide to ship these binaries, shall we move them to a subpackage? As for ZStream eligibility, shall we wait for a request from customer? It does not work in Rawhide, and no one complained yet. According to commit message 5f879237f5738ec1a66a5ab80eb60bda12256030: This builds tools that I want to keep in the same code base, but not intended for general release. thin_trim moved to dev-tools in 03499560152967392a6ee6c1e418d21083eda5e9. I am submitting a pull request to Joe, to install the symlinks only if configured so rpmdiff would spot the change.
thin_trim moved to devtools in commit fd02dfa5bf65c5ba127a3da0aad853a88ace47fd and back in f7d79339e8da664d82f32e276a38744f050be9be. Joe, is that intentional?
thin_show_duplicates half is Bug 1469178
Fixed in device-mapper-persistent-data-0.7.3-1.el7.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:0776