Bug 690819 - mkfs fails creating a filesytem on a disk device when using a disk with 'ide' interface
mkfs fails creating a filesytem on a disk device when using a disk with 'ide'...
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
Depends On:
  Show dependency treegraph
Reported: 2011-03-25 10:12 EDT by Marek Goldmann
Modified: 2011-03-25 10:43 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-03-25 10:35:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marek Goldmann 2011-03-25 10:12:35 EDT
Description of problem:

See summary. The issue doesn't exists when using a virtio interface for disk.

Version-Release number of selected component (if applicable):


><fs> add-drive-with-if build/appliances/i686/centos/5/jeos-centos/ec2-plugin/tmp/jeos-centos.ec2 ide
add_drive_with_if "build/appliances/i686/centos/5/jeos-centos/ec2-plugin/tmp/jeos-centos.ec2" "ide" = 0
><fs> launch 
launch[00000ms] febootstrap-supermin-helper --verbose -f checksum '/usr/lib64/guestfs/supermin.d' x86_64


><fs> mkfs 'ext3' /dev/sda
mkfs "ext3" "/dev/sda"send_to_daemon: 0x18b2480 g->state = 3, n = 64
proc 138 (readdir) took 0.00 seconds
recv_from_daemon: 0x18b2480 g->state = 3, size_rtn = 0x7fff53d1b13c, buf_rtn = 0x7fff53d1b130
mkfs -t ext3 /dev/sda
mke2fs 1.41.12 (17-May-2010)
guestfsd: error: ext3: /dev/sda: mke2fs 1.41.12 (17-May-2010)
 = -1 (error)
libguestfs: error: mkfs: ext3: /dev/sda: mke2fs 1.41.12 (17-May-2010)
Comment 1 Richard W.M. Jones 2011-03-25 10:15:13 EDT
In fact mkfs.ext3 asks a question when asked to create
a filesystem on /dev/sda (not on /dev/vda though!)

/dev/sda is entire device, not just one partition!
Proceed anyway? (y,n) 

The way forward is to special-case this by running
mke2fs (not mkfs) with the -F option.
Comment 3 Richard W.M. Jones 2011-03-25 10:43:07 EDT
This one is also needed for RHEL 5:

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