Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2003 11:03:30 -0500
From:      "Scot W. Hetzel" <hetzelsw@westbend.net>
To:        <michaeld@kestrelworks.com>, <freebsd-ports@freebsd.org>
Subject:   Re: Moving Ports directory
Message-ID:  <016101c38123$14713db0$13fd2fd8@Admin02>
References:  <002a01c37ff9$4880f120$0300a8c0@winfirst.com>

next in thread | previous in thread | raw e-mail | index | archive | help
From: "Michael Dunham" <michaeldunham@earthlink.net>
> I'm using FreeBSD Current on an older machine.  I have two hard disks
> attached, one 3gb and one 2gb.  I have put the root on the 3gb drive but
it
> is now about 80% full.  I would like to move the Ports directory to the
2gb
> drive so I can run a new kernel build.
>
> What are the steps to move the /usr/ports directory to the other drive?
>
Is the 2Gb drive currently being used?  If not, you could dedicate the
entire drive or a partition to /usr/ports.

    mount /dev/ad1s1g /mnt
    tar -cf - -C /usr/ports . | tar xpf - -C /mnt
    rm -rf /usr/ports/*
    umount /mnt

edit /etc/fstab and add an entry for the 2GB drive

    /dev/ad1s1g             /usr/ports              ufs     rw      2
2

then mount /usr/ports

    mount /usr/ports

If you can't dedicate the entire drive or a partition, then you'll need to
do the following:

    mkdir <2GB drive mount point>/ports
    tar -cf - -C /usr/ports . | tar xpf - -C <2Gb drive mount point>/ports
    rm -rf /usr/ports
    ln <2Gb drive mount point>/ports /usr/ports

Scot



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?016101c38123$14713db0$13fd2fd8>