Date: Mon, 6 Oct 2008 18:37:55 -0400 From: Jerry McAllister <jerrymc@msu.edu> To: jaymax <jaymax36@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Cant remove /var, in relocating /var to a symbolic link Message-ID: <20081006223755.GA72109@gizmo.acns.msu.edu> In-Reply-To: <19847627.post@talk.nabble.com> References: <19847627.post@talk.nabble.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081006223755.GA72109>