Bug 454928 - kpartx doesn't work on large volumes
kpartx doesn't work on large volumes
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: device-mapper-multipath (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Ben Marzinski
Cluster QE
Depends On:
  Show dependency treegraph
Reported: 2008-07-10 16:11 EDT by Chris St. Pierre
Modified: 2010-01-11 21:43 EST (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-20 17:09:29 EST
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 Chris St. Pierre 2008-07-10 16:11:00 EDT
Description of problem:

kpartx errors out on files 2Gb or larger (on 32-bit) or 8Gb or larger (on 64-bit) 
with the cryptic error:

failed to stat() <filename>

Giving it the -v flag does not give any more output.

I have replicated this on Fedora 8 and 9 as well.

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


How reproducible:

Every time.

Steps to Reproduce:

1. Create a file 2Gb or larger on a 32-bit system, or 8Gb or larger on a 64-bit 
2. Run kpartx on it.
3. Fail!
Actual results:

Fails to stat:

# dd if=/dev/zero of=2g.img bs=1024M count=2
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB) copied, 45.3624 seconds, 47.3 MB/s
# kpartx -l 2g.img
failed to stat() 2g.img

Expected results:

It works with files just under 2Gb:

# dd if=/dev/zero of=almost2g.img bs=1000M count=2
2+0 records in
2+0 records out
2097152000 bytes (2.1 GB) copied, 45.1009 seconds, 46.5 MB/s
# kpartx -l almost2g.img

Additional info:

The results I pasted were from a 32-bit machine.  It works exactly the same with 
a 8Gb threshold on 64-bit machines.

This really sucks, since kpartx _would be_ a great tool for working with virtual 
machines, if it worked on large files.  But we use 10 Gb files for our VMs (which 
is even smaller than a lot of people), so we can't mount them on 32- or 64-bit 

If there's a workaround we can use in the mean time, I'd appreciate that, too.

This has been reported to CentOS as well, but without any activity: http://
Comment 1 RHEL Product and Program Management 2008-07-14 15:13:30 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 2 Ben Marzinski 2008-08-25 23:51:21 EDT
Fixed. Kpartx now uses the 64bit versions of the file access functions.
Comment 5 errata-xmlrpc 2009-01-20 17:09:29 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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