Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Feb 2005 13:18:54 -0600
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Charles Erik McDonald <charles-erik@mcdonald.no>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Strange disk problems make the system lock up
Message-ID:  <790a9fff05021711184a5e3e9e@mail.gmail.com>
In-Reply-To: <790a9fff0502170754793aedd4@mail.gmail.com>
References:  <42134454.7030306@mcdonald.no> <790a9fff05021607456ec0406d@mail.gmail.com> <20050216175920.4f60007c.gstewart@bonivet.net> <4213B3FD.6060400@mcdonald.no> <790a9fff0502170754793aedd4@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 17 Feb 2005 09:54:01 -0600, Scot Hetzel <swhetzel@gmail.com> wrote:
> On Wed, 16 Feb 2005 21:58:37 +0100, Charles Erik McDonald
> > So, for example:
> >
> > bastion(root):/usr/src#disklabel /dev/ad2
> > disklabel: /dev/ad2: no valid label found
> > bastion(root):/usr/src#disklabel /dev/ad2s1
> > # /dev/ad2s1:
> > 8 partitions:
> > #        size   offset    fstype   [fsize bsize bps/cpg]
> >  c: 312576642        0    unused        0     0         # "raw" part,
> > don't edit
> > bastion(root):/usr/src#disklabel /dev/ad3
> > disklabel: /dev/ad3: no valid label found
> > bastion(root):/usr/src#disklabel /dev/ad3s1
> > # /dev/ad3s1:
> > 8 partitions:
> > #        size   offset    fstype   [fsize bsize bps/cpg]
> >  c: 488392002        0    unused        0     0         # "raw" part,
> > don't edit
> > bastion(root):/usr/src#
> >
> you don't have any partitions on those disks.
> 
> You need to use disklabel to create an "a" partition.
> 
> a: 488392002        0    BSD        0     0         #
> c: 488392002        0    unused        0     0         # "raw" part
> 
To add more to my response:

In FreeBSD, the disk is broken down into slices and partitions.  A
slice is equivalent to a DOS partition, but can be broken down into 8
partitions (a-h).
The "c" partition is reserved because it is used to define the entire disk.

What you need to do the following to setup /dev/ad3s1:

1. use "disklabel -e /dev/ad3s1" to add a partition (pick one
a,b,d-h).  If you want to use the entire slice for the partition, just
copy the "c" partition numbers as:

8 partitions:
#           size     offset    fstype   [fsize bsize bps/cpg]
a: 488392002        0    4.2BSD        1024  8192    16
c: 488392002        0    unused        0     0         # "raw" part

   NOTE: for "vinium" filesystems, you need an offset of 16
8 partitions:
#           size     offset    fstype   [fsize bsize bps/cpg]
c: 488392002        0    unused        0     0         # "raw" part
d: 488392002       16    vinium        1024  8192    16


2. use newfs on /dev/ad3s1a to put a filesystem on it.

   newfs /dev/ad3s1a

And that should get you a working partition on your system.

See the man pages on disklabel and newfs for more information.

Scot



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff05021711184a5e3e9e>