Bug 104073
Summary: | Crash when partitioning > 1TB disk | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Curtis Regentin <cregentin> |
Component: | anaconda | Assignee: | Jeremy Katz <katzj> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike McLean <mikem> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 9 | CC: | linux_issues, ppokorny |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-10-05 03:26:19 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Curtis Regentin
2003-09-09 16:52:45 UTC
If you try to manually partition this device with parted does it fail similarly? The version of parted that gets installed does not fail. If I recompile a new version, it does fail - with the same message about not being able to reread the partition table. Looks like the bug is in the kernel; patch below. I also submitted to the lkml. Error message as follows: ----------------------------------------------------------------- bash# ./parted /dev/sdb mkpart primary ext2 0 1710000 Warning: Unable to align partition properly. This probably means that another partitioning tool generated an incorrect partition table, because it didn't have the correct BIOS geometry. It is safe to ignore,but ignoring may cause (fixable) problems with some boot loaders. Ignore/Cancel? ------------------------------------------------------------------ Parted also fails the show the partition properly (though it seems to work fine), as follows: ------------------------------------------------------------------ bash# parted /dev/sdb print Disk geometry for /dev/sdb: 0.000-1717021.687 megabytes Disk label type: msdos Minor Start End Type Filesystem Flags 1 0.031 -387155.121 primary ext2 ------------------------------------------------------------------- ------------- SNIP FOR PATCH ---------------------- --- linux-2.4.22.old/drivers/block/blkpg.c 2003-09-18 11:48:04.000000000 -0700 +++ linux-2.4.22/drivers/block/blkpg.c 2003-09-18 12:19:25.000000000 -0700 @@ -63,21 +63,20 @@ * or has the same number as an existing one * 0: all OK. */ + int add_partition(kdev_t dev, struct blkpg_partition *p) { struct gendisk *g; - long long ppstart, pplength; - long pstart, plength; + unsigned long long pstart, plength; int i, drive, first_minor, end_minor, minor; + unsigned long maxblock = 0xffffffffUL; /* convert bytes to sectors, check for fit in a hd_struct */ - ppstart = (p->start >> 9); - pplength = (p->length >> 9); - pstart = ppstart; - plength = pplength; - if (pstart != ppstart || plength != pplength - || pstart < 0 || plength < 0) + pstart = (p->start >> 9); + plength = (p->length >> 9); + if (pstart > maxblock || plength > maxblock || (pstart+plength) > maxblock) return -EINVAL; + /* find the drive major */ g = get_gendisk(dev); if (!g) Ok, I put in a wrong error message for the failure under my static compiled version of parted. Here's the real one: ... (parted) mkpart Partition type? primary/extended? pri File system type? [ext2]? ext2 Start? 0 End? 1710000 Error: Error informing the kernel about modifications to partition /dev/sdb1 - Invalid argument. This means Linux won't know about any changes you made to /dev/sdb1 until you reboot - so you shouldn't mount it or use it in any way before rebooting. Ignore/Cancel? This is fixed with the 2.6 kernel in current releases. Is this fixed in any of older 2.4.x kernels? I got the same error with 2.4.23, when I was trying to create a RAID 5 array with 5 300gig disks.. ********************************************************************** Unhandled exception: Traceback (most recent call last): File "/usr/lib/anaconda", line 739, in ? intf.run(id, dispatch, configFileData) File "/usr/lib/anaconda/text.py", line 459, in run dispatch.gotoNext() File "/usr/lib/anaconda/dispatch.py", line 157, in gotoNext self.moveStep() File "/usr/lib/anaconda/dispatch.py", line 225, in moveStep rc = apply(func, self.bindArgs(args)) File "/usr/lib/anaconda/packages.py", line 462, in turnOnFilesystems diskset.savePartitions() File "/usr/lib/anaconda/partedUtils.py", line 595 in savePartitions disk.commit () error:Error: Error informing the kernel about the modifications to partition /dev/sda3 - invalid argument. This means Linux won't know about any changes you made to /dev/sda3 until you reboot - so you shouldn't mount it or use it in any way before rebooting. ********************************************************************** Thanks. |