Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2006 10:55:30 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Peter <petermatulis@yahoo.ca>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: getting started with USB hard drive
Message-ID:  <20060222085530.GA1513@flame.pc>
In-Reply-To: <20060221192846.71648.qmail@web60015.mail.yahoo.com>
References:  <20060221174550.GA54062@flame.pc> <20060221192846.71648.qmail@web60015.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-02-21 14:28, Peter <petermatulis@yahoo.ca> wrote:
> Thanks for your links.  I have a hell of a time setting up
> disks.  This is what I did:
>
> # fdisk -BI da0 (using just -I failed)
> # bsdlabel -w da0
>
> Then I get stuck.
>
> # bsdlabel da0s1 (fails)

That's ok.  You used:

    # bsdlabel /dev/da0

This installs a "BSD label" starting at the boot record of the
disk, not in a BIOS-like partition.

You can then use BSD partitions named:

    /dev/da0a
    /dev/da0b
    ...

If you really want to use a single BIOS slice (what DOS calls a
"partition"), that contains one or more BSD partitions defined by
a label, then you should install the BSD label on `da0s1' instead
of `da0':

    # dd if=/dev/zero of=/dev/da0 bs=1024 count=64
    # fdisk -B -I /dev/da0
    # bsdlabel -w -B /dev/da0s1

Note the device name passed to bsdlabel.  It's not da0, but da0s1.

> Now I wonder why this disk which is supposed to be 200 GB, was
> detected by FreeBSD (when connected) as 190 GB, shows up as 186
> GB inside sysinstall, and has a size of 180 GB when seen by df.

A certain amount of slack space is occupied by partition and
filesystem metadataand/or reserved for the superuser.  You can't
really do much to avoid wasting some space for a partition table,
but that's pretty minimal.  What you *can* and should do is think
about the average file size you will be using and specify an
appropriate set of newfs(8) or tunefs(8) options to configure the
resulting filesystems.  The tuning(7) manpage has some hints, but
a bit of prior experience with tuning filesystems and some
experimentation before the filesystem is put to real use can also
go a long way :)

- Giorgos




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