Bug 670125 - File identifies GFS2 filesystems as GFS1 filesystems
Summary: File identifies GFS2 filesystems as GFS1 filesystems
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: file
Version: 6.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Kaluža
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On: 668125
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-17 09:44 UTC by Jan Kaluža
Modified: 2020-04-06 09:56 UTC (History)
5 users (show)

Fixed In Version: file-5.04-6.el6
Doc Type: Bug Fix
Doc Text:
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.
Clone Of: 668125
Environment:
Last Closed: 2011-02-09 12:30:25 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0204 0 normal SHIPPED_LIVE file bug fix update 2011-02-09 12:29:59 UTC

Description Jan Kaluža 2011-01-17 09:44:55 UTC
+++ 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.

Comment 2 RHEL Program Management 2011-01-17 10:18:58 UTC
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.

Comment 10 Jaromir Hradilek 2011-01-30 01:19:06 UTC
    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.

Comment 11 errata-xmlrpc 2011-02-09 12:30:25 UTC
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


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