[ILUG] move mount point
Niall O Broin
niall at magicgoeshere.com
Tue Feb 12 12:21:32 GMT 2002
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 :-)
More information about the ILUG