On Tue, Feb 12, 2002 at 12:00:43PM -0000, Patton, Tony wrote:
> How do I move a directory to another partition?
>> what I want to do is move /var/log to /dev/sdf1.
>
Simply add another entry for /var/log on /dev/sdf1 in /etc/fstab, or perhaps
put all of /var there. As a nunmber of processes may be writing to files
in /var the cleanest way to make the changeover will be to bring the box
down to run level 1 (with init 1), copy all the data from /var/log (or /var,
if you decide to move the whole thing) to /mnt/f2 in your favourite way e.g.
cd /var && cp -a * /mnt/f2 && mv /var /oldvar && mkdir /var
and then init 3 (or maybe 5) again. Once you're happy that everything is
working and logging OK you can remove /oldvar and get back the space that
you're obviously hungry for on your root partition :-)
Niall
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!