LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   /var as a separate partition (https://www.linuxquestions.org/questions/slackware-14/var-as-a-separate-partition-604532/)

jong357 12-04-2007 06:15 PM

/var as a separate partition
 
Sorry for the silly poll but I'm very curious as to whether people use /var as a separate partition or not. I'd like to move package 'storage' on my source gnome build out of /tmp/gnome/packages and into /var/cache/gnome/packages or something similar. Doesn't matter if you use gnome or not. Just curious about how many people keep /var on a separate partition and how big of a partition it is.

If you used a program that did such a thing, would a few hundred MB fit in /var and would that bug you in anyway? ;)

unSpawn 12-04-2007 06:39 PM

Anyone making /var small or a dir in "/" hasn't seen the beauty of a daemon dying because it couldn't log anymore :-]
So, yes, I make it have it's own partition and 2GB minimum.

gilead 12-04-2007 06:39 PM

That's a well timed poll - I got a call this morning from a Windows sys admin who has a Linux box that's been running quietly in a corner for over 4 years. Suddenly it's spitting out errors on the console, but is mostly still working (that's his initial description of the problem). I'm on my way over there this afternoon to have a look, but here's the df -h output for /var:
Code:

Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p2    9.7G  9.2G    0 100% /var

Looks like some archiving is in order.

As for my boxes, I have /var on a separate partition for all of them. They're all used as servers, not desktops - if that makes a difference.

tuxrules 12-04-2007 07:03 PM

I use /var on a separate partition all the time. My web/db/mail server has 59GB of /var, my mythtv box has about 16GB and my desktop have about 8GB. Since I run slackware for all three and slackware puts web stuff and databases (mysql) in /var, I tend not to disrupt the defaults and just go with it with more-than-enough room...hence bigger partitions.

On the desktop, I use a bigger /var so I can play with databases (now and in future) and not worry about running out of space. Plus, today's bigger hard drives have enough room to allocate more space to each partition.

rkelsen 12-04-2007 08:00 PM

There's a pattern in these here answers.

As with everything else, it depends upon what you want to do with that particular box.

Personally, I used to run /var on its own partition, but stopped doing that when it became inconvenient for me.

My computer is strictly a desktop use machine, and I've never seen any negative effects from running /var in my root partition. Even when running Samba for file & printer sharing.

jong357 12-04-2007 10:32 PM

Thanks all. That's pretty much what I expected to see in the poll results. I never intended for packages to lie around in /tmp but that's pretty much what they do without user intervention. /var seems like a proper place for them.

dracolich 12-05-2007 09:06 AM

Just my 2 cents:
Like rkelsen, I believe it depends on the machines purpose. For servers that create and retain a lot of logs, definitely.

I don't have /var on it's own partition because both of my Slackware machines are strictly desktop use. Only once did I run out of disk space because syslog and messages grew to be hundreds of MB. Once I setup logrotate to handle that it's never happened again. Both machines have been running Slackware for 6 years, never had to reinstall, never ran out of room on / after that one time and /var currently only uses 45MB.

rickh 12-05-2007 09:33 AM

A little different perspective since I use Debian. I used to maintain /var as a separate partition on my desktop machines because it made it easier for me to track what went there, and how it was used. Once I understood just what kind of maintenance it needed, I elected to leave it in /. When I maintained it separately, I allocated it 3 GB.

Currently it uses 1.6 GB, but 1.4 of that is Apt related which I suppose is not an issue with Slackware.

farslayer 12-05-2007 09:54 AM

Depends on what the server is used for..

Apache web server files typically live in /var/www
Mysql databases and log files default location is /var/lib/mysql

unless you relocate them or the defaults for slackware are different..

So if you have a website with a lot of files for downloading (CC licensed movies, music, tons of PDF's or whatever)
or are running large mysql databases then you need to ensure you have room for them in /var

jong357 12-05-2007 11:06 AM

There's one vote for separate and smaller than 500mb... The only thing I don't want to do is contribute to the over population of someones /var directory. If /var is on / then it's a non-issue. I suppose I could take the stance of NMP if someone wants to have a small /var partition. Dunno.

I usually amend to rc.M and wipe /tmp before the X stuff is created. I'm sure I'm not the only one who does something similar. That coupled with /tmp being a completely inappropriate place to dump packages (indefinitely) is making me want to change it. I'll stew on it some more.

Thanks again for the votes and comments.

Eh... I have a better idea. I'll just have a user defined variable for the location of saved packages and default it to /var/somewhere. If they run into problems then it's definitely Not My Problem.. ;)

shadowsnipes 12-06-2007 12:40 PM

I tend to like storing all of my packages in a directory under root's directory. I don't use sudo ever on my system and I feel that root should be the only one handling the packages so it makes since to me to have them all under /root/Packages.

When I compile software I do it under my users home directory unless I'm using a slackbuild and then the source goes under /tmp/SBo. But I still have all packages (including downloaded official slackware packages) under /root/Packages.

I use this system primarily for desktop purposes so I don't need /var on a separate partition. If it were used as a server I probably would have it as a separate partition and would make it larger than 500MB. Of course if it were a server I'd be using a much bigger HD than I am now...

Either way, I wouldn't store packages under /var unless normal users had business to be using them.

trickykid 12-06-2007 12:48 PM

Quote:

Originally Posted by unSpawn (Post 2980370)
Anyone making /var small or a dir in "/" hasn't seen the beauty of a daemon dying because it couldn't log anymore :-]
So, yes, I make it have it's own partition and 2GB minimum.

Yup. Or when you have some developer install something into /usr and filled up all the space available so it also filled up /. Same goes for /home when you have some user fill it up with mp3's and movies.

Or something or some user fills up /tmp that happened to be on same parition as /.

I always recommend having /boot, /, /usr, /tmp, /var and /home all on their own partitions at a minimal. Hell, even systems I have mysql databases on I'll even create a /var/lib/mysql partition so it doesn't affect /var.

Sonneteer 12-06-2007 04:09 PM

For my laptop, I have /var and /tmp sharing a 1.23 GB partition (/tmp is a symlink to /var/tmp/tmp). They each occasionally need that space, but not both at the same time, and I have thus far had no issues with that setup.

tellef 12-10-2007 02:31 PM

I have two webservers, some local servers and a gateway. They all have /var as a separate partition as well as /home and /tmp. The ones that have anything important on them have mirroring disks on those partitione as well.

DOSJockey382 12-17-2007 05:24 PM

Being a long time Debian user and a big fan of apt's ability to do complete system installs over the Internet even when I was using dial-up on my 486 and a <1GB HDD, I find it is really only the apt cache under /var that really needs a lot of space, and only temporary space at that as I usually have the system delete the download cache once the apps are installed. I got in the habit of redirecting the apt cache to a larger partition like /usr so that that 100MB+ (sometimes 1GB+) downloads do not kill my / partition on a rather infrequent download situation, usually the initial system install or a mass of package upgrades. Otherwise, allocating enough space to / while still having /var on the same partition is sufficient for my needs.


All times are GMT -5. The time now is 08:44 PM.