----- Original Message ----- From: "Alexander Skwar" <[EMAIL PROTECTED]> To: "Patrick Erler" <[EMAIL PROTECTED]> Cc: "MANDRAKE" <[EMAIL PROTECTED]> Sent: Saturday, September 30, 2000 10:23 AM Subject: Re: [expert] new drive - moving directories > 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. > It would be far simpler to boot to a floppy-based Linux like tomsrtbt to do the job. Hoyt
Keep in touch with http://mandrakeforum.com: Subscribe the "[EMAIL PROTECTED]" mailing list.