Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 720935 - GFS2: mkfs.gfs2 doesn't work on regular files
GFS2: mkfs.gfs2 doesn't work on regular files
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gfs2-utils (Show other bugs)
5.8
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Andrew Price
Cluster QE
:
Depends On: 719943
Blocks: 720668
  Show dependency treegraph
 
Reported: 2011-07-13 05:45 EDT by Andrew Price
Modified: 2012-02-21 01:39 EST (History)
8 users (show)

See Also:
Fixed In Version: gfs2-utils-0_1_62-33_el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 719943
Environment:
Last Closed: 2012-02-21 01:39:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Backported patch (2.28 KB, patch)
2011-08-10 10:06 EDT, Andrew Price
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0269 normal SHIPPED_LIVE gfs2-utils bug fix and enhancement update 2012-02-20 10:06:23 EST

  None (edit)
Description Andrew Price 2011-07-13 05:45:11 EDT
+++ This bug was initially created as a clone of Bug #719943 +++

Description of problem:

$ dd if=/dev/null of=sparse-file bs=1 count=0 seek=1T
$ ./mkfs.gfs2 -t foo:bar sparse-file 
../../gfs2/libgfs2/libgfs2.h: sparse-file is not a block device

--- Additional comment from anprice@redhat.com on 2011-07-11 10:26:52 EDT ---

Created attachment 512229 [details]
Patch to handle regular files

--- Additional comment from anprice@redhat.com on 2011-07-11 12:22:20 EDT ---

Created attachment 512257 [details]
Patch to handle regular files, v2

--- Additional comment from anprice@redhat.com on 2011-07-11 12:54:36 EDT ---

Patch v2 is now in gfs2-utils.git. Closing as UPSTREAM.
Comment 1 Andrew Price 2011-08-10 10:06:30 EDT
Created attachment 517618 [details]
Backported patch
Comment 2 Andrew Price 2011-08-10 11:44:25 EDT
Above patch is now in the RHEL58 branch of cluster.git
Comment 3 Nate Straz 2011-11-08 17:28:00 EST
Can you please post some unit test results to show that development has tried out the fix in the 5.8 package

FMI see http://wiki.test.redhat.com/ClusterStorage/WhyNeedDevTestResults
Comment 4 Andrew Price 2011-11-09 04:11:01 EST
Using the steps from the original bug:

[root@exxon-01 ~]# rpm -q gfs2-utils
gfs2-utils-0.1.62-33.el5
[root@exxon-01 ~]# dd if=/dev/null of=sparse-file bs=1 count=0 seek=1T
0+0 records in
0+0 records out
0 bytes (0 B) copied, 1.4e-05 seconds, 0.0 kB/s
[root@exxon-01 ~]# mkfs.gfs2 -O -t foo:bar sparse-file
Device:                    sparse-file
Blocksize:                 4096
Device Size                1024.00 GB (268435456 blocks)
Filesystem Size:           1024.00 GB (268435454 blocks)
Journals:                  1
Resource Groups:           4096
Locking Protocol:          "lock_dlm"
Lock Table:                "foo:bar"
UUID:                      0B8E5EE2-895C-5A71-5B33-EE604A160401

[root@exxon-01 ~]# fsck.gfs2 sparse-file 
Initializing fsck
Validating Resource Group index.
Level 1 RG check.
(level 1 passed)
Starting pass1
Pass1 complete      
Starting pass1b
Pass1b complete
Starting pass1c
Pass1c complete
Starting pass2
Pass2 complete      
Starting pass3
Pass3 complete      
Starting pass4
Pass4 complete      
Starting pass5
Pass5 complete      
gfs2_fsck complete
Comment 6 Justin Payne 2011-12-05 12:36:31 EST
[root@localhost ~]# rpm -q gfs2-utils

gfs2-utils-0.1.62-31.el5

[root@localhost ~]# dd if=/dev/null of=sparse-file bs=1 count=0 seek=256M
0+0 records in
0+0 records out
0 bytes (0 B) copied, 7e-06 seconds, 0.0 kB/s

[root@localhost ~]# mkfs.gfs2 -O -t foo:bar sparse-file
mkfs.gfs2: sparse-file is not a block device


[root@localhost ~]# rpm -q gfs2-utils
gfs2-utils-0.1.62-33.el5

[root@localhost ~]# dd if=/dev/null of=sparse-file bs=1 count=0 seek=256M
0+0 records in
0+0 records out
0 bytes (0 B) copied, 7e-06 seconds, 0.0 kB/s

[root@localhost ~]# mkfs.gfs2 -O -t foo:bar sparse-file
Device:                    sparse-file
Blocksize:                 4096
Device Size                0.25 GB (65536 blocks)
Filesystem Size:           0.25 GB (65534 blocks)
Journals:                  1
Resource Groups:           1
Locking Protocol:          "lock_dlm"
Lock Table:                "foo:bar"
UUID:                      602C068C-6D89-FA0A-847A-A9D9DCBE0390

[root@localhost ~]# fsck.gfs2 sparse-file
Initializing fsck
Validating Resource Group index.
Level 1 RG check.
(level 1 passed)
Starting pass1
Pass1 complete      
Starting pass1b
Pass1b complete
Starting pass1c
Pass1c complete
Starting pass2
Pass2 complete      
Starting pass3
Pass3 complete      
Starting pass4
Pass4 complete      
Starting pass5
Pass5 complete      
gfs2_fsck complete

Verified in gfs2-utils-0.1.62-33.el5
Comment 7 errata-xmlrpc 2012-02-21 01:39:17 EST
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.

http://rhn.redhat.com/errata/RHBA-2012-0269.html

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