Bug 720668
Summary: | GFS2: mkfs.gfs2 doesn't work on regular files | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Andrew Price <anprice> | ||||
Component: | cluster | Assignee: | Andrew Price <anprice> | ||||
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 6.2 | CC: | adas, agk, bmarzins, ccaulfie, cluster-maint, fdinitto, lhh, rpeterso, swhiteho, teigland | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | cluster-3.0.12.1-7.el6 | Doc Type: | Bug Fix | ||||
Doc Text: |
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.
|
Story Points: | --- | ||||
Clone Of: | 719943 | Environment: | |||||
Last Closed: | 2011-12-06 14:52:33 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: | |||||||
Bug Depends On: | 719943, 720935 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Andrew Price
2011-07-12 12:48:05 UTC
Created attachment 513757 [details]
Patch for RHEL6 (unchanged from upstream)
Upstream patch applies cleanly to the RHEL6 branch.
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.
Testing with the above patch: $ 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, 9.119e-06 s, 0.0 kB/s $ ./mkfs.gfs2 -t c:g sparse-file This will destroy any data on sparse-file. It appears to contain: data Are you sure you want to proceed? [y/n] y 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: "c:g" UUID: 41aecb85-6fab-2649-7018-9a9ea46907f4 $ fsck.gfs2 sparse-file Initializing fsck Validating Resource Group index. Level 1 rgrp check: Checking if all rgrp and rindex values are good. (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 Thanks, Steve. The patch is now in the RHEL6 branch of cluster.git so setting to POST. Verified against gfs2-utils-3.0.12.1-23.el6.x86_64 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 |