Click to See Complete Forum and Search --> : Fixing /var help?


cme
08-12-2001, 04:12 PM
I had the partition /var on another small HD, but I switched cases for my GF and now I don't have room for that HD. There is the /var shown in / , but there's nothing in it. How can I repair /var to now be on the same HD with / ? Does that make sense? I am not sure what else to say so ask, please if you need to know.

Thanks in advance.

Linuxcool
08-12-2001, 04:34 PM
I'm not certain if this will fix your problem. In your /etc/fstab file, you probably have an entry for the /var partition. Locate the line that has ' /var ' in the second column and comment it out. Like this: #/dev/hdxy /var ......... I hope this works.

cme
08-12-2001, 04:39 PM
:confused:

Do I not need this directory for general use? I know logs are written there, but past that I am not sure.

Any hints?

Thanks.

Linuxcool
08-12-2001, 04:46 PM
Did you try my idea? Also, I forgot to say that you'll have to reboot.

cme
08-12-2001, 04:52 PM
Yes, I did that.

The line was /hdd1 xxxxx

It'll boot and even get to X (after a long pause initializing(?) syslogd)

I was wondering if something can be done to "make a new /var in a new location". Without having to plug in the old one copy it over and then unplug the old one.

On second thought, maybe I'll just do that.

Thanks!

slapNUT
08-12-2001, 06:37 PM
If you can temporarily put that hard drive in the new case (you know... stretch the cables a little). Then after doing what Linuxcool suggested and booting into Linux single (so your syslog is not running.) Now do this
mkdir /var1
mount -t ext2 /dev/hdb(x) /var1
cp -dfpR /var1/* /var

That should be it. You can power down, remove the hard drive and reboot. Also you can just remove the /var entry in /etc/fstab as its not needed anymore.