Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 245615 - sys-fs/multipath-tools-0.4.8 - kpartx has a 1TB limit
Summary: sys-fs/multipath-tools-0.4.8 - kpartx has a 1TB limit
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-05 07:16 UTC by James Tay
Modified: 2009-10-30 06:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
modifications to multipath-tools-0.4.8/kpartx/devmapper.c (devmapper.c.diff,567 bytes, text/plain)
2008-11-05 07:18 UTC, James Tay
Details
modifications to multipath-tools-0.4.8/kpartx/devmapper.h.diff (devmapper.h.diff,649 bytes, text/plain)
2008-11-05 07:19 UTC, James Tay
Details
modifications to multipath-tools-0.4.8/kpartx/gpt.c (gpt.c.diff,1.52 KB, text/plain)
2008-11-05 07:22 UTC, James Tay
Details
modifications to multipath-tools-0.4.8/kpartx/kpartx.c (kpartx.c.diff,2.38 KB, text/plain)
2008-11-05 07:22 UTC, James Tay
Details
modifications to multipath-tools-0.4.8/kpartx/kpartx.h (kpartx.h.diff,363 bytes, text/plain)
2008-11-05 07:22 UTC, James Tay
Details
Patch that fixes 1-2 TB limit in kpartx (multipath-tools-0.4.8-r1-kpartx.patch,6.91 KB, patch)
2009-05-06 23:22 UTC, Nathan Bain
Details | Diff
Ebuild that uses the patch from my previous post (multipath-tools-0.4.8-r1.ebuild,2.22 KB, text/plain)
2009-05-06 23:23 UTC, Nathan Bain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Tay 2008-11-05 07:16:29 UTC
I'm using multipath-tools 0.4.7-r2. I have a 5TB disk with a single huge partition in its GPT. Everything works, but my 5TB partition appears as a 1TB partition in /proc/devices. I downloaded source from http://christophe.varoqui.free.fr/ and it appears that the number of sectors in a partition (64-bit number) is being saved into a 32-bit number. Thus the maximum partition size kpartx sees is 1TB. I've modified the source for kpartx, mainly changing "long" to "long long". After those changes my kpartx behaves properly. I've got diffs of the changes made if anybody is interested.
Comment 1 James Tay 2008-11-05 07:18:34 UTC
Created attachment 170776 [details]
modifications to multipath-tools-0.4.8/kpartx/devmapper.c
Comment 2 James Tay 2008-11-05 07:19:20 UTC
Created attachment 170777 [details]
modifications to multipath-tools-0.4.8/kpartx/devmapper.h.diff
Comment 3 James Tay 2008-11-05 07:22:02 UTC
Created attachment 170778 [details]
modifications to multipath-tools-0.4.8/kpartx/gpt.c
Comment 4 James Tay 2008-11-05 07:22:26 UTC
Created attachment 170779 [details]
modifications to multipath-tools-0.4.8/kpartx/kpartx.c
Comment 5 James Tay 2008-11-05 07:22:44 UTC
Created attachment 170780 [details]
modifications to multipath-tools-0.4.8/kpartx/kpartx.h
Comment 6 Serkan Kaba (RETIRED) gentoo-dev 2008-11-05 08:48:25 UTC
The fix seams to be in upstream git but there's no release after the fix.
Comment 7 Nathan Bain 2009-05-06 23:22:35 UTC
Created attachment 190553 [details, diff]
Patch that fixes 1-2 TB limit in kpartx

This patch was created from the commit to the multipath-tools git tree that fixes the issue, pushed by RedHat.  I've used it on my system and confirmed that it fixes the problem.  It's essentially the result of cat'ing all of James Tay's patches together, but done a slightly different way.
Comment 8 Nathan Bain 2009-05-06 23:23:47 UTC
Created attachment 190554 [details]
Ebuild that uses the patch from my previous post

This is an ebuild I used on my system that resolved the problem with the 1-2 TB limit in kpartx.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-10-30 06:50:30 UTC
In 0.4.8-r1 now. Upstream needs to stop slacking and cut a release.