Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jul 2003 16:47:06 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Mark <admin@asarian-host.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Adding new hard disk
Message-ID:  <20030707154706.GB93279@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <200307071457.H67EVR5K014987@asarian-host.net>
References:  <200307071457.H67EVR5K014987@asarian-host.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--0eh6TmSyL6TZE2Uz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jul 07, 2003 at 02:57:28PM +0000, Mark wrote:
> Ok, I bought a new 80G hard disk, for backups. I added it on the second I=
DE.
> But now, when I ran FDISK and the Label program (booted from CD), it will
> not allow me to just add /backup as mount point, and says it wants a root=
 +
> swap partition too. :( I did "W" when writing out the info, but still,
> /etc/fstab is unchanged.
>=20
> All I want is to add the new hard disk as mount point /backup. Please, te=
ll
> me how to do this.

When you say "booted from CD" I take it you're using sysinstall(8).
That makes certain assumptions like "you're going to install a FreeBSD
system on this disk".

Instead of working through sysinstall, you can use the fdisk(8) and
disklabel(8) tools from the command line.  Assuming your new drive is
ad4 and you want to use it all for FreeBSD, but that you don't want it
to be bootable:

    # fdisk -I ad4
    # disklabel -w ad4s1 auto

That will give you a default partition layout.  Now you need to re-run
disklabel in partition editing mode. Run

    # disklabel -e ad4s1

and create one big slice 'a' that covers the whole of the disk, by
editing the list of partitions at the end of the disklabel.  Copy the
numbers from the 'c' slice.  You should end up with something like:

    # /dev/ad4s1c:
    type: ATA
    disk: ad4s1
    label:=20
    flags:
    bytes/sector: 512
    sectors/track: nn
    tracks/cylinder: nnn
    sectors/cylinder: nnnnn
    cylinders: nnnn
    sectors/unit: sssssssss
    rpm: 3600
    interleave: 1
    trackskew: 0
    cylinderskew: 0
    headswitch: 0           # milliseconds
    track-to-track seek: 0  # milliseconds
    drivedata: 0=20
   =20
    8 partitions:
    #        size   offset    fstype   [fsize bsize bps/cpg]
      a: sssssssss       0    4.2BSD     1024  8192    16   # (Cyl.    0 - =
nnnn*)
      c: sssssssss       0    unused        0     0         # (Cyl.    0 - =
nnnn*)


(where you need to replace sssssssss with the number of sectors/unit
that's correct for your disk -- it should appear automatically in the
entry for slice c:)

Now, create a filesystem on your new slice:   =20

    # newfs -U /dev/ad4s1a

Edit /etc/fstab to add a line for the mount point data for the new
partition:

    /dev/ad4s1a  /backups  ufs  rw  2  2

and finally mount the new partition:

    # mount /backups

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--0eh6TmSyL6TZE2Uz
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/CZX6dtESqEQa7a0RAk6MAJ9arKCWvwWsm0Y/hzFahX2lMG1BTQCfZYk8
bw81ziXYSjGCkQtoAnqoTYk=
=3udo
-----END PGP SIGNATURE-----

--0eh6TmSyL6TZE2Uz--



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