Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Cause:
mkfs.gfs2 treated regular files as if they were block devices
Consequence:
Attempting to create a GFS2 file system on a regular file would cause mkfs.gfs2 to fail with a "not a block device" error message.
Fix:
Additional checks were added so that mkfs.gfs2 does not call block device-specific functions on regular files.
Result:
GFS2 file systems can now be created on regular files, although this is a feature intended to aid testing and is not a recommended use of GFS2.
+++ 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 on 2011-07-11 10:26:52 EDT ---
Created attachment 512229[details]
Patch to handle regular files
--- Additional comment from anprice on 2011-07-11 12:22:20 EDT ---
Created attachment 512257[details]
Patch to handle regular files, v2
--- Additional comment from anprice on 2011-07-11 12:54:36 EDT ---
Patch v2 is now in gfs2-utils.git. Closing as UPSTREAM.
Comment on attachment 513757[details]
Patch for RHEL6 (unchanged from upstream)
Looks good to me. Just need to get it posted. Would be good to get the tunegfs2 bugs resolved at the same time, too.
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:
Cause:
mkfs.gfs2 treated regular files as if they were block devices
Consequence:
Attempting to create a GFS2 file system on a regular file would cause mkfs.gfs2 to fail with a "not a block device" error message.
Fix:
Additional checks were added so that mkfs.gfs2 does not call block device-specific functions on regular files.
Result:
GFS2 file systems can now be created on regular files, although this is a feature intended to aid testing and is not a recommended use of GFS2.
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-2011-1516.html