Bug 155950 - mkfs.vat on an LVM volume fails with a drive geometry error
mkfs.vat on an LVM volume fails with a drive geometry error
Product: Fedora
Classification: Fedora
Component: dosfstools (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Peter Vrabec
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2005-04-25 20:51 EDT by Ziga Mahkovec
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

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

Attachments (Terms of Use)
Patch that fixes the HDIO_GETGEO problem in mkdosfs (1.04 KB, patch)
2005-04-28 08:48 EDT, Ziga Mahkovec
no flags Details | Diff

  None (edit)
Description Ziga Mahkovec 2005-04-25 20:51:05 EDT
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):

How reproducible:

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

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 08:48:11 EDT
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 10:30:35 EDT
thx a lot.

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