SUMMARY: Relocating /var/spool/mqueue

From: Stephen Waelder (WAELDER@kitsune.com)
Date: Wed Dec 07 1994 - 17:17:00 CST


I thank the respondents to my question, 19 in all:

From: SMTP%"'DISCO::EDM'@MOG.WR.USGS.GOV" "Edward J. Maple,
                System Mangler ... uh ... Manager"
From: SMTP%"HRSVENER@cosmos.gsfc.nasa.gov" ""The best things in
                life ... are fantasy.""
From: SMTP%"anderson@neon.mitre.org" "Mark S. Anderson"
From: SMTP%"andrew@dcs.bbk.ac.uk" "Andrew Watkins"
From: SMTP%"bobr@houston.wireline.SLB.COM" " Bob Reardon "
From: SMTP%"ca@informatik.uni-kiel.de" "Claus Assmann"
From: SMTP%"ccaicedo@ucauca.edu.co" ""Carlos E. Caicedo""
From: SMTP%"clay@cliff.inetinc.com" "Clay Luther"
From: SMTP%"dwg@rjrt.COM" "David W. Griffith"
From: SMTP%"hendefd@techserv.tech.duc.auburn.edu" "Frank Henderson"
From: SMTP%"jfedock@motown.ge.com" "Joe Fedock"
From: SMTP%"jrml@dps.state.vt.us" "Jim McLean-Lipinski"
From: SMTP%"louis@meg.saic.com" "Dances on keyboards
                (Louis Brune)"
From: SMTP%"pam@fimad1.lanl.gov" "Patricia Ann Max"
From: SMTP%"peter.allan@aea.orgn.uk" "Peter Allan"
From: SMTP%"ric@Artisoft.COM" "Ric Anderson"
From: SMTP%"se@computing.lancaster.ac.uk" "Steve Elliott"
From: SMTP%"seanw@amgen.com" "Sean Ward"
From: SMTP%"tag@mls.saic.com" "Robert Tag"

I also received one Email from Carl Steadman who was looking for the
same information.

Basically, I received three suggestions:

        1. Move /var into its own partition.
        2. Move /var into an existing partition.
        3. Configure sendmail to use a different work space.

In all cases the goal was to make the root partition static and
relocate the /var work space.

My origional post:

>From: SMTP%"WAELDER@kitsune.com" "Stephen Waelder" 2-DEC-1994 20:41
>To: sun-managers@ra.mcs.anl.gov
>Subj: Relocating /var/spool/mqueue
>
>Sorry for this elementary question. My background is mainly been VMS.
>
>I have a SPARC IPC running Solaris 2.3 and the / partition is 98%
>full. I have been trying to clear out space since I noticed that mail
>into the system failed due to the size of the mail message. I have
>noted that the /var/spool/mqueue directory, which is under /, does not
>have much space to work with.
>
>Can this be linked into a directory within a partition or another disk
>with more space available and what simular "workspace" directories
>should I be concerned with? /var/spool/lp seems likely but what else?
>
>Thanks in advance.
>
>+--------------------------------------------------------------------+
>| Stephen Waelder |
>| President |
>| Kitsune, Route 1, Box 100, Loving, Texas 76460 |
>| Voice: 817 378 2590; Fax: 817 378 2593; Email: waelder@kitsune.com |
>+--------------------------------------------------------------------+

The responces received:

>From: SMTP%"'DISCO::EDM'@MOG.WR.USGS.GOV" "Edward J. Maple,
> System Mangler ... uh ... Manager"
>
>Its nice to know I'm not the only one making the jump from VMS to
>UNIX! In fact we still run a VAX/785 here. Ancient, but it still works
>great!
>
>As for your question, I recently reconfigured my system disk on my sun
>so that the whole var directory tree would have its own partition. You
>might want to do the same if you can. Otherwise, you can move var
>kit-n-caboodle to an existing partition and create a logical link to
>it. I also did that for awhile before reconfiguring my disks. Hope
>this helps. Long Live VMS!!!

>From: SMTP%"anderson@neon.mitre.org" "Mark S. Anderson" 2-DEC-1994
>
>Move the whole /var directory to another partition.
>
>From: SMTP%"bobr@houston.wireline.SLB.COM" " Bob Reardon "
>
>If you just soft link the /var directory to some partition with
>plenty of room, most problems with dynamic expansion of the root
>partition will disappear.

>From: SMTP%"seanw@amgen.com" "Sean Ward" 2-DEC-1994 20:26
>
>If you have the disk space, I would recommend that you move the entire
>/var partition onto another disk. Besides email, all print jobs get
>spooled out to /var, making the area somewhat volatile in disk usage.

>From: SMTP%"clay@cliff.inetinc.com" "Clay Luther"
>
>Typically, I actually pull /var off onto another partition altogether
>so that root is *really* only (mostly) static files. /var on the
>other hand is for "variable" or "varying" files, things that grow and
>shrink regularly. It is really totally inappropriate for /.
>
>I've found that 16-32 mb is *plenty* for / sans /var and that 32-64
>for /var suits us fine. YMMV.
>
>But, to answer your second question. You *can* make a link from /var
>to some other directory on a larger partition, but this really should
>only be done if you positively cannot afford the time to repartition.

>From: SMTP%"HRSVENER@cosmos.gsfc.nasa.gov" ""The best things in
> life ... are fantasy.""
>
>Hi there,
>
>In general links can be made between any disks that are part of or
>mounted to your machine as well as between partitions. You probably
>want to use the ln -s command (type `man ln' without the quotes to
>learn more). For example, if you want to put material onto /disk2
>which is now residing on, say, /var then you could set up the
>appropriate directory on /disk2, populate it (ie move stuff over
>there) then go back to the original and set up the links. You can link
>whole directories or individual files. The syntax is ln -s <to
>path/name/file> <from file>.
>
>Hope this helps. Be sure to check out the man pages!

>From: SMTP%"ric@Artisoft.COM" "Ric Anderson"
>
>If you don't have diskless clients mounting /usr from IPC, then you
>can move /var to /usr/var, and put a symlink in / pointing to the new
>location.
>
>If you put var on some other filesystem, you'll need to edit the
>startup scripts to mount that filesystem when /usr is mounted, as /var
>is needed very early in the boot process.

>From: SMTP%"hendefd@techserv.tech.duc.auburn.edu" "Frank Henderson"
>
>You can tell sendmail to use an alternate que directory. See sendmail
>man page for details, but basically it's /usr/lib/sendmail -bd -q1h -Q
>/var/spool/lp

>From: SMTP%"jrml@dps.state.vt.us" "Jim McLean-Lipinski"
>
>I would try to avoid having var in the root partition. Ideally you
>should have a separate partion for var since the possiblity of it
>filling up is quite large, and you don't want this happening to the
>root filesystem But to answer your question, yes, you can take another
>file system and put var there and then create a symbolic link to it.
>
>Here is an example using /home as the other file system: This is just
>a quick example off the top of my head, you are probably going to want
>to verify all of this before running these commands, Ideally this
>should be done in single user mode.
>
>$ cd / $ tar -cvf /tmp/var.tar /var $ cd /home $ tar -xvf /tmp/var.tar
>$ cd / $ mv /var /var_save $ ln -s /home/var /var
>
>Once you are certain that the system is working correctly with the
>link to /home/var you can delete /var_save.
>
>If you have a free partition large enough, I would create a separte
>filesystem for /var to live in, as my fist choice.

>From: SMTP%"ccaicedo@ucauca.edu.co" ""Carlos E. Caicedo""
>
>Hi:
>
>You seem to be having the same kind of problem I had about 2 weeks
>ago. My / partition was getting full and I was worried about it. The
>problem wiht the / partition is that it contains the /tmp and /var
>directories where a lot of temporary and log files are created.
>
>So, what I did was to ask the Sun-managers list about ideas to free up
>space in the / partition. I'm sending you the summary I sent to the
>list. I hope it helps. (If it does, don't post the summary again, just
>mention it)
>
>************************************ From ccaicedo@ucauca.edu.co Date:
>Thu, 24 Nov 1994 08:48:56 -0300 (CDT) From: "Carlos E. Caicedo"
><ccaicedo@ucauca.edu.co> To: sun-managers list
><sun-managers@ra.mcs.anl.gov> Subject: SUMMARY: root partition
>
>Greetins Sun managers:
>
>Sorry for the delay in the summary, but I've been sick and having
>other problems with my network (remember my second disk... it broke
>down, a physical defect :(
>
>Here is my original posting:
>
>On Nov 14, 12:44pm, Carlos E. Caicedo wrote:
>> Subject: root partition
>> Greetings:
>>
>> I have a problem with a SS10 with SunOs 4.1.3_U1. The / (root)
>> partition is filling up, and I don't want to format the entire disk and
>> make the partition larger. I have another disk on the machine and my idea
>> was to /tmp directory on a directory called /usr2/tmp on the second disk,
>> after doing that I'd put a link for /tmp to /usr2/tmp. In this way all
>> the temporary files would be created on the second disk which has lots of
>> space. Is this a good idea?
>>
>> I tried to do it but I just can't move two files, they are:
>> /tmp/.X11-unix/X0 and /tmp/.NeWS-unix/N0
>>
>
>
>Many of the replies that I got suggested to put the /var directory in
>another partition and in doing so I would free up much more space in
>the / partition that if I only moved /tmp. I did this and it really
>solved my problem. Remeber to edit the fstab file and put /var as a
>mount directory in the new disk partition, be sure the access
>permissions are set up right and reboot.
>
>Moving /tmp to another partition also looks like a normal practice, in
>any case you have to user the tar command so that hidden files and
>symbolic links won't be lost. (don't use cp !!)
>
>Some also suggested doing loopback mounts of /var and /tmp on a free
>disk partition. Another suggestion and a very interesting one, was to
>put /tmp in memory via the tmpfs command, it looks like a real
>performance enhancer if you have enough memory, so I' ll sure give it
>a try.
>
>Some also mentioned that linking or moving /tmp to another partition
>may cause trouble when booting up in single user, since only the / and
>/usr partition are set up, and so any program that needs to create
>temporary files (like vi) would not be able to do so.
>
>Oh, and about those two files... they are files that are created each
>time X windows is started so there's no problem deleting them. (but
>you can't be in X windows when you do it!).
>
>Many thanks to all those who replied:
>
>vx!squid!spp@uunet.uu.net (Stephen Potter)
>pburyk@leis.leis.bellcore.com (Patrick Buryk) Dave Hightower
><hightowr@afwc.af.mil> bleck@bbking.eng.hou.compaq.com (Bob Leck)
>johnm@sse.com (John Malick) Gregory A. Parmer
><Gregory.A.Parmer@acenet.auburn.edu> Tom Orban
><orban@advtech.uswest.com> mike@trdlnk.com (Michael Sullivan)
>stevee@sbei.com (Steve Ehrhardt) runde@griffn.mms.com (Aline Runde)
>cindy@ddrsrv.dny.rockwell.com (Cindy Yoho) Dave Fetrow
><fetrow@biostat.washington.edu> steve@seaspace.com (Steve Clemons)
>rozman@niserver.ksm.my (Rozman Mohd Noh) yves@suntech.abcomp.be (Yves
>Hardy)

>From: SMTP%"jfedock@motown.ge.com" "Joe Fedock"
>
>Stephen,
>
>Yes, link away. We do this all the time. In fact, you can move all of
>/var/spool off, ie, make /var/spool a link. Just watch permissions on
>the directories that you move over (dump or tar to preserve them).
>
>Good luck.

>From: SMTP%"andrew@dcs.bbk.ac.uk" "Andrew Watkins"
>
>Hi,
>
>I think this is a common problem, but I would suggest any of the
>following:
>
>1) Many people do have /var on a single partition
>
>2) I have files in /var linked to /usr: ie:
>
>drwxr-sr-x 10 root 1024 Nov 26 04:05 adm/
>lrwxrwxrwx 1 root 12 Nov 3 1993 crash ->../usr/crash/
>drwxr-xr-x 2 root 1024 Nov 30 13:13 etc/
>drwxr-sr-x 2 root 512 Nov 30 14:57 log/
>drwxr-sr-x 4 root 512 Jul 23 1992 net/
>drwxr-sr-x 11 bin 512 Nov 17 20:30 preserve/
>lrwxrwxrwx 1 root 12 Nov 3 1993 spool ->../usr/spool/
>lrwxrwxrwx 1 root 10 Nov 3 1993 tmp ->../usr/tmp/
>drwxr-sr-x 4 root 1024 Oct 19 14:03 yp/
>
>There is nothing wrong with this. I am not sure if you should link
>/var to /usr? Someone else may tell you that!
>
>3) If you are running sendmail why not change the location of your
>mail queue either add the flag -oQ/new/dir/mqueue to your sendmail
>process or alter it in the sendmail.cf file OQ/new/dir/mqueue

>From: SMTP%"peter.allan@aea.orgn.uk" "Peter Allan"
>
>Stephen,
>
>You might want to put the whole of /var on another disk partition.
>This is easy to do at first installation, otherwise it involves
>backing-up, repartitioning and then copying back.
>
>An easier (temporary ?) fix is to make /var/spool a symbolic link to
>where the real action is: in the place of your choice.

>From: SMTP%"se@computing.lancaster.ac.uk" "Steve Elliott"
>
>make a new filesystem and move /var to it

>From: SMTP%"ca@informatik.uni-kiel.de" "Claus Assmann"
>
>The best way is to make /var a separate partition. If you don't have
>one, you might relocate it with a link. We use separate partitions on
>our servers and have no problem with it.

>From: SMTP%"pam@fimad1.lanl.gov" "Patricia Ann Max"
>
>What I do is make a directory /vt and mount a filesystem on it - say
>maybe 100 MB or so. Then I make /vt/tmp and /vt/var, copy what's in
>/tmp and /var to /vt/tmp and /vt/var, remove /tmp and /var and link
>/tmp and /var to /vt/tmp and /vt/var. I also copy everything that's
>in /usr/tmp to /vt/tmp, remove /usr/tmp, and link it to /vt/tmp.

>From: SMTP%"louis@meg.saic.com" "Dances on keyboards (Louis
> Brune)"
>
>On at least one system I manage, /var is a mount point for its own
>filesystem. On others, entries in /var are symbolic links to places
>with more room.
>
>If you can have the system to yourself for a while, run it in single
>user mode and copy everything from /var to the candidate filesystem
>(or alternatively, to that other directory, fix up the appropriate
>entries in /etc/vfstab or symbolic links as necessary, and reboot.
>
>The primary area for special care is permissions and ownership of the
>mount point (if you choose that way of doing it) and for everything
>down the hierarchy. For examples, you might wish to do ls -laR to
>hardcopy before you start.
>
>Not a big deal, requires only the usual sort of caution.

>From: SMTP%"dwg@rjrt.COM" "David W. Griffith" 6-DEC-1994 12:07
>
>Can this be linked into a directory within a partition or another disk
>with more space available and what simular "workspace" directories
>should I be concerned with? /var/spool/lp seems likely but what else?
>
>That's exactly what you should do... You may want to make a separate
>partition for /var the next time you add a disk or reformat you're
>root disk.

>From: SMTP%"tag@mls.saic.com" "Robert Tag" 6-DEC-1994 12:10
>
>Stephen, Yes sir that is correct, you can make a SYMLINK or symbolic
>link to another filesystem. This is performed by first doing a DF
>command which will shoe you the disk info including that root or / is
>up to 98%. Locate a filesystem that looks like a prime candidate and
>then CD to the filesystem and create a mount point, or mkdir. then cd
>to /var. Now I believe you should rename that large file, MQUEUE to
>anythnig else. Now make the symbolic link, by using the command LN -s
>"dir/file you want linked" "name of where it is to go", otherwise that
>mount point/dir/file that you created on the file system that is okay.
>I.e.. ln -s /var/spool/mqueue /home/mqueue.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:16 CDT