Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 155950 - mkfs.vat on an LVM volume fails with a drive geometry error
Summary: mkfs.vat on an LVM volume fails with a drive geometry error
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dosfstools
Version: rawhide
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-04-26 00:51 UTC by Ziga Mahkovec
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-28 14:30:35 UTC


Attachments (Terms of Use)
Patch that fixes the HDIO_GETGEO problem in mkdosfs (deleted)
2005-04-28 12:48 UTC, Ziga Mahkovec
no flags Details | Diff

Description Ziga Mahkovec 2005-04-26 00:51:05 UTC
Description of problem:
When running some file system tests, I noticed that I cannot create a vfat file
system over LVM.  It fails with an "unable to get drive geometry" error.

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

How reproducible:
always

Steps to Reproduce:
This is easy to reproduce using loopback devices (but note that it also fails
for block devices):

# dd if=/dev/zero of=/tmp/img.file bs=1M count=128
# losetup /dev/loop0 /tmp/img.file
# pvcreate /dev/loop0
  Physical volume "/dev/loop0" successfully created
# vgcreate testvg /dev/loop0
  Volume group "testvg" successfully created
# lvcreate -L 100M -n testlv testvg
  Logical volume "testlv" created
# mkfs.vfat /dev/testvg/testlv
mkfs.vfat 2.10 (22 Sep 2003)
mkfs.vfat: unable to get drive geometry for '/dev/testvg/testlv'

Actual results:
The above "unable to get drive geometry" error is shown and no file system is
created.

Expected results:
The file system should be created.

Additional info:
I don't expect this to be a common usage scenario, so I'm setting the severity
to low.

Comment 1 Ziga Mahkovec 2005-04-28 12:48:11 UTC
Created attachment 113770 [details]
Patch that fixes the HDIO_GETGEO problem in mkdosfs

The problem here is that mkdosfs calls the HDIO_GETGEO ioctl, which fails on an
LVM device (ENOTTY - Inappropriate ioctl for device).  Upstream dosfstools-2.11
fixes this by using some default geometry values instead.  I'm attaching a
similar patch for 2.10.

Comment 2 Peter Vrabec 2005-04-28 14:30:35 UTC
thx a lot.


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