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.
Bug 1002032 - mke2fs can't return the correct filesystem type when blockscount is less than 2048 for ext3
Summary: mke2fs can't return the correct filesystem type when blockscount is less than...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-28 11:12 UTC by bfan
Modified: 2014-06-18 02:01 UTC (History)
2 users (show)

Fixed In Version: libguestfs-1.22.6-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:57:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description bfan 2013-08-28 11:12:45 UTC
Description of problem:
For creating ext3 filesystem, When "blockscount" option is less than 2048, mke2fs will create a ext2 filesystem
It looks like an ext3 filesystem issue, we can't know the details reason of ext3/mke2fs, So if we can do nothing in libguestfs, it would be better to add a note to the documentation


Version-Release number of selected component (if applicable):
libguestfs-1.22.6-4.el7.x86_64


How reproducible:
Always


Steps to Reproduce:
# guestfish -N fs mke2fs /dev/sda1 fstype:ext3 blockscount:2048 : list-filesystems
/dev/sda1: ext3
# guestfish -N fs mke2fs /dev/sda1 fstype:ext3 blockscount:2049 : list-filesystems
/dev/sda1: ext3
# guestfish -N fs mke2fs /dev/sda1 fstype:ext3 blockscount:2047 : list-filesystems
/dev/sda1: ext2


Actual results:
Output is ext2 when fstype:ext3 blockscount:2047


Expected results:
Output should be ext3 when fstype:ext3 blockscount:2047


Additional info:
Has same issue in rhel6, libguestfs-1.20.10-3.el6.x86_64

Comment 1 Richard W.M. Jones 2013-08-28 11:42:22 UTC
As discussed on IRC, the problem is that the filesystem
isn't large enough to contain a journal.  mke2fs prints
the warning message:

  Filesystem too small for a journal

This message is normally eaten by libguestfs, although
you can see it if you enable debugging.  The warning
doesn't stop mke2fs; it goes ahead and creates a filesystem
without a journal, a.k.a. ext2.

Anyway, we should document that this may happen.

BTW don't confuse "blockscount" (size of the filesystem
in blocks) with block size.

Comment 3 Richard W.M. Jones 2013-08-29 14:22:47 UTC
Fix also included in libguestfs-1.20.10-4.el6 (note
there is no separate bug for RHEL 6, I just included
the fix in the routine build).

Comment 5 bfan 2013-12-03 09:26:11 UTC
Verified with libguestfs-1.22.6-16.el7.x86_64

><fs> help mke2fs

DESCRIPTION
    "mke2fs" is used to create an ext2, ext3, or ext4 filesystem on
    "device".

    The optional "blockscount" is the size of the filesystem in blocks. If
    omitted it defaults to the size of "device". Note if the filesystem is
    too small to contain a journal, "mke2fs" will silently create an ext2
    filesystem instead.


Help out is update

Comment 6 Ludek Smid 2014-06-13 12:57:16 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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