From owner-freebsd-questions Sun Oct 6 03:11:57 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA00933 for questions-outgoing; Sun, 6 Oct 1996 03:11:57 -0700 (PDT) Received: from agora.rdrop.com (root@agora.rdrop.com [199.2.210.241]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id DAA00902 for ; Sun, 6 Oct 1996 03:11:49 -0700 (PDT) Received: from diablo.ppp.de by agora.rdrop.com with smtp (Smail3.1.29.1 #17) id m0v9qBY-0008s4C; Sun, 6 Oct 96 03:11 PDT Received: from allegro.lemis.de by diablo.ppp.de with smtp (Smail3.1.28.1 #1) id m0v9pIq-000QoUC; Sun, 6 Oct 96 10:15 MET From: grog@lemis.de (Greg Lehey) Organisation: LEMIS, Schellnhausen 2, 36325 Feldatal, Germany Phone: +49-6637-919123 Fax: +49-6637-919122 Received: (grog@localhost) by allegro.lemis.de (8.6.9/8.6.9) id KAA26111; Sun, 6 Oct 1996 10:53:59 +0200 Message-Id: <199610060853.KAA26111@allegro.lemis.de> Subject: Re: adding new hard drive To: lray@aurora.liunet.edu Date: Sun, 6 Oct 1996 10:53:58 +0200 (MET DST) Cc: QUESTIONS@FreeBSD.org In-Reply-To: <96100516243870@aurora.liunet.edu> from "lray@aurora.liunet.edu" at Oct 5, 96 04:24:38 pm X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk lray@aurora.liunet.edu writes: > > Hi all. > I've added a disk drive to my freebsd system I'm using as a news server. > I need to add the 2-gig of new space to the /var file system. Can anyone > give me an Idea of how to extend te /var file system? I'm not sure if I understand this question completely. A file system is a file system: you can't spread it across two file systems. Let's consider what you might want to do: 1. Move /var to your new disk. That's straightforward enough. Modify your /etc/fstab to contain something like /dev/sd1e /var ufs rw 2 2 This assumes that your new disk is sd1, and that you've put the space on partition e. If you currently have /var mounted as a separate file system, modify the existing entry. Before you mount the disk as /var, you'll need to move the current /var stuff. First, mount the disk on /mnt, a general-purpose temporary mount point that you should have on your system: # mount /dev/sd1e /mnt Then copy the data across: # cp -pR /var /mnt Then *rename* /var, create a new /var, and mount it: # mv /var /VAR # mkdir /var # mount /var The reason for renaming /var to /VAR is that you won't be able to delete the old files after you've mounted a new file system on top of it. On the other hand, it's a good idea to keep the old contents around for a while until you're sure that you don't need them any more. This way, when you're sure that everything is OK, you just need to enter # rm -rf /VAR 2. You want to split /var between two file systems. For example, you may want to put /var/spool on the new disk, and leave all the other files where they were. In this case, you repeat (1) above substituting /var/spool for /var. If your current /var is a symlink, use the real directory name for the mount point. I hope this answers your question. If not, please let me know. Greg