From owner-freebsd-questions@FreeBSD.ORG Mon Oct 6 22:39:50 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33E961065693 for ; Mon, 6 Oct 2008 22:39:50 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id D13EB8FC0C for ; Mon, 6 Oct 2008 22:39:49 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id m96MbtK5072167; Mon, 6 Oct 2008 18:37:55 -0400 (EDT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id m96Mbtpw072166; Mon, 6 Oct 2008 18:37:55 -0400 (EDT) (envelope-from jerrymc) Date: Mon, 6 Oct 2008 18:37:55 -0400 From: Jerry McAllister To: jaymax Message-ID: <20081006223755.GA72109@gizmo.acns.msu.edu> References: <19847627.post@talk.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19847627.post@talk.nabble.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-questions@freebsd.org Subject: Re: Cant remove /var, in relocating /var to a symbolic link X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 22:39:50 -0000 On Mon, Oct 06, 2008 at 03:31:42PM -0700, jaymax wrote: > > I am attempting to relocate /var to avoid files system full issues. > Using a - > mkdir /usr/var > cd /var > tar cf - . | (cd /usr/var; tar xf - ) > cd / > rm -rf /var > ln -s /usr/var /var > approach > > at the > rm -rf /var step, the following was received > rm: /var/empty: Operation not permitted > rm: /var/named/dev: Device busy > rm: /var/named: Directory not empty > rm: /var: Device busy > > Te contents of /var at this site was > ls /var > ./ ../ empty/ named/ > and > ls /var/empty/ > ./ ../ > > ls -l /var/empty/ > total 4 > dr-xr-xr-x 2 root wheel 512 Nov 3 2005 ./ > drwxr-xr-x 4 root wheel 512 Oct 6 14:02 ../ > > Can't change permissons either > chmod 755 /var/empty/ > chmod: /var/empty/: Operation not permitted > > while > ls /var/named/ > ./ ../ dev/ > ls -l /var/named/ > total 5 > drwxr-xr-x 3 root wheel 512 Oct 4 19:46 ./ > drwxr-xr-x 5 root wheel 512 Oct 6 14:16 ../ > dr-xr-xr-x 4 root wheel 512 Jan 1 2002 dev/ > > ls -l /var/named/dev > total 0 > Could chmod755 but still cant remove, dev, dir empty but => Device busy > > How can I remove these two directories so that I can create a link from > /usr/var to /var The best way is to boot the 'fixit' image and do it from that. On a running system, the var directory is likely to always be busy. You might also be able to do it just from a boot to single user mode if the /var directory is not mounted. But, I would suggest actually not moving the whole /var filesystem. Rather, move some of the move heavily used directories such as /var/log and /var/mail, maybe even /var/db and /var/spool. Copy them over to the larger space and make sym links in /var to the new ones. Careful of your naming so you don't get confused on a sleepy morning. I tend to name the new alternates something like var.log and var.mail, etc which helps keep them straight in my mind. ////jerry > -- > View this message in context: http://www.nabble.com/Cant-remove--var%2C-in-relocating--var-to-a-symbolic-link-tp19847627p19847627.html > Sent from the freebsd-questions mailing list archive at Nabble.com. > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"