From ue@nathan.ruhr.de  Tue Jul 11 02:52:28 2000
Return-Path: <ue@nathan.ruhr.de>
Received: from mail.ruhr.de (in-ruhr2.ruhr.de [141.39.224.60])
	by hub.freebsd.org (Postfix) with SMTP id 9E60437BBDC
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Jul 2000 02:52:26 -0700 (PDT)
	(envelope-from ue@nathan.ruhr.de)
Received: (qmail 32737 invoked by alias); 11 Jul 2000 09:52:46 -0000
Received: (from ue@localhost)
	by nathan.ruhr.de (8.9.3/8.9.3) id LAA16572;
	Tue, 11 Jul 2000 11:49:59 +0200 (CEST)
	(envelope-from ue)
Message-Id: <200007110949.LAA16572@nathan.ruhr.de>
Date: Tue, 11 Jul 2000 11:49:59 +0200 (CEST)
From: Udo Erdelhoff <ue@nathan.ruhr.de>
Reply-To: ue@nathan.ruhr.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: MAKEDEV still defaults to da0X instead of da0s1X
X-Send-Pr-Version: 3.2

>Number:         19849
>Category:       conf
>Synopsis:       MAKEDEV still defaults to da0X instead of da0s1X
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    des
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 11 03:00:02 PDT 2000
>Closed-Date:    Thu Dec 6 01:09:38 PST 2001
>Last-Modified:  Thu Dec 06 01:09:38 PST 2001
>Originator:     Udo Erdelhoff
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:

src/etc/MAKEDEV versions 1.260 (HEAD), 1.243.2.7 (RELENG_4)

>Description:

"Dangerously dedicated" disks have been deprecated for a long time. As a
result, most installations of FreeBSD 4.X (or -current, for that matter)
will use slices. Sysinstall automatically creates the necessary devices
(e.g. /dev/da0s1[a-h]) for the user.

On the other hand, MAKEDEV {da0,std,all,fixit) will only create da0[a-h]
and da0s[1-4]. This can cause problems if the user is forced to swap (or
remove) disks. The missing devices on the fixit floppy are especially
annoying.

The problem also exists for ad and other disk devices.

MAKEDEV should create the neccessary devices for filesystem on the first
slice of the disk in addition to the devices for the filesystems on a
"dangerously dedicated" disk.

>How-To-Repeat:

as root:
cd /dev
sh MAKEDEV da100
ls da100*

>Fix:

Suggested patch for src/etc/MAKEDEV 1.260 (creates da0s1[a-h] and da0[a-h]):

--- MAKEDEV     2000/06/26 15:42:48     1.260
+++ MAKEDEV     2000/07/07 20:44:56
@@ -575,7 +575,7 @@
        esac
        case $unit in
        [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
-               for slicepartname in s0h s1 s2 s3 s4
+               for slicepartname in s0h s1h s2 s3 s4
                do
                        sh MAKEDEV $name$unit$slicepartname
                done



>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: Udo Erdelhoff <ue@nathan.ruhr.de>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/19849: MAKEDEV still defaults to da0X instead of da0s1X
Date: Wed, 12 Jul 2000 02:55:10 +1000 (EST)

 On Tue, 11 Jul 2000, Udo Erdelhoff wrote:
 
 > >Description:
 > 
 > "Dangerously dedicated" disks have been deprecated for a long time. As a
 > result, most installations of FreeBSD 4.X (or -current, for that matter)
 > will use slices. Sysinstall automatically creates the necessary devices
 > (e.g. /dev/da0s1[a-h]) for the user.
 
 /dev/da0X is not for "dangerously dedicated" disks.  It is for the first
 BSD slice.  This gives a canonical way to find all BSD partitions on most
 systems (ones with at most one BSD slice per disk).  Unfortunately, someone
 attempted to deprecate using the traditional BSD partition names because of
 transient bugs in the boot loader interface.
 
 > MAKEDEV should create the neccessary devices for filesystem on the first
 > slice of the disk in addition to the devices for the filesystems on a
 > "dangerously dedicated" disk.
 
 No, there is nothing special about the first slice.  The first slice is
 unlikely to be the BSD slice except on "undangerously dedicated" disks.
 
 Perhaps partitions for all slices should be created.  This costs 64
 directory entries and inodes per drives (16 for each slice).  Some of the
 wastage could be recovered by not creating entries for so many drives by
 default.
 
 Bruce
 
 

From: Udo Erdelhoff <ue@nathan.ruhr.de>
To: Bruce Evans <bde@zeta.org.au>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/19849: MAKEDEV still defaults to da0X instead of da0s1X
Date: Thu, 13 Jul 2000 17:12:39 +0200

 Hi Bruce,
 > /dev/da0X is not for "dangerously dedicated" disks.  It is for the first
 > BSD slice.
 
 this fact should be documented somewhere. I've been using FreeBSD since
 2.something and I didn't know that. A user on one of the german FreeBSD
 mailing lits was bitten by the missing inodes and none of the regulars
 (including at least one core member) had that piece of information.
 
 > Perhaps partitions for all slices should be created.  This costs 64
 > directory entries and inodes per drives (16 for each slice).  Some of the
 > wastage could be recovered by not creating entries for so many drives by
 > default.
 
 Make that 64 directory entries and 32 inodes. The current version of
 MAKEDEV creates /dev/r<part> as a hard link to /dev/<part>. I don't mind
 the wastage on my rootfs (I've used the default values for newfs when I
 installed the current incarnation of my machine and have lots of spare
 inodes) and the fixit floppy is limited to da0.
 
 The basic problem remains: sysinstall's warning about using "dangerously
 dedicated partitions" steers the users toward slice-based setups.
 sysinstall creates (or causes the creation of) the neccessary device nodes
 for the current setup. This works as long as the drive numbering remains
 unchanged. If you're forced to remove a disk or if you have to swap disks
 around, the system won't boot.
 
 This is a major PITA for both new users and oldtimers and should be
 changed. The increased inode consumption on a normal rootfs is a small
 price for that. If it isn't possible to create all those devices on
 the fixit floppy, the information about /dev/da0x being a shortcut to
 the FreeBSD paritions on the first FreeBSD slice of the disk should
 be displayed alongside the current "link /etc/passwd..." message.
 
 /s/Udo
 -- 
 "The only reasonable alternative we can come up with is to close off the
 Internet to America Online users until they have passed an entrance test.
 But that would break federal laws that prohibit discrimination against
 the intellectually challenged." - hhahn@boardwatch.com
 
Responsible-Changed-From-To: freebsd-bugs->des 
Responsible-Changed-By: des 
Responsible-Changed-When: Mon Dec 3 16:36:30 PST 2001 
Responsible-Changed-Why:  
I'll take this. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=19849 
State-Changed-From-To: open->feedback 
State-Changed-By: des 
State-Changed-When: Mon Dec 3 16:48:44 PST 2001 
State-Changed-Why:  
Fixed in -CURRENT, awaiting MFC. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=19849 
State-Changed-From-To: feedback->closed 
State-Changed-By: des 
State-Changed-When: Thu Dec 6 01:09:38 PST 2001 
State-Changed-Why:  
MFCed, thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=19849 
>Unformatted:
