Re: move /var


Subject: Re: move /var
From: nathan r. hruby (nhruby@arches.uga.edu)
Date: Wed Mar 06 2002 - 07:23:45 MST


On Tue, 5 Mar 2002, david wright wrote:

> I have recently made a new partition for /var - and
> made the necessary auto-mounting changes (i.e
> /etc/fstab) before i actually 'officially' mv this.
> what file or system variable do i have to change to
> tell the system where /var will be now?
>
> thanks - dvw
>

/etc/fstab is all you need to edit to make the partition and drive change,
(and a remount -> mount -o remount /device/partion)
though I wouldn't use mv for a few reasons first being that if you screw
up you're toast. Second is that I don't think you can cp or mv across
filesystems, at least you couldn't used to.

This should do what you want. Remember to mount your new disk someplace
and chnage the bit "/newdisk/var" to the path of your new disks
/var/partition (eg: if you have one disk and it's going to be all /var,
then mount it at /newvar and replace /newdisk/var with /newvar)

tar cpf /var | (cd /newdisk/var && tar xpf -)

Since /var is used for a lot of things by a lot of running processes, I
would consider booting down to single user mode before doing this.

-n

-- 
......
nathan hruby - nhruby@arches.uga.edu
computer support specialist
department of drama and theatre
http://www.drama.uga.edu/
......



This archive was generated by hypermail 2a24 : Wed Mar 06 2002 - 07:41:33 MST