[ale] moving /var

James P. Kinney III jkinney at localnetsolutions.com
Mon Feb 19 12:26:43 EST 2007


On Mon, 2007-02-19 at 12:02 -0500, Paul Cartwright wrote:
> I have a need to increase the size of a /var partition for someone. 
> I've got info on adding the new drive, creating partitions, adding to fstab, 
> relabeling partitions. What I'm not sure about is an active system partition 
> like /var . Once I create the new partition on the new drive, will I have a 
> problem copying all the files from /var to the new drive while the system is 
> running? Will putting it in single user mode work?

That's the process. Drop to single user mode and verify that syslog is
off (that should be the only possible process running that writes to var
in runlevel one). Mount the new drive/partition to a /var2 directory and
copy the /var over. Be aware that RH puts database stuff in /var. If you
are using postgresql of a RedHat shipped MySQL, do a database dump first
and be ready to do a database restore.

Once the copy of complete, rename the existing /var to /var-old and
create a new /var mount point for the new partition/drive. Then telinit
to runlevel 3 and bring up the database(s) if needed. At this point I
would (out of total paranoia) make a backup copy of the /var-old
directory just-in-case. Set /etc/fstab to mount the new /var and that
should be it.
> 
> any other gotchas I should know about?
> this is a RedHat 3 update 6 Enterprise server.
> 
> thanks,
-- 
James P. Kinney III          
CEO & Director of Engineering 
Local Net Solutions,LLC        
770-493-8244                    
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part




More information about the Ale mailing list