I would like to add a 2.1GB drives to my NetBSD systems.
How can I format and partition the drive under NetBSD?
I am working with version 1.3.2. on a DEC 5000/200 and
DEC 5000/240 systems.
As usual, I will summarize.
Thank you.
Marcel
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Marcel O. Chukwunenye
Lead Engineer/SW, Unix System Administrator (407)-729-5430
**********************************************************
Email: mchu...@harris.com
> Hi Folks,
>
> I would like to add a 2.1GB drives to my NetBSD systems.
>
> How can I format and partition the drive under NetBSD?
>
> I am working with version 1.3.2. on a DEC 5000/200 and
> DEC 5000/240 systems.
If you just want to use the entire drive as one large partition, just
newfs the whole drive:
newfs /dev/rrzXc
which X is the SCSI id of the new disk. Note that you make have to make
the device entries in /dev for the disk. If you, type:
cd /dev
./MAKEDEV rzX
again, where X is the SCSI id of the disk.
Anything more fancy will involve playing around with the disklabel
command. There are some examples of how to use the command in the man
page.
Simon.
Are there any future plans for this?
Marcel
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Marcel O. Chukwunenye
Lead Engineer/SW, Unix System Administrator (407)-729-5430
**********************************************************
Email: mchu...@harris.com
>From port-pmax-owner-mchukwun=harri...@NetBSD.ORG Thu Jun 25 19:22:05 1998
>Return-Path: <port-pmax-owner-mchukwun=harri...@NetBSD.ORG>
>From: Simon Burge <sim...@telstra.com.au>
>To: m...@mlb.semi.harris.com (Marcel Chukwunenye)
>Cc: port...@NetBSD.ORG
>Subject: Re: Adding Disk Drives to NetBSD
>Date: Fri, 26 Jun 1998 09:16:23 +1000
>Delivered-To: port...@NetBSD.ORG
> Shocks! I cannot believe that there is no utility to format
> and partition a drive.
>
> Are there any future plans for this?
>
> Marcel
Hmm, seems to me Simon just did.
partition utility = disklabel
format utility = newfs
What else do you need?
:-)
Bill
--
Bill Harris
Internet America (Systems)
> Shocks! I cannot believe that there is no utility to format
> and partition a drive.
There is: the "utility" to "format" a hard drive is called "newfs" and
the "utility" to partition it is called "disklabel." :-)
Or do you need something more hand-holding?
> Are there any future plans for this?
I don't see the reason for it, personally. Actually, having been
brought up on disklabel and newfs, I found the graphical disk tool in
Digital Unix rather bothersome and long-winded to use (especially when
trying to align partitions on cylinder boundaries). I prefer the more
direct method of "disklabel -e"... :-)
The only hassle I've had disklabelling under NetBSD/pmax is the "open
partition would move or shrink" problem when normalising the total
number of sectors on the drive, but that is easily solved by writing the
label to rrzXa instead of rrzXc.
Cheers,
Paul.
e-mail: pa...@gromit.dlib.vt.edu
"I didn't mean to take up all your sweet time"
--- James Marshall Hendrix
> This does seem to be a remaining area where NetBSD/pmax is inferior to Ultrix,
> which did not require disktab entries after 4.2, (1991?), IIRC. It would be
> nice to have an equivalent utility to rzdisk or scu, at least for formatting.
> Has there been any work in these areas?
>
The 4.5 distribution I have still requires a valid disktab entry for the disk
before you can write a label to it with chpt.
----------
> From: Marcel Chukwunenye <m...@mlb.semi.harris.com>
> To: sim...@telstra.com.au
> Cc: port...@NetBSD.ORG
> Subject: Re: Adding Disk Drives to NetBSD
> Date: Friday, June 26, 1998 8:58 AM
>
> Shocks! I cannot believe that there is no utility to format
> and partition a drive.
Probably not a utility, but i always "abuse" the sysinst to do it for me. I
simply try to install to a new disk, answer all questions, and abort the
sysinst after the filesystems are created ;-))
cheers,
emanuel
> Shocks! I cannot believe that there is no utility to format
> and partition a drive.
>
> Are there any future plans for this?
This does seem to be a remaining area where NetBSD/pmax is inferior to Ultrix,
which did not require disktab entries after 4.2, (1991?), IIRC. It would be
nice to have an equivalent utility to rzdisk or scu, at least for formatting.
Has there been any work in these areas?
--
Philip J. Tait.....AlliedSignal Engines, Phoenix, Az.....+1.602.231.7104
p...@phxase.allied.com
On Fri, 26 Jun 1998, Bill Harris wrote:
> Philip Tait wrote:
>
> > This does seem to be a remaining area where NetBSD/pmax is inferior to Ultrix,
> > which did not require disktab entries after 4.2, (1991?), IIRC. It would be
> > nice to have an equivalent utility to rzdisk or scu, at least for formatting.
> > Has there been any work in these areas?
> >
>
> The 4.5 distribution I have still requires a valid disktab entry for the disk
> before you can write a label to it with chpt.
>
I'm not so sure. I was able to install 4.5 to a 699 MB - non 'DEC
standard' - size Quantum drive on my 3100 (now it is runing under NetBSD).
It's geometry wasn't on the disktab. I think, you should be able to write
a right disklabel from scratch using the kernel reported geometry.
As I remember chpt can write disklabel from a protofile.
Zoltan Zsido
I am from the Sun environment and have HP, SGI and a little exposure
to DEC. Each of these OS provides some utility for adding disks to a
system. I am sure this is no news to you.
Format under sunOS and Solaris provides an interface thus:
voyager(/)SU# format sd7
Searching for disks...done
selecting sd7: <SUN1.3G>
[disk formatted, defect list found]
Warning: Current Disk has mounted partitions.
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
show - translate a disk address
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
quit
format> .
This is the sort of utility I was refering to. Can I repair a
defective sector or manage the defect list using "disklabel"?
I found out that my company is scraping all our DEC 5000/200,
5000/240, and 5000/260; so some of us (Admins) want to take
these system home or keep it in the office as sidekicks.
This is why I am messing with NetBSD at this time. So, I am
a NEWBIE to "disklabel" and "newfs" as the utility to partition
a 2.1GB into 3 separate partitions.
I think easy to use utilities like Sun's "format" and DEC's "chpt"
will help this OS.
> This does seem to be a remaining area where NetBSD/pmax is inferior to Ultrix,
> which did not require disktab entries after 4.2, (1991?), IIRC. It would be
> nice to have an equivalent utility to rzdisk or scu, at least for formatting.
> Has there been any work in these areas?
Oh yes, a low level utility would be very nice. Even over in the sun3
camp they are quite lacking on those... still the biggest reason to keep
the old commercial OS around.
--
Dan Kosack
kos...@wam.umd.edu
No. It supports only the partition and label item from SUN's format
menu. It is same as fmthard plus prtvtoc on Solaris.
> This is the sort of utility I was refering to. Can I repair a
> defective sector or manage the defect list using "disklabel"?
>
> I found out that my company is scraping all our DEC 5000/200,
> 5000/240, and 5000/260; so some of us (Admins) want to take
> these system home or keep it in the office as sidekicks.
> This is why I am messing with NetBSD at this time. So, I am
> a NEWBIE to "disklabel" and "newfs" as the utility to partition
> a 2.1GB into 3 separate partitions.
>
> I think easy to use utilities like Sun's "format" and DEC's "chpt"
> will help this OS.
As far as I remember Ultrix's chpt is equivalent to DEC OSF/1 's
disklabel, which is similar to NetBSD's disklabel.
If You want to "format" a disk under NetBSD, and it is not Your boot
device, put the device to the SCSI bus, reboot Your machine, and write the
kernel message where it describes the geometry of the new disk. Create the
appropriate device file with MAKEDEV (eg rzX, where X is the id of the
device on the SCSI bus. If You have more than 1 SCSI bus, X is equal to
the SCSI ID + 8*bus id.). Create a pseudo disklabel with disklabel -r
rzYc > /tmp/newdisklabel where Y is an already labelled disk. Change the
geometry parameters wich was reported by kernel, and create the desired
slices.
Sorry,the example is from DEC's OSF/1, but the NetBSD is similar:
# /dev/rrz0a:
type: SCSI
disk: RZ29B
label:
flags:
bytes/sector: 512
sectors/track: 113 ---> Edit
tracks/cylinder: 20 ---> Edit
sectors/cylinder: 2260 ---> Edit
cylinders: 3708 ---> Edit
sectors/unit: 8380080 ---> Edit
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize cpg]
a: 262144 0 ADVfs # (Cyl. 0 -115*)
b: 2150400 262144 unused 1024 8192 # (Cyl. 115*-1067*)
c: 8380080 0 unused 1024 8192 # (Cyl. 0 -3707)
d: 0 0 unused 1024 8192 # (Cyl. 0 - -1)
e: 0 0 unused 1024 8192 # (Cyl. 0 - -1)
f: 0 0 unused 1024 8192 # (Cyl. 0 - -1)
g: 4056000 2412544 ADVfs # (Cyl. 1067*-2862*)
h: 1911536 6468544 ADVfs # (Cyl. 2862*-3707*)
(Don't care the the "(Cyl....) after the # sign. Those are comments only.)
Write the new disklabel to the target disk with disklabel -R rrzXc
/tmp/newdisklabel. If it was corret, You can newfs the desired
partition as on Solaris. (NetBSD uses letters instead of numbers to refer
to the slices, so /dev/dsk/c0t3d0s2 is equivalent to /dev/rz0c )
That's all.
Zoltan Zsido
>> Shocks! I cannot believe that there is no utility to format
>> and partition a drive.
>>
>> Are there any future plans for this?
>This does seem to be a remaining area where NetBSD/pmax is inferior to Ultrix,
>which did not require disktab entries after 4.2, (1991?), IIRC. It would be
>nice to have an equivalent utility to rzdisk or scu, at least for formatting.
>Has there been any work in these areas?
> Shocks! I cannot believe that there is no utility to format
> and partition a drive.
>
> Are there any future plans for this?
I don't know about about lowlevel SCSI format.
But for labelling (partitioning) disks: you don't need a disktab
entry: disklabel -e works pretty nicely if you want a no-holds-barred
approach. If hte disk is unlabelled, the kernel will fake up a label
that gets teh geometry and total sectors from the drive, and lets you
edit the partition info.
If you want a menu-driven interface that does most of the work for
you, then you can use sysinst. It gets the geometry info from the
kernel the same way that sysinst does, and it's much more forgiving
than disklabel -e.
The UI isnt packaged very nicely for use on an already-installed
system -- you have to say you want to do an install and point it at
the newly-installed disk, and then quit after writing the label -- but
it does work.
Somebody please send a PR asking to make sysinst's disk-partition
functionality available for newly-installed disks. It should happen
for 1.4.
> Somebody please send a PR asking to make sysinst's disk-partition
> functionality available for newly-installed disks. It should happen
> for 1.4.
Done.
> The only hassle I've had disklabelling under NetBSD/pmax is the "open
> partition would move or shrink" problem when normalising the total
> number of sectors on the drive, but that is easily solved by writing the
> label to rrzXa instead of rrzXc.
I think the infamous "open partition would move or shrink" disklabeling
woe was fixed in 1.3. (Digital UNIX seems to have the same bug. I saw
the message once with it)
Tohru Nishimura
Nara Institute of Science and Technology
> As far as I remember Ultrix's chpt is equivalent to DEC OSF/1 's
> disklabel, which is similar to NetBSD's disklabel.
OSF/1 (Digital UNIX) uses "Tahoe disklabel", which is the standard
label scheme since 4.3BSD Tahoe release, and is compatilble with
NetBSD.
Until then, there was no standard way to hold partition information in
diskpacks. In fact each disklabel information was built into disk
driver source codes. Growing number of source-code-less commercial
UNIX distribution, many vendors started inventing their own
implementations of "disklabel structure" in the boot sectors. The
introduction of Tahoe disklabel was just too late. Ding...
[ ... SunOS format(8) does very low level SCSI things and filesystem
partitioning as a single utility ... ]
> This is the sort of utility I was refering to. Can I repair a
> defective sector or manage the defect list using "disklabel"?
The answer is no. And there is no field need to do that as far as
modern SCSI disk drives concern. It's somehow amusing to know that
the "format" utility (still) allows users to handle defect list
management manually. The last time when I used SunOS "format" utility
the machine was Sun3/60 with Emulex MD21 and TOSHIBA MK156 disks, such
combination of hardwares required to maintain defect lists. There is
no need to worry of defect list or surface analysis for (real) SCSI
hard disk drives.
I have read strong cautions telling end users should not perform low
level SCSI format operations because drives are factor-calibrated and
such operations would result in reliability distortions. Manufactures
tend to educate field engineers NOT to repair newly-defected SCSI hard
disks, rather, just to replace them with good ones.
> On Fri, 26 Jun 1998, Marcel Chukwunenye wrote:
>
> > Shocks! I cannot believe that there is no utility to format
> > and partition a drive.
>
> There is: the "utility" to "format" a hard drive is called "newfs" and
> the "utility" to partition it is called "disklabel." :-)
Smileys aside, could people please try to remember the difference between
"formatting" and "initializing a file system".
And yes, the "FORMAT" command on a PC can do both, but normally only do
the latter. (I guess the confusion on the PC is to blame for this
misconception about "format".).
Johnny
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@update.uu.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
> On Fri, 26 Jun 1998, Paul Mather wrote:
>
> > On Fri, 26 Jun 1998, Marcel Chukwunenye wrote:
> >
> > > Shocks! I cannot believe that there is no utility to format
> > > and partition a drive.
> >
> > There is: the "utility" to "format" a hard drive is called "newfs" and
> > the "utility" to partition it is called "disklabel." :-)
>
> Smileys aside, could people please try to remember the difference between
> "formatting" and "initializing a file system".
I guess that's why I put "format" in quotes, but not partition. We're
not all as clueless as we seem. ;-)