[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] /var is full!

Here's how.

Install your hard disk.  We'll assume that it's the second disk on your primary IDE channel, which would make it /dev/hdb.  Go into single-user mode--don't forget to do this, or you will be sorry.  The command for that, as root, is "init 1".

1.)  Partition it as you wish (I use fdisk).  Let's say you make a partition called /dev/hdb1.
2.)  Run mke2fs on it, and throw the -j switch to get journaling (makes it ext3).  I also throw the -v switch (verbose), 'cause I want to see what's happening.
3.)  Mount it somewhere.  I usually make a directory called /mnt/hdb1 to correspond to my actual partition name (in this case, /dev/hda1).  The command for this is "mount -t ext3 /dev/hdb1 /mnt/hdb1".
4.)  Do this copy command:  "cp -Rpv /var /mnt/hdb1" and watch everything copy right over, permissions and all.
5.)  Edit /etc/fstab and change where /var points.  On my Slackware machines, it shows up as /dev/hda4.  On my Red Hat machine, it currently points to /dev/hda3, which shows up as "LABEL=/var".  What you can do is comment out that "LABEL=/var" line and add a new one, like so, again assuming that your new partition is /dev/hdb1:

   /dev/hdb1              /var                    ext3    defaults        1 2

Leave the original line for /var in, but commented, in case you make a mistake.  :-) 

6.)  Then, I would recommend rebooting.  You don't necessarily have to (there's a parameter for the mount command that re-mounts w/o rebooting), but I just like to.  This way, I make sure I really did it right and the box will actually survive a reboot.

This general procedure works on just about any UNIX, BTW.  I had to do this kind of thing for multiple directories on a HP-UX 11 box and a Slackware box earlier this year.

Let us know how it goes.


On Wed, 2003-10-22 at 17:57, Richard K. Ingallsl wrote:
Steve Wright wrote:
> On Thu, 2003-10-23 at 10:31, Richard K. Ingalls wrote:
>>/my /var is getting full.  when i tried to do an 
>>up2date i was told that i didn't have any free 
>>space in this partition.  so i moved several files 
>>  to a different partition and then i had room to 
>>do my up2date.
>>can i increase the size of the partition /var ?
>>OR am i doomed to delete / move files before doing 
>>up2date from now on?/
> you cannot safely increase the size.  You could add an extra HDD to the 
> machine and mount it inside var somewhere.
> /steve

ok how do i do that?  (not the installation of the 
hard drive, but the mounting part).


Richard K. Ingalls,
Technology Coordinator

old: awm002 mail connect more net
new: ringalls glenwood k12 mo us

"A day without sunshine is like ... night."

K12OSN mailing list
K12OSN redhat com
For more info see <http://www.k12os.org>
Do you GNU!?
The "GNU" Free Software Revolution - With Improved Freedoms for All

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]