Bug 492911
Summary: | tar off gfs2 broken - truncated symbolic links | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Everett Bennett <everett.bennett> | ||||||||
Component: | kernel | Assignee: | Steve Whitehouse <swhiteho> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||||||
Severity: | urgent | Docs Contact: | |||||||||
Priority: | low | ||||||||||
Version: | 5.3 | CC: | adas, bmarzins, dzickus, edamato, emcnabb, everett.bennett, mwaite, nstraz, rpeterso, sghosh | ||||||||
Target Milestone: | rc | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | x86_64 | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2009-09-02 09:02:42 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Attachments: |
|
How were the links with zero size created? In particular were they pre-existing on a gfs1 filesystem which was converted, or created by some script or process? I cannot reproduce the issue here at the moment, so I'm wonder what I might be doing differently. Roughly what % of the links are affected? ?Maybe I haven't created enough of them to see the issue yet... I think I might have found the issue.... if when you have some zero length symlinks on a gfs2 filesystem, you umount and then remount again, so the sizes suddenly become correct again? I'm working on a patch at the moment. Created attachment 337329 [details]
Proposed patch
This is the patch which will go upstream.
Created attachment 337336 [details]
Version which applies against the RHEL kernel
Patch posted to rhkernel-list. Possible workarounds in the mean time: 1. umount/remount 2. Use the drop caches feature (via sysfs) which should mean that inodes (including symlinks) will be reread from disk. Can you provide a specific example on how to use vm.drop_caches ? Especially with regards to "gfs2" ? I found this link: - http://www.linuxinsight.com/proc_sys_vm_drop_caches.html The link has the correct info. I'm afraid there is no way to make that filesystem specific, it will affect all the mounted filesystems and the effect will be to lower performance as the caches are refilled. So its not in any way an ideal solution, but it might be the kind of thing which could be used in the short term if you just want to make an occasional back up of a directory tree or something along those lines. I should have also added that the echo 2 line is the one to use, since its the inodes that we wish to have reread. The reproducer that I found was like this (for the benefit of qe): mkdir -p a/b/c/d/e/f touch a/b/c/d/e/f/g ln -s a/b/c/d/e/f/g foo && stat foo If the stat reveals a zero sized inode, than thats the bug. If nothing happens to cause the link's inode to be read before the system disposes of it (after the creation - and that doesn't take very long) then the link size will be set correctly so that the "stat foo" has to occur right away in order to show up the issue. in kernel-2.6.18-138.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5 Please do NOT transition this bugzilla state to VERIFIED until our QE team has sent specific instructions indicating when to do so. However feel free to provide a comment indicating that this fix has been verified. The issue appears to have been resolved. Thanks. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2009-1243.html |
Created attachment 337234 [details] Original report from Manager of ImE product team. Description of problem: Symbolic links are truncated and have size of 0 characters within gfs2 file system. Version-Release number of selected component (if applicable): Name : gfs2-utils Arch : x86_64 Version : 0.1.53 How reproducible: Create tar ball and then check using command such as: Steps to Reproduce: ime1/root> gtar zcf a.tgz app/oracle/product/11.1.0/db_1/bin/ ime1/root> gtar ztvf a.tgz|grep -F " ->" lrwxrwxrwx oracle/oinstall 0 2009-03-26 12:19:45 app/oracle/product/11.1.0/db_1/bin/lbuilder -> / ime1/root> ls -ld app/oracle/product/11.1.0/db_1/bin/lbuilder lrwxrwxrwx 1 oracle oinstall 0 Mar 26 12:19 app/oracle/product/11.1.0/db_1/bin/lbuilder -> /dcs/appl01/app/oracle/product/11.1.0/db_1/nls/lbuilder/lbuilder Actual results: lrwxrwxrwx oracle/oinstall 0 2009-03-26 12:19:45 app/oracle/product/11.1.0/db_1/bin/lbuilder -> / Expected results: lrwxrwxrwx 1 oracle oinstall 0 Mar 26 12:19 app/oracle/product/11.1.0/db_1/bin/lbuilder -> /dcs/appl01/app/oracle/product/11.1.0/db_1/nls/lbuilder/lbuilder Additional info: