Bug 690819 - mkfs fails creating a filesytem on a disk device when using a disk with 'ide' interface
Summary: mkfs fails creating a filesytem on a disk device when using a disk with 'ide'...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-25 14:12 UTC by Marek Goldmann
Modified: 2011-03-25 14:43 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-03-25 14:35:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Marek Goldmann 2011-03-25 14:12:35 UTC
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):

libguestfs-1.8.2-1.fc14.x86_64

><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

[SNIP]

><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)
><fs>

Comment 1 Richard W.M. Jones 2011-03-25 14:15:13 UTC
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 14:43:07 UTC
This one is also needed for RHEL 5:
http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=a0e3b2183733c7440ad017c4ffe361935672339b


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