Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2000 22:17:17 -0800
From:      Chip Wiegand <chip@wiegand.org>
To:        Greg Lehey <grog@lemis.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Link problem - /var to /usr/var - now X won't load
Message-ID:  <388D3FEC.AC0BA96C@wiegand.org>
References:  <388BDBFC.E517B01C@wiegand.org> <20000125162213.A333@mojave.worldwide.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for the quick response. I immediately tried your suggestions and immediately got the following message -
mv: cannot rename a mount point
Bummer... the /var in the message below is a partition that was set up as such during the initial installation and
partitioning of the hard drive.
I'm not sure, but that may complicate things a bit?

Greg Lehey wrote:

> 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.
>

Is this regarding the below output? If not, I have netscape mail set to 72 column word wrap, should I change that to
make it easier to read in other mail programs? I just entered the text as I saw it on the other machine and used tab
for the spacing. I guess it didn't work like I wanted to.

> > /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.
>

It was a couple weeks that this took to occur.

>
> > 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:<I hit enter>
>
> It looks as if you were able to remove a number of the files in /var
> :-)
>

Yeah, they are now in /usr/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 -
> >
> > <complaints omitted>
>

Sorry if you took this part as complaints, I didn't mean for that interpetation, they were the messages from starting
kde.

> >
> > 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
>

I did this to the /var as it now stands and it changed the permissions to drwxrwxrwt, but I still cannot
mv: /var /VAR


>
> 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

Once again, thanks for your help. You must be one of very few authors that actually read the newsgroups and actually
help people.  :-)

Chip Wiegand




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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