Re: Changing /var size, or location

From: Robert M. Riches Jr (
Date: 10/15/03

Date: Wed, 15 Oct 2003 18:44:57 GMT

In article <>, Take a Walk wrote:
> My /var size is too small, its only 250Mb
> I've fitted an additional drive which works fine, so I propose to locate
> /var on there.
> Before i ferk it up, can someone check the following for flaws:
> cp all data on /var to directory on new drive (do I need any flags to keep
> permissions the same?)
> Amend fstab to point /var to new directory location
> RH8 system, have already got rid of labels in fstab .

If you're using 'cp', add the '-a' option to keep
permissions, timestamps, and such unchanged.

If you do it right and are reasonbly lucky, the operation
_should_ be successful. I'd recommend making backups before
starting, just in case.

Other ways to do the transfer would be 'tar' or 'rsync'.
With 'tar', you can verify the tarball against the original
and then verify destination against the tarball. With
'rsync', you can do an incremental update just before making
the switch to avoid losing log entries and such. I'd
recommend rebooting to make the change effective.

You might consider using Knoppix to do the copying and to
make the changes to /etc/fstab. That way, you're not trying
to change a running system, so it can't get the rug pulled
out from under it.

Good luck.

Robert Riches
(Yes, that is one of my email addresses.)