NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/43430: disklabel -i should not create overlapping partions (except unused)

>Number:         43430
>Category:       bin
>Synopsis:       disklabel -i should not create overlapping partions (except 
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 07 16:55:00 +0000 2010
>Originator:     Rainer Glaschick
>Release:        NetBSD 5.1_RC2
NetBSD kerneu 5.1_RC2 NetBSD 5.1_RC2 (GENERIC) #0: Fri May 21 04:32:33 UTC 2010

disklabel -i allows the user to define overlapping partitions. 

In particular, the indication of "'$' for all remaining" is misleading; it 
should at least read "'$' for end of disk", making clear that not the remaining 
space until the next used partition is meant. The man page is silent about this 
"feature", which is very dangerous.

Moreover, although new with NetBSD, I doubt that there are many cases where 
overlapping partitions in a disklabel are useful, except unused partitions like 
c and d. So I would prefer - in the interactive mode at least - that, before 
writing a disklabel, it should be checked for consistency, and acknowledge 
required for write if there are overlaps. 

Note that checking the consistency manually requires additions, as the display 
is in start/length notation, not in start/end notation. See also PR#5277

I marked the severity 'serious', because I think that it should not be so easy 
to create disklabels that lead to corrupted file systems.
Just enter $ for the size of a partition if there is another one behind.

Or make partition 'a' of 500MB size, and let partition 'b' start at 200MB

Check partitions with a pocket calculator before writing. 

Home | Main Index | Thread Index | Old Index