I got lots of answers, and they all told me it was possible. The solution
I went for, and that looked most attractive, was suggested by Olav Lerbrekk.
The other answers are added at the bottom.
On Jul 1, 10:44, Rune Mossige (rune.mossige) wrote:
: Subject: Increase space in /var
:
: I have suddently ran out of space in /var, and are not able to increase the
: root partition in the forseeable future. So, I wondered if it is safe to
: create a symbolic link, so that /var could be on a different filesystem? Or
: is /var used in the boot process before any other filesystems are mounted,
: so that this is not possible?
:
:-- End of excerpt from Rune Mossige
Hi,
I've used symbolic links for both /tmp anf /var without any problems. The
only problem is that you will not have any /tmp or /var when booting in
single user mode. Because of that I usually use a loopback mount to expand
/tmp and /var.
Add
/mn/charisma/tmp/root-var /var lo rw 0 0
/mn/charisma/tmp/root-tmp /tmp lo rw 0 0
to /etc/fstab and
intr mount -at lo # loopback mount /tmp & /var
to /etc/rc just after the normal mount.
Hope this helps,
Olav
--
Olav Lerbrekk Phone: +47 22 85 66 39
Computer Consultant Fax: +47 22 85 42 15
Department of Geology Email: olav.lerbrekk@geology.uio.no
University of Oslo, Norway
-- Standard disclaimer applies --
Hi Rune,
You can link your /var directory to a partition that has the most free
space. However, before you do that you may want to cd to the /var
directory and run a du -s * which will give you the size of all the files
and directories. You'll probably see a directory, either spool or mail
which is getting huge. You can then take that directory and link it to the
partition where you have a lot of free space.
Hope it helps.
Chris Michalik
chris@swrpr.cv.com
Rune,
>I have suddently ran out of space in /var, and are not able to increase the
>root partition in the forseeable future. So, I wondered if it is safe to
>create a symbolic link, so that /var could be on a different filesystem? Or
>is /var used in the boot process before any other filesystems are mounted,
>so that this is not possible?
I'm not sure. We used symbolic links for certain directories within
/var like /var/spool/mail and /var/spool/mqueue. This works so far.
Tilman
I have suddently ran out of space in /var, and are not able to increase the
root partition in the forseeable future. So, I wondered if it is safe to
create a symbolic link, so that /var could be on a different filesystem? Or
is /var used in the boot process before any other filesystems are mounted,
so that this is not possible?
Rune Mossige, Systems Support
WESTERN GEOPHYSICAL Telephone:(+47) 51 59 01 66
Western Atlas Int. Inc. Telefax: (+47) 51 59 57 90
Kvernevik Ring 177 Telex: 30 192 atlas n
P.O.Box 55, Sundebrotet Privat phone: (+47) 51 42 46 75
N-4040 Hafrsfjord, Norway
Rune,
>
> I have suddently ran out of space in /var, and are not able to increase the
> root partition in the forseeable future. So, I wondered if it is safe to
> create a symbolic link, so that /var could be on a different filesystem? Or
> is /var used in the boot process before any other filesystems are mounted,
> so that this is not possible?
your better off making /var a separate partition. By placing the entry
in fstab (vfstab for solaris) it will be automatically mounted at boot.
Hope this helps,
-- Bob
____________________________________________________________
____ ____ ____
/ \ | / \ |/ \ Atmospheric & Environmental
/ \| /______\ | Research, Inc.
\ /| \ | 840 Memorial Drive
\____/ | \____/ | Cambridge, MA 02139 USA
Robert D. Worsham (Bob) voice: (617) 547-6207
email: worsham@aer.com fax: (617) 661-6479
____________________________________________________________
You can with no ill-effects add a new partition that mounts on /var .This can be an increased size so that you can move all of your existing /var to it and then delete the contents of the original directory.
do this in single user mode.
Terry Smith
City Senior Systems Engineer
You can mount /var on a different file system - no problemo....
Gautam
On Fri, 1 Jul 1994, Rune Mossige wrote:
> I have suddently ran out of space in /var, and are not able to increase the
> root partition in the forseeable future. So, I wondered if it is safe to
> create a symbolic link, so that /var could be on a different filesystem? Or
> is /var used in the boot process before any other filesystems are mounted,
> so that this is not possible?
> Rune Mossige, Systems Support
> WESTERN GEOPHYSICAL Telephone:(+47) 51 59 01 66
> Western Atlas Int. Inc. Telefax: (+47) 51 59 57 90
> Kvernevik Ring 177 Telex: 30 192 atlas n
> P.O.Box 55, Sundebrotet Privat phone: (+47) 51 42 46 75
> N-4040 Hafrsfjord, Norway
>
>
>
>
> I have suddently ran out of space in /var, and are not able to increase the
> root partition in the forseeable future. So, I wondered if it is safe to
> create a symbolic link, so that /var could be on a different filesystem? Or
> is /var used in the boot process before any other filesystems are mounted,
> so that this is not possible?
/usr is mounted early enough so that you can make /var be a link to
/usr/var. I did
# cd /
# tar -cf - var | (cd /usr;tar -xpf -)
# mv var oldvar
# ln -s usr/var var
followed IMMEDIATELY by a reboot. This is because some daemons
still have files open in /var and a reboot is easier than trying to
identify and restart each such process manually. This is how my
current systems is running.
If you want var on some other filesystem (or on its own partition
that you mount) then under Solaris you need to modify some
startup files to deal with that. Under solaris 2.3, I think this
would be in /etc/rcS.d/S40standardmounts.sh. Just add another
chunk (emulating the /usr/kvm section) right below /usr to do /var.
I'll know more about this when I get another disk and actually
have to make it work. One other site I know of has done this
and had no problems.
Under SunOS 4, I never had var on anything but /usr, so I didn't
ever explore how to mount it there.
Good Luck,
Ric (<ric@Artisoft.COM> "Ric Anderson", speaking for himself)
You can safely link /var to a dir on another filesystem. It's pretty standard
to setup /var as its own partition (sd0f is a favorite).
Yes, you can. It might be even safer, though, to only do it to select
directories. For example, /usr/tmp and /usr/spool can be easily
transferred from /var/tmp and /var/spool. I've done this trick, especially
with /usr/tmp and /tmp. The / partition on Sun's is laughably small:
they really seem to intend that you set aside an extra partition for /var.
Nico Garcia
raoul@athena.mit.edu
When I ran out of space in /var I did the following:
1) cleaned out /var/adm/wtmp and /var/adm/wtmpx
Sol2.3 [ rm /var/adm/wtmp && rm /var/adm/wtmpx ]
Sol2.2 [ > /var/adm/wtmp && > /var/adm/wtmpx ]
2) created a link and moved /var/sadm to /opt/var/sadm
3) Turned off cron logging
removed CRONLOG=YES in /etc/default/cron
I did not try to move all of /var.
Hope this info helps.
Leo
We usually have /var as a separate partition.
No problem at all.
>I have suddently ran out of space in /var, and are not able to increase the
>root partition in the forseeable future. So, I wondered if it is safe to
>create a symbolic link, so that /var could be on a different filesystem? Or
>is /var used in the boot process before any other filesystems are mounted,
>so that this is not possible?
Rune,
I have moved /var to another partition and installed a symbolic link for
many years without trouble. (SunOS 4.1.2 and earlier).
There are two issues however:
1) You must move the contents of the existing /var to the new area and
/var/spool/cron/FIFO is a pipe that must be removed and re-created.
2) If you boot up single user the partition containing /var may not be mounted.
I use the following script to mv /var to /files/var
#! /bin/csh -f
cd /files
mkdir var
cd /var/spool/cron
rm FIFO
cd /var
tar cfe - . | (cd /files/var; tar xvfBpe -)
cd /files/var/spool/cron
mknod FIFO p
chmod 600 FIFO
chown root.staff FIFO
cd /var/spool/cron
mknod FIFO p
chmod 600 FIFO
chown root.staff FIFO
cd /
mv var var.old
ln -s /files/var
echo "/var renamed to /var.old"
echo "/var is now a symbolic link to /files/var"
Regards,
Marc Hansen internet: mhansen@cambric.com
Cambric Graphics, Inc. attmail: cambric!mhansen
180 South 300 West X400: c=us ad=attmail
PO Box 2353 dd.id=cambric!mhansen
Salt Lake City, Utah 84101 voice: (801) 363-6305
USA fax: (801) 363-6338
just mount up another (bigger part) as var...
you're on the right track!
Yes you can set up a different partion and call it /var.
this will controll your disk space problems
richard wong
> From sun-managers-request@Princeton.EDU Fri Jul 1 13:50:12 1994
> Sender: sun-managers-relay@ra.mcs.anl.gov
> X-Sender: gsoz197@svs01.norway.waii.com
> Mime-Version: 1.0
> Content-Type> : > text/plain> ; > charset="us-ascii">
> To: sun-managers@eecs.nwu.edu
> Reply-To: rune.mossige@airgun.wg.waii.com (Rune Mossige)
> Followup-To: junk
> Subject: Increase space in /var
> X-Mailer: <Windows Eudora Version 1.4.2b16>
> Content-Length: 593
> X-Lines: 13
>
> I have suddently ran out of space in /var, and are not able to increase the
> root partition in the forseeable future. So, I wondered if it is safe to
> create a symbolic link, so that /var could be on a different filesystem? Or
> is /var used in the boot process before any other filesystems are mounted,
> so that this is not possible?
> Rune Mossige, Systems Support
> WESTERN GEOPHYSICAL Telephone:(+47) 51 59 01 66
> Western Atlas Int. Inc. Telefax: (+47) 51 59 57 90
> Kvernevik Ring 177 Telex: 30 192 atlas n
> P.O.Box 55, Sundebrotet Privat phone: (+47) 51 42 46 75
> N-4040 Hafrsfjord, Norway
>
>
>
The only problem with a link (or a seperate file system) is that when
booting single user, if the linked filesystems isn't mounted yet (ie:
it's not / or /usr), then any attempts to use vi or any other program
that uses /var/tmp will fail.
Here's how I normall have my /var setup:
root partition: small (5-8Meg)
/tmp a symlink to var/tmp (no leading / on var in case of mounting this
drive when booting from a CD, etc.).
/var is a directory with a /var/tmp directory in it (still on root partition)
/var is a filesystem that gets mounted over the /var directory. This way,
/var/tmp exists when booting single user, but the full /var partition
gets mounted during the mount -at 4.2 in /etc/rc. The only down
side is that the /var/tmp directory may have a large file in it (not likly)
and then it has the /var filesystem mounted over it which creates a hidden
file that you can't get at. Once running in multi-user, /var is almost
impossible to unmount since so many things have open file in that partition.
Nothing that I know of needs any space in /var before the mount -at 4.2 line,
in /etc/rc (which is before /etc/rc.local is called) so your symlink would
also be safe.
BTW, this is all for Solaris 1 (aka SunOS 4.1.x)
Good luck,
Tom Leach
leach@oce.orst.edu
Hello
Yes, it is OK to have /var mounted on a different file system or having
a symlink for it on another file ssyetem.
While booting single user, only / and /usr are mounted. You might run
into a small problem may be in singlr user mode if you have to edit a
file (using vi), it complains about /var/tmp not found. You can come
across this problem by explicilty mounting /var file system using
mount. As far as my knowledge goes i think it is safer to have /var
on a different file system, all my var's are mounted that way.
HarisH
> I have suddently ran out of space in /var, and are not able to increase the
> root partition in the forseeable future. So, I wondered if it is safe to
> create a symbolic link, so that /var could be on a different filesystem? Or
> is /var used in the boot process before any other filesystems are mounted,
> so that this is not possible?
> Rune Mossige, Systems Support
--
__________
|Goldman | HarisH Malneedi
|Sachs | 85 Broad St., NY NY 10004
| | (harishm@pcsdnfs1.eq.gs.com)
| | (212) 902-9808 Off.
---------- (917) 706-9164 Bpr
> I have suddently ran out of space in /var, and are not able to increase the
> root partition in the forseeable future. So, I wondered if it is safe to
> create a symbolic link, so that /var could be on a different filesystem? Or
> is /var used in the boot process before any other filesystems are mounted,
> so that this is not possible?
> Rune Mossige, Systems Support
> WESTERN GEOPHYSICAL Telephone:(+47) 51 59 01 66
> Western Atlas Int. Inc. Telefax: (+47) 51 59 57 90
> Kvernevik Ring 177 Telex: 30 192 atlas n
> P.O.Box 55, Sundebrotet Privat phone: (+47) 51 42 46 75
> N-4040 Hafrsfjord, Norway
Most system managers have /var as a separate file system. My fstab
looks like this:
/dev/sd0a / 4.2 rw 1 1
/dev/sd0g /usr 4.2 rw 1 2
/dev/sd1h /var 4.2 rw 1 3
/dev/fd0 /pcfs pcfs rw,noauto 0 0
Works quite well. I also make /tmp a symbolic link to /var/tmp.
--
- Nate Itkin
- Portland Technology Development, Intel Corporation Aloha, Oregon
- E-mail: Nate-Itkin@ptdcs2.intel.com
- "This is a unix system. I can do this easy." -Lex, Jurassic Park.
don't know about whole /var, but it is certainly possible
to link /var/tmp and /var/spool elsewhere. I do it on all
my systems.
> From sun-managers-relay@ra.mcs.anl.gov Fri Jul 1 06:26:48 1994
> X-Sender: gsoz197@svs01.norway.waii.com
> Mime-Version: 1.0
> Content-Type> : > text/plain> ; > charset="us-ascii">
> To: sun-managers@eecs.nwu.edu
> From: rune.mossige@airgun.wg.waii.com (Rune Mossige)
> Subject: Increase space in /var
> X-Mailer: <Windows Eudora Version 1.4.2b16>
>
> I have suddently ran out of space in /var, and are not able to increase the
> root partition in the forseeable future. So, I wondered if it is safe to
> create a symbolic link, so that /var could be on a different filesystem? Or
> is /var used in the boot process before any other filesystems are mounted,
> so that this is not possible?
> Rune Mossige, Systems Support
> WESTERN GEOPHYSICAL Telephone:(+47) 51 59 01 66
> Western Atlas Int. Inc. Telefax: (+47) 51 59 57 90
> Kvernevik Ring 177 Telex: 30 192 atlas n
> P.O.Box 55, Sundebrotet Privat phone: (+47) 51 42 46 75
> N-4040 Hafrsfjord, Norway
>
>
>
Sure, that's no problem. In fact many of our users just link /tmp
to the separate /var/tmp partition.
-Tim
>
> create a symbolic link, so that /var could be on a different filesystem?
>
No problem! You will be fine by doing so.
+===========================================================+
| Chris Ma cma@spectra.com |
| Spectragraphics Corporation voice: (619) 450-0611 |
| 9707 Waples Street fax : (619) 457-2069 |
| San Diego, CA 92121, USA |
+===========================================================+
>>>>> "Rune" == Rune Mossige <rune.mossige@airgun.wg.waii.com> writes:
Rune> I have suddently ran out of space in /var, and are not able to
Rune> increase the root partition in the forseeable future. So, I wondered
Rune> if it is safe to create a symbolic link, so that /var could be on a
Rune> different filesystem? Or is /var used in the boot process before any
Rune> other filesystems are mounted, so that this is not possible?
Yes; you can move the /var directories to the /usr partition. As root, type
'mkdir /usr/var', then 'tar cvf - /var | ( cd /usr; tar xf - )'. Rename
/var to something else, like /var.old, create a symbolic link from /usr/var
to /var, and see if everything works. If so, you can delete the old /var
heirarchy.
--
Richard Pieri | "When sub-culture becomes pop-
<ratinox@unilab.dfci.harvard.edu> | culture, it's time to move on to
http://unilab.dfci.harvard.edu/~ratinox | something new." --Dana Carvey
In article <199407010844.AA16083@svs01.norway.waii.com> you write:
>I have suddently ran out of space in /var, and are not able to increase the
[deleted]
You can make /var consist of as many different file systems you like.
It is not required for booting (single user... lpd and the like look
in /var/spool so all the right files had better be in place so that
you can boot multi-user w/o problems). A tip... boot single user and
then "mkdir /var/tmp", so that you can vi and stuff while single user.
Rune Mossige writes:
>
> I have suddently ran out of space in /var, and are not able to increase the
> root partition in the forseeable future. So, I wondered if it is safe to
> create a symbolic link, so that /var could be on a different filesystem? Or
> is /var used in the boot process before any other filesystems are mounted,
> so that this is not possible?
I don't know about your specific setup, but it should be quite possible to
mount var from another partition. Just make sure that you have copied all
the stuff on your current var over there before you do this!
Also, check your /etc/rc* files to see how /var is used at bootup, if
at all.
=================================================================
Garrett D'Amore | garrett@sciences.sdsu.edu
Student Programmer/Analyst | SDSU College of Sciences
SDSU Computer Science Major | Physics Bldg., Room 238
=================================================================
Hi !
Yes, is safe. I do this here. Look:
miguel@cronos[2] ls -lgd /var /tmp
lrwxrwxrwx 1 root staff 22 May 13 14:27 /tmp -> /export/var/cronos/tmp
lrwxrwxrwx 1 root daemon 18 Jul 22 1993 /var -> /export/var/cronos
miguel@cronos[3]
good luck,
/ and /usr are mounted on a 4.1.X system immediately (if everything
wnet fine), so the only place where /var could be linked to is /usr/var.
But I would symlink out only the space consuming directories of var, not
the whole thing...
BTW : There are some programs with open files in /var, like syslog and
endmail daemons. Best move it out in single user mode, and watch out for
correct permissions and ownership of the new /var tree !
Eckhard R|ggeberg
eckhard@ts.go.dlr.de
--
Rune Mossige, Systems Support Tel: +47 51 59 01 66
Western Geophysical, Stavanger, Norway Fax: +47 51 59 57 90
Rune.Mossige@norway.waii.com Private tel: +47 51 42 46 75
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:05 CDT