Bug 109812

Summary: Disk druid changes already made partition numbers
Product: [Fedora] Fedora Reporter: Sameh Attia <sattia>
Component: partedAssignee: Matt Wilson <msw>
Status: CLOSED NOTABUG QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: byte
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-25 19:27:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Sameh Attia 2003-11-12 00:28:14 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)

Description of problem:
While I was fresh installing FC1; it alaramed me of a low swap
partition size (50MB) than the memory on the system (512MB)
I decided to make a swap of 512MB so I highlighted the old 50MB
partition (/dev/hda7) and hit delete.
After it was deleted I found that my Gentoo partition number
(/dev/hda8) has been changed (/dev/hda7)
This is a bug since this partition was already created and has a fully
running system of Gentoo. And I mount my partiotns using device
numbers rather than partiotn labels.

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

How reproducible:

Steps to Reproduce:
1. Follow steps above

Actual Results:  partition /dev/hda8 became /dev/hda7

Expected Results:  /dev/hda8 to remain as it is /dev/hda8

Additional info:

Comment 1 James Wilkinson 2003-11-15 11:43:59 UTC
It's worse than that.
What seems to be happenning is that Disk Druid is numbering partitions
according to the order they were created, not the order they
physically appear on the disk.
Some software (earlier versions of Partition Magic: I don't have later
ones to check) considers this a straight bug. Fedora fdisk prints a
warning message.
This could bite users later: any software that re-writes the partition
table is likely to renumber partitions into physical order, EVEN IF no
partitions were added or deleted. At that point, any software relying
on knowing physical partition numbers will have their partitions
renumbered under them. The poor user, meanwhile, certainly hasn't
touched his or her partitions, and won't understand why a partition
seems to have "gone" (when it's actually just "moved").
In my case, I deleted and recreated my /var and /usr, and they were
recreated as hda10 and hda11, moving a FAT32 partition from hda11 to
hda9. Fortunately, this doesn't worry Windows, but only because there
isn't an OS on that drive.

In this case, the FAT32 partition will end up being moved back to
hda11 at some point: the number changes twice, when it needn't and
shouldn't move at all.

Comment 2 James Wilkinson 2003-11-15 11:51:05 UTC
This e-mail from Linus is about USB device numbering, but it's the
best exposition of which I know of the principle that numbering should
not be based on history:


Comment 3 Jeremy Katz 2004-06-25 19:27:21 UTC
Logical partitions inside an extended partition don't have an included
number within them and just change based on the order they're written
in the extended partition table (which has no guarantees on ascending
vs otherwise).