From owner-freebsd-questions Tue Jan 25 16:43:12 2000 Delivered-To: freebsd-questions@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id 18EF814A13 for ; Tue, 25 Jan 2000 16:41:32 -0800 (PST) (envelope-from grog@mojave.worldwide.lemis.com) Received: from mojave.worldwide.lemis.com (dialup2.lemis.com.197.109.192.in-addr.arpa [192.109.197.2] (may be forged)) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id LAA15094; Wed, 26 Jan 2000 11:11:29 +1030 (CST) (envelope-from grog@mojave.worldwide.lemis.com) Received: (from grog@localhost) by mojave.worldwide.lemis.com (8.9.3/8.9.3) id QAA00407; Tue, 25 Jan 2000 16:22:14 +0800 (MYT) (envelope-from grog) Date: Tue, 25 Jan 2000 16:22:13 +0800 From: Greg Lehey To: Chip Wiegand Cc: questions@FreeBSD.ORG Subject: Re: Link problem - /var to /usr/var - now X won't load Message-ID: <20000125162213.A333@mojave.worldwide.lemis.com> Reply-To: Greg Lehey References: <388BDBFC.E517B01C@wiegand.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <388BDBFC.E517B01C@wiegand.org>; from chip@wiegand.org on Sun, Jan 23, 2000 at 08:58:37PM -0800 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sunday, 23 January 2000 at 20:58:37 -0800, Chip Wiegand wrote: > I bought the FreeBSD Powerpak and got it installed without any problems. > During the partitioning section I set up a /var partition of 100 megs, a > root partition of 100 megs, and left a couple gigs for /usr, and > entering df on the command line also shows a /proc partition of 4 1-k > blocks. > Here is the output of df - Please don't wrap output, it makes it very difficult to read. > /dev/wd1s1a 99183 46987 44262 51% / > /dev/wd1s1f 2749566 515006 2014595 20% /usr > /dev/wd1s1e 99183 101111 -101 104% /var <-- (these are apr, I didn't write down > procfs 4 4 > 0 100% /proc the exact numbers) > > Then I started getting a message about running out of room for sendmail > - > sendmail: NOQUEUE: low on space (have 0, SMTP-DAEMON need 101 in > /var/spool/mqueue) > this message gets repeated alot, to say the least. > So I enter df at prompt and see the partition /var is at 104%. Right. So you should expect this. But this wouldn't have happened immediately. > Then I open the book The Complete FreeBSD, chapter 5 page 87, Where to > put /var and /tmp section. > I followed the instructions to link /var to /usr/var because that would > allow more room for /var. All went well till I tried rm -rf /var when I > get a message that the device is busy. Right, you need to umount it. I see that isn't in the book; I'll fix that. From where you were reading: # mkdir /usr/var create a new directory # cd /var move to the old /var directory # tar cf - . | (cd /usr/var; tar xf - ) copy its contents # cd / get out of the directory *** add the following line *** # mv /var /VAR move file system out of the way # ln -s /usr/var /var now link to the new directory *** add: *** Before rebooting, remove the entry for /var from /etc/fstab. After rebooting, and after you're sure everything is working normally, enter: # rm -rf /VAR > So I rebooted and tried that last one again and got the same > response. Then I rebooted into single user mode (I believe), and got > the same message again. So I tried ln -s /usr/var /var anyway, and > it seems to have worked, I didn't get any messages. Yes, but unfortunately the result isn't the same. You will now have a symlink /var/var pointing to /usr/var. It won't get used, because the name is wrong. > The directory /usr/var appears to contain all the directories and > files that were in the original /var. I reboot again just for the > heck of it, and get the following messages (and in the last couple > reboots above) - > > /etc/rc: cannot create /var/run/dmesg.boot: directory nonexistent > cd: can't cd to /var/run > /etc/rc: cannot create /var/run/clean_var: directory nonexistent > Enter full pathname of shell or RETURN for /bin/sh: It looks as if you were able to remove a number of the files in /var :-) > I get a # sign prompt and enter login > I then login as a user, not root, and enter startx. Hmm. Not what you should be doing. You're still in single user mode, and you probably don't have all file systems mounted. > It appears to start but then quits to the command prompt again with the > following messages - > > > > Once again, this only started after trying to link /var to /usr/var > according to the directions in the above mentioned book. > Now when I do df I show /var at 0%, which is correct since that is > empty, and I can't get rid of it the way the book says I should be able > to. > > So, did I screw up big time? Hopefully I can just fix this without any > major problems, like reinstalling from scratch. Right now, the easiest way is: # mv /var /VAR # ln -s /usr/var /var Another problem you might run into in this area is that your /var/tmp file system might have the wrong permissions. It should look like: # ls -ld /var/tmp drwxrwxrwt 5 root wheel 1536 Jan 25 16:07 /var/tmp Note that the permissions string at the beginning of the line must end with a 't'. If it doesn't look like this, enter the following command: # chmod 1777 /var/tmp Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message