Hide Forgot
+++ This bug was initially created as a clone of Bug #668125 +++ Created attachment 472322 [details] Differentiate between GFS1 and GFS2 on sb_fs_format File uses the magic number in the superblock to identify GFS2 filesystems but GFS1 and GFS2 filesystems share the same magic number. This causes file to misidentify GFS1 filesystems as GFS2 filesystems. This can easily be fixed by using another point of differentiation. I created a patch against file-5.04 that identifies on magic number and sb_fs_format. This allows file to differentiate between the two types of filesystem. [root@node2 file-5.04]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.5 (Tikanga) [root@node2 file-5.04]# file -s /dev/mapper/mpath0p1 /dev/mapper/mpath0p1: GFS2 Filesystem (blocksize 4096, lockproto lock_dlm) [root@node2 file-5.04]# file -s /dev/mapper/mpath0p2 /dev/mapper/mpath0p2: GFS2 Filesystem (blocksize 4096, lockproto lock_dlm) [root@node2 file-5.04]# src/./file -s /dev/mapper/mpath0p1 /dev/mapper/mpath0p1: Linux GFS2 Filesystem (blocksize 4096, lockproto lock_dlm) [root@node2 file-5.04]# src/./file -s /dev/mapper/mpath0p2 /dev/mapper/mpath0p2: Linux GFS1 Filesystem (blocksize 4096, lockproto lock_dlm) Patch file was created against 4.17-15.el5_3.1. I tested the same code change (different patch file though) in 5.04 and it worked equally well. --- Additional comment from jkaluza on 2011-01-10 04:16:42 EST --- Thanks for the patch. I've tested it and already sent it to upstream mailing list. --- Additional comment from swhiteho on 2011-01-14 09:41:14 EST --- Looks like this probably needs to be cloned for rhel6 as well? --- Additional comment from jkaluza on 2011-01-17 04:44:15 EST --- Of course, you're right. I forgot to do it, thanks.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. If you would like it considered as an exception in the current release, please ask your support representative.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Due to an error in a magic pattern, the file utility incorrectly identified GFS file systems as GFS2. With this update, the magic pattern has been corrected, and GFS file systems are now identified as expected.
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/RHBA-2011-0204.html