Date: Fri, 19 May 2000 20:30:23 -0700 From: eito <eito@cs.pdx.edu> To: freebsd-questions@FreeBSD.ORG Cc: Jack Verdirame <jackv@netravision.com> Subject: Re: symbolic links and /var Message-ID: <20000519203023.B46192@dsl-only.net> In-Reply-To: <00051915254902.00333@sqlczar.netravision.com> References: <00051915254902.00333@sqlczar.netravision.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 19, 2000 at 03:17:02PM -0700, Jack Verdirame wrote: > I was suppose to move the /tmp and /var to the /usr volume and create a > symbolic link between them. This worked for the tmp directory. What I was > doing for the /var directory is the following: > > mkdir /usr/var > cd /var > tar cf - . | (cd /usr/var; tar xf - ) > cd / > rm -rf /var > ln -s /usr/var > > I go this from the freeBSD book written by Greg Lehey - Excellent Book. > > Anyway when I do the rm -rf /var it returns a device busy and will not > remove the directory. I have gone into single user mode and tried this > but the rm command returns the same result. I am logged in as root, also. The error was because some programs were still accessing files in /var. You can run 'lsof' (this is in /usr/ports) to see which files are opened by what programs. > I did notice there is a var -> /usr/var symbolic link in the var directory. > I have tried to remove this but I must be doing something wrong because it > won't remove. > > I do a ln -f /usr/var /var but is say it is not a directory. The symbolic link, var, was created by the last command (ls -s /usr/var). I don't know how you tried to remove this link. (rm should do the job.) If you tried to remove it (and recrete a link) with 'ln -f /usr/var /var', the reason you could not remove the link was, as the error message said, because the source was a directory. You cannot create hard link of a directory. So, you should use '-s' option to create a symbolic link. Please check out ln man page for more details. Regards, :eito 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?20000519203023.B46192>