| View previous topic :: View next topic |
| Author |
Message |
tdennist Tux's lil' helper


Joined: 11 May 2004 Posts: 145
|
Posted: Tue May 18, 2004 12:05 am Post subject: large directories |
|
|
What are the largest directories in a Gentoo system? I'm guessing /usr for one, but what are some other ones? I'm asking so I will know what's a good idea to give a separate partition to. If that makes any sense.
td _________________ Registered Linux user #356840
Fleens??! YOU'RE not FLEENS! Well, whatever you are....MAKE ME A PIZZA!!? |
|
| Back to top |
|
 |
moocha Watchman

Joined: 21 Oct 2003 Posts: 5722 Location: Cluj-Napoca, Romania
|
Posted: Tue May 18, 2004 12:19 am Post subject: |
|
|
For a server, /var. For a desktop, /home. _________________ Military Commissions Act of 2006: http://tinyurl.com/jrcto
"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin |
|
| Back to top |
|
 |
tdennist Tux's lil' helper


Joined: 11 May 2004 Posts: 145
|
Posted: Tue May 18, 2004 12:20 am Post subject: |
|
|
And was I right about /usr? Also, this is a single user computer. _________________ Registered Linux user #356840
Fleens??! YOU'RE not FLEENS! Well, whatever you are....MAKE ME A PIZZA!!? |
|
| Back to top |
|
 |
moocha Watchman

Joined: 21 Oct 2003 Posts: 5722 Location: Cluj-Napoca, Romania
|
Posted: Tue May 18, 2004 12:28 am Post subject: |
|
|
Yes, of course. Unless you're creating a lot of content (or downloading a whole lot of files ), /usr will take up the most space on any machine.
Note that some software (usually proprietary stuff, like non-open source games, Sun's JRE/JDK and a few others) install into /opt, not into /usr. So you might want to look at that.
At any rate, to see how much a directory takes up, run (from root) something like Substitute /usr, /opt etc etc for /home to check those. Note that the command can take a little while to complete, especially when run on large trees, such as /usr. _________________ Military Commissions Act of 2006: http://tinyurl.com/jrcto
"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin |
|
| Back to top |
|
 |
tdennist Tux's lil' helper


Joined: 11 May 2004 Posts: 145
|
Posted: Tue May 18, 2004 12:30 am Post subject: |
|
|
Cool beans. What exactly is the /opt directory used for, anyway? And what does it stand for? _________________ Registered Linux user #356840
Fleens??! YOU'RE not FLEENS! Well, whatever you are....MAKE ME A PIZZA!!? |
|
| Back to top |
|
 |
moocha Watchman

Joined: 21 Oct 2003 Posts: 5722 Location: Cluj-Napoca, Romania
|
Posted: Tue May 18, 2004 12:35 am Post subject: |
|
|
| tdennist wrote: | | Cool beans. What exactly is the /opt directory used for, anyway? And what does it stand for? |
Read my post again.
As for stand - it's short for "optional"... _________________ Military Commissions Act of 2006: http://tinyurl.com/jrcto
"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin |
|
| Back to top |
|
 |
tdennist Tux's lil' helper


Joined: 11 May 2004 Posts: 145
|
Posted: Tue May 18, 2004 12:37 am Post subject: |
|
|
Ah, "optional" kind of answers both of my questions :p
Thanks.
td _________________ Registered Linux user #356840
Fleens??! YOU'RE not FLEENS! Well, whatever you are....MAKE ME A PIZZA!!? |
|
| Back to top |
|
 |
moocha Watchman

Joined: 21 Oct 2003 Posts: 5722 Location: Cluj-Napoca, Romania
|
Posted: Tue May 18, 2004 12:41 am Post subject: |
|
|
Not necessarily both of them - it's just a name, and it's that name for historical reasons, not for logical ones. Good example of UNIX tradition - "we've always done it that way"
Originally it stood for optional, but that doesn't mean it's for "optional software" - whatever that might mean. Aside from the kernel, pretty much any package is optional as there are always alternatives... And take a look at /usr. Comes from user, of course, but it doesn't have anything to do with user files, which land in /home. Or /etc, which holds system configuration. Not very intuitive.
Bottom line is - it's all about convention. If you want to know more about what goes where and why, see the File System Hierarchy Standard. _________________ Military Commissions Act of 2006: http://tinyurl.com/jrcto
"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin |
|
| Back to top |
|
 |
tdennist Tux's lil' helper


Joined: 11 May 2004 Posts: 145
|
Posted: Tue May 18, 2004 1:02 am Post subject: |
|
|
Oh. How unnecessarily confusing .
I'll take a look at that link you posted.
td _________________ Registered Linux user #356840
Fleens??! YOU'RE not FLEENS! Well, whatever you are....MAKE ME A PIZZA!!? |
|
| Back to top |
|
 |
floffe Guru


Joined: 24 Nov 2003 Posts: 414 Location: Linköping, Sweden
|
Posted: Tue May 18, 2004 9:10 am Post subject: |
|
|
| moocha wrote: | | And take a look at /usr. Comes from user, of course |
*BEEP* USR = Unix System Resources |
|
| Back to top |
|
 |
Deebster Tux's lil' helper


Joined: 16 Nov 2003 Posts: 126 Location: Reading, England
|
Posted: Tue May 18, 2004 11:13 am Post subject: Re: large directories |
|
|
| tdennist wrote: | | I'm asking so I will know what's a good idea to give a separate partition to. |
/tmp!
A short list of advantages/arguments:
- Security - Having /tmp as a separate partition allows you to mount it with the options nodev,nosuid,noexec, which stops pretty much all linux attack scripts and worms (most use /tmp to exploit from&/build exploits). Be aware this could break things, although the only app I've ever heard of is Midnight Commander (apparently).
Portage was vulnerable to a trick with hard sym-links that you could do if your /tmp was on the same partition as /, although iirc that's fixed now.
Also, having /tmp and /var (/home too, depends) on separate partitions allows you to set / to read-only, although I only bother with that on servers.
- Data integrity - /tmp is the area most written to, so keeping it on a seperate partition helps guard against corruption of the rest of your files.
- If you fill up a separate /tmp partition, it doesn't break anything else (like logs and spools in /var). Trying to log on to a system with a full root partition or /var is no fun at all.
However, this is also an argument against having it separate - running out of space on /tmp is a pain, but so is having all that unused space (for most of the time, anyway). Not so much an issue if you've got a nice big drive and can afford a decent sized /tmp partition.
On a related note, the 'out of space on my xxx partition' problem is the reason why the Gentoo install guide suggests such a poor partitioning system (hi Sven!).
- Allows you to mount /tmp using a different fs, like reiser4 or ext2 (fast, stability over crashes not needed) or even tmpfs (uses swap space, Solaris style).
|
|
| Back to top |
|
 |
moocha Watchman

Joined: 21 Oct 2003 Posts: 5722 Location: Cluj-Napoca, Romania
|
Posted: Tue May 18, 2004 12:21 pm Post subject: |
|
|
| floffe wrote: | | moocha wrote: | | And take a look at /usr. Comes from user, of course |
*BEEP* USR = Unix System Resources |
Argh
*goes and hides under a rock for the next couple of years* _________________ Military Commissions Act of 2006: http://tinyurl.com/jrcto
"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin |
|
| Back to top |
|
 |
lbrtuk l33t


Joined: 08 May 2003 Posts: 910
|
Posted: Tue May 18, 2004 2:36 pm Post subject: Re: large directories |
|
|
| Deebster wrote: | | Having /tmp as a separate partition allows you to mount it with the options nodev,nosuid,noexec, which stops pretty much all linux attack scripts and worms |
While at first, setting noexec might seem to be the perfect solution, but it can easily be circumvented. While the shell might not execute something that doesn't have the +x bit set, you can always easily run it though something that will run it.
ie- For a bash script, the cracker can do:
| Code: | | /bin/sh /tmp/mynastyscript |
For a python script (you get the idea):
| Code: | | python /tmp/mynastyscript |
For a binary executable:
| Code: | | /lib/ld-linux.so.2 /tmp/mynastybinary |
True that it adds another level of annoyance and that it might stop some scripted worms, but there's nothing to stop the cracker writing this into the worm script. |
|
| Back to top |
|
 |
Deebster Tux's lil' helper


Joined: 16 Nov 2003 Posts: 126 Location: Reading, England
|
Posted: Tue May 18, 2004 3:11 pm Post subject: |
|
|
Yup, which is why I wrote "pretty much all", not just "all"  |
|
| Back to top |
|
 |
Unne l33t


Joined: 21 Jul 2003 Posts: 616
|
|
| Back to top |
|
 |
placeholder Advocate

Joined: 07 Feb 2004 Posts: 2500
|
Posted: Wed May 19, 2004 3:27 am Post subject: |
|
|
| / is a pretty big directory if you ask me. lol |
|
| Back to top |
|
 |
floffe Guru


Joined: 24 Nov 2003 Posts: 414 Location: Linköping, Sweden
|
Posted: Wed May 19, 2004 4:24 pm Post subject: |
|
|
*goes and hides under a HUGE rock for the next couple of years* |
|
| Back to top |
|
 |
moocha Watchman

Joined: 21 Oct 2003 Posts: 5722 Location: Cluj-Napoca, Romania
|
Posted: Wed May 19, 2004 4:27 pm Post subject: |
|
|
Hey, go find your own rock, this one's taken  _________________ Military Commissions Act of 2006: http://tinyurl.com/jrcto
"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin |
|
| Back to top |
|
 |
|