View previous topic :: View next topic |
Author |
Message |
Sprotte Apprentice
Joined: 18 Oct 2004 Posts: 217 Location: Kiel, Germany
|
Posted: Fri Mar 21, 2008 9:00 pm Post subject: How critical is /var? |
|
|
?
I'm asking because I don't know what filesystem to use for it. Let's see what's on it:
- logs
- package database (what's this actually good for?)
- world file
- some caches (man pages, not sure if also portage metadata is here?)
- firewall rules (hopefully backed up somewhere!)
- mail spool (if you use mbox)
- other files I don't understand
What if I theoretically hose /var? Will it break my Gentoo?
If so, I guess ext3 is a good choice. |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Fri Mar 21, 2008 9:06 pm Post subject: |
|
|
It won't go up in flames, but it will make doing some things rather troublesome. If your package db is gone, portage won't know what's installed anymore. If your mail spool is lost, all the mail that was pending to be processed/retrieved is gone. If /var/www is gone, your webserver will not be able to serve any webpages from there. etc etc. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Fri Mar 21, 2008 9:09 pm Post subject: Re: How critical is /var? |
|
|
Sprotte wrote: | ?
I'm asking because I don't know what filesystem to use for it. Let's see what's on it:
- logs
- package database (what's this actually good for?)
- world file
- some caches (man pages, not sure if also portage metadata is here?)
- firewall rules (hopefully backed up somewhere!)
- mail spool (if you use mbox)
- other files I don't understand
What if I theoretically hose /var? Will it break my Gentoo?
If so, I guess ext3 is a good choice. |
I'd go with ext3 as well. /var is very important, besides all the funny things that nixnut described above, I'll add that some services will even refuse to start properly if they can't find logs files or directories. Portage will be terribly broken, and you will require a reinstallation or a lot of manual work to restore it to a working state. |
|
Back to top |
|
|
guruvan Tux's lil' helper
Joined: 21 Aug 2007 Posts: 132
|
Posted: Fri Mar 21, 2008 9:18 pm Post subject: |
|
|
well.....it won't break your gentoo as much as if you hose /usr (which seems to be most sysadmins' first clever trick.....rm -rf ./* "why's that taking so long OH !#$" that was /usr)
with out the portage stuff, you'' have a hard time emerging packages.
without the logs you'll have a hard time figure out why you hosed your gentoo
mail spool -- I'd have to direct you the the old BOFH short story series found in alt.sysadmin.recovery (news group years ago)
world file......what a pain to lose that....(a cron job that backs that up every day is a good thing)
pid files, caches, and so..
vmware server wants to put VM datastores in /var/lib/vmware
mostly not the End of The World. Can be time consuming to fix, though. (figuring out which files have to exist for apps like syslog-ng to restart, etc) You might be offline for a bit, but not dead.
I've used XFS for all my critical data since I got my first sillyG box in the 90s. I use ext3 sometimes for directories that have heaps of tiny files. Just seems too slow in XFS. (like /usr/portage or /var/tmp/ccache) but of course, right now my portage is on an XFS ;-> When reiser4 seems stable enough I might try it. Reiser3x has eaten more files and directory trees of mine that I care to think about ( > =1 ) (other folks love it, though!) _________________ Everything is broken......(b.dylan).
guruvan |
|
Back to top |
|
|
Sprotte Apprentice
Joined: 18 Oct 2004 Posts: 217 Location: Kiel, Germany
|
Posted: Fri Mar 21, 2008 10:09 pm Post subject: |
|
|
Hmh, I see. I'll use something-journaling then. Is 1 GB enough if I don't have mail on it (maildir user here), and symlink /var/tmp to say, a 3 GB /tmp partition? This harddrive is only 20 gig.
I guess I can use ext2 on /tmp, right? Only interesting thing on there is my ccache folder (via /var/tmp), and losing that won't kill me.
I used to have my portage tree in /var, too. I'll create an extra partition for it this time. |
|
Back to top |
|
|
guruvan Tux's lil' helper
Joined: 21 Aug 2007 Posts: 132
|
Posted: Fri Mar 21, 2008 10:43 pm Post subject: |
|
|
as far as /var/tmp goes
3GB may be enough most days. Main thing that comes to mind is compiling openoffice. That's 5+GB ordeal.
if you don't watch it, failed emerges will fill up /var/tmp/portage
I'm no longer a fan of symlinking for this purpose. Too many things go wrong that way (circular symlinks, etc)
On one of my setups, I have /opt and /var on a separate partion from / and /usr (I just leave /boot on the same partition as /)
I create a directory for static mounts
/mounts
Then a directory for each drive
/mounts/hda
/mounts/sgate
and a dir for each partition
/mounts/sgate/1
/mounts/sgate/2
/mounts/sgate/3
I put the moved dirs into one of these:
/mounts/sgate/3/opt
/mounts/sgate/3/var
And then I do a mount --bind
mount --bind /mounts/sgate/3/var /var
OR from the /etc/fstab
/dev/sdb3 /mounts/sgate/3 xfs rw,suid,exec 0 0
/mounts/sgate/3/var /var none rw,exec,bind 0 0
/mounts/sgate/3/opt /opt none rw,exec,bind 0 0
I think that you mean ext3 not ext2. I would not use ext2 anymore at all. (except in special share with windows cases)
I don't like to use any more different type of any kind of software than I need. I like as much to be standardized so that I only have one or 2 sets of problems to learn about.
I pretty much always have /usr/portage as a separate partition. I like to use dump (or xfsdump) to back it up and restore it quickly.
Unless I have separate drives I don't separate anything unless it's done to protect from out-of-space issues.... _________________ Everything is broken......(b.dylan).
guruvan |
|
Back to top |
|
|
Sprotte Apprentice
Joined: 18 Oct 2004 Posts: 217 Location: Kiel, Germany
|
Posted: Fri Mar 21, 2008 10:59 pm Post subject: |
|
|
Interesting, thanks.
I want to do some splitting up for playing around with filesystems. I might even use reiser for /tmp. If it b0rks up, I can just wipe it. Same for portage.
I'll use ext3 for /var and /usr then. No experiments. |
|
Back to top |
|
|
guruvan Tux's lil' helper
Joined: 21 Aug 2007 Posts: 132
|
Posted: Fri Mar 21, 2008 11:03 pm Post subject: |
|
|
reiser did seem to be faster for big ops on the portage dir. (cp, du, find, and so on) _________________ Everything is broken......(b.dylan).
guruvan |
|
Back to top |
|
|
|