On Sat, Sep 30, 2000 at 04:03:05PM +0200, Patrick Erler wrote:
> 1) cp -dpR /var /mnt/drive2
> 2) rm -rf /var
> 3) ln -s /mnt/drive2/var /
> 
> what will happen between 2) and 3) when a daemon tries to write
> to the logs or the tmp dir?

If /var is just a normal directory, and not a mount point, I would do it
different.

1) cp -dpR /var /mnt/drive2
2) cp -dpR /var/log /mnt/drive2/var
3) mv /var /oldvar
4) ln -s /mnt/drive2/var /
5) restart all the daemons that do logging, eg. syslogd and possibly some
   more
6) rm -rf /var

This way, the daemons have still a valid file handle to log to, and all you
might lose are some seconds of log between steps 3 and 5.  And if you put
all those commands on one command line you will have only a very short hole. 
The reason why I'd suggest to re-copy /var/log in step 2) is that the logs
that are copied over to the new place are as recent as can be.

Alexander Skwar
-- 
Homepage:       http://www.digitalprojects.com | http://www.dp.ath.cx
Sichere Mail?   Mail an [EMAIL PROTECTED] fuer GnuPG Keys
ICQ:            7328191

Keep in touch with http://mandrakeforum.com: 
Subscribe the "[EMAIL PROTECTED]" mailing list.

Reply via email to