On Tue, Feb 12, 2002 at 12:00:43PM -0000, Patton, Tony mentioned:
> How do I move a directory to another partition?
>> what I want to do is move /var/log to /dev/sdf1.
>> The current mount points are like this :
>> >[root at mis /root]# mount
> >/dev/sde1 on / type ext2 (rw)
> >none on /proc type proc (rw)
> >/dev/sda1 on /boot type ext2 (rw)
> >/dev/sdc1 on /home type ext2 (rw)
> >/dev/sdb1 on /usr type ext2 (rw)
> >/dev/sdd1 on /var type ext2 (rw)
> >none on /dev/pts type devpts (rw,gid=5,mode=620)
> >/dev/md0 on /mnt/raid type ext2 (rw)
> >/automount(pid773) on /misc type autofs
> (rw,fd=5,pgrp=773,minproto=2,maxproto=3)
> >/dev/sdf1 on /mnt/f2 type ext2 (rw)
mv /var/log /var/oldlog
mkdir /var/log
mount /dev/sdf1 /var/log
/etc/init.d/sysklogd stop
mv /var/oldlog/* /var/log
/etc/init.d/sysklogd start
The idea is that sysklogd will keep file handles on those old logs files
until you stop sysklogd, so once you change what /var/log/messages points
to, you have restart.
Kate
--
_______________________________________
John Looney Chief Scientist
a n t e f a c t o t: +353 1 8586004
www.antefacto.com f: +353 1 8586014
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!