Gentoo Setup

New user here, I like what I see so far. Anyway I'm planning on running my node on Gentoo so I'm out trolling for some Caveats, Tips and what not. First question is the best recommendation for slicing up the real estate? I'm going to be primarily using the node for Drupal so it's going to be configured for LAMP. Here's how I'm planning on slicing it up -

/

/usr/portage

/var/log

/var/www

I'm looking for basic recommendation for space alloted for / and /var/log that and any other "Gentoo" recommendations would be great.

Cheers

19 Replies

How much space you need for /var/log or /var/www is really going to depend on your particular setup. I would start with a single partition for everything and see what you need for your system. With disk space being fairly limited in a linode, I personally think the single partition is the way to go anyway, unless you have really good reasons to need separation.

As far as gentoo-specific advice, I can't really think of any major differences between a linode and real hardware. You don't need to build a kernel of course, but you will need kernel sources installed for certain packages (iptables comes to mind). I've had decent results with using vanilla-sources, or I think in most cases you can get the linode sources here and use package.provided to satisfy portage. Get the .config from /proc/config.gz and do a "make prepare" is all that is needed for iptables IIRC.

@Stever:

How much space you need for /var/log or /var/www is really going to depend on your particular setup. I would start with a single partition for everything and see what you need for your system. With disk space being fairly limited in a linode, I personally think the single partition is the way to go anyway, unless you have really good reasons to need separation. hm… I think it makes some sense to go with two partitions, but that advice may need revision for Gentoo. Although I suspect compiling will be frustratingly slow with Gentoo no matter what you do, due to shared disks.

2 gb is pretty good for most binary distributions. I'll generally have a 2 gb /, and then another partition for all my data sized such that there's enough spare room for at least one more OS partition (this this way you can clone an OS drive before you do something big, allowing you to roll back if need be, while preserving your data).

Single slices are a bad idea, especially with servers. Wait till something goes astray and starts slamming your logs and you'll see what I mean ;)

Anyway I started off with

/ 2 Gig

/usr/portage 400 Meg (portage doesn't really need any more)

/usr/portage/distfiles 1 Gig (clean up old packages when needed)

/var/log 1 Gig

Once I have everything configured I'll revisit the sizes, make adjustments and put the rest of my real estate in /var/www

And Yeah I do wish they would be a bit more generous on disk space, especially with it really being cheap now days.

BTW - I've only been messing with Linode for a couple of days now, man I'm thinking it's the coolest thing since sliced bread ya know

8)

@marcus0263:

And Yeah I do wish they would be a bit more generous on disk space, especially with it really being cheap now days.
Of course we all wish there was more space. It's not that cheap, though, to buy server-grade, redundant storage. In linode's case, I believe they only use 1U servers. They use RAID1 on the drives, so that means that there are, most likely only 2 drive bays in each server, both of which are already full when they deploy the server.

Anyway, you get the point - yes, storage is fairly cheap, but in this case, adding storage isn't as simple as slapping in a $200 (or whatever they cost)1TB 5400 rpm drive in from Best Buy.

@marcus0263:

/usr/portage 400 Meg (portage doesn't really need any more) If you are on a Xen node, I think there may still a problem with 1K blocksizes (see here). With 4K blocksize, /usr/portage is up to about 550M without any distfiles.

@anderiv:

@marcus0263:

And Yeah I do wish they would be a bit more generous on disk space, especially with it really being cheap now days.
Of course we all wish there was more space. It's not that cheap, though, to buy server-grade, redundant storage. In linode's case, I believe they only use 1U servers. They use RAID1 on the drives, so that means that there are, most likely only 2 drive bays in each server, both of which are already full when they deploy the server.

Anyway, you get the point - yes, storage is fairly cheap, but in this case, adding storage isn't as simple as slapping in a $200 (or whatever they cost)1TB 5400 rpm drive in from Best Buy.
This is true on the hardware, but there a few things like for one SAN's and iSCSI ;)

@marcus0263:

This is true on the hardware, but there a few things like for one SAN's and iSCSI ;)
Those classify as "cheap"?

@Stever:

@marcus0263:

/usr/portage 400 Meg (portage doesn't really need any more) If you are on a Xen node, I think there may still a problem with 1K blocksizes (see here). With 4K blocksize, /usr/portage is up to about 550M without any distfiles.

MMMM thanks for the heads up, I'll keep an eye on it, I'm currently on about 60% for portage.

@anderiv:

@marcus0263:

This is true on the hardware, but there a few things like for one SAN's and iSCSI ;)
Those classify as "cheap"?
Depends what you use for a SAN's, if it's SUN you're gonna pay a fortune.

@anderiv:

Of course we all wish there was more space. It's not that cheap, though, to buy server-grade, redundant storage.
Not to mention backups… And you can have more space, all it takes is money :-)

http://www.linode.com/forums/viewtopic. … 4831#14831">http://www.linode.com/forums/viewtopic.php?p=14831#14831

There are plans for a NAS, with cheaper prices then adding more space from the hosts pools.

> Although I suspect compiling will be frustratingly slow with Gentoo no matter what you do, due to shared disks.
I've been running Gentoo on my node for > 1 year. Compile time is great, especially since migrating to Xen. (My friend also runs Gentoo on a Linode, and we use distcc via the local LAN in Newark. Works great. Ping me if you're in Newark and want to join the party!)

Anyway, here's my "tips" for Gentoo on Linode:

Roll your own using Finnix. By caker's own admission, he's not a Gentoo guy… the provided pre-install is out of date, and not optimized for Xen.

Here's pertinent snippits from my make.conf:

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=prescott -fomit-frame-pointer -O2 -pipe -mno-tls-direct-seg-refs"

USE="-* apache2 berkdb bzip2 cli cracklib crypt gpm iconv logrotate jpeg ncurses nls nptl nptlonly pam pcre perl python readline session ssl tcpd tiff unicode vhosts zlib"

I also set vm.swapiness=25 in sysctl.conf

Use flags for stuff I run (Mainly gallery2 and qmail):

/etc/portage/package.use

# Gallery2
media-libs/tiff jbig
app-text/ghostscript-gpl jpeg2k
media-gfx/imagemagick fpx hdri jbig jpeg2k lcms mpeg png truetype wmf
media-libs/netpbm jbig jpeg2k png
media-libs/imlib2 gif mp3 png
media-video/ffmpeg aac amr encode imlib network ogg theora truetype v4l vorbis x264 xvid

# LAMP
dev-db/mysql berkdb big-tables max-idx-128
www-servers/apache ssl
dev-lang/php bzip2 -cgi crypt ctype curl curlwrappers exif force-cgi-redirect ftp gd iconv inifile mysql mysqli pcre session -sharedmem sockets tokenizer truetype xml xmlrpc xsl zip zlib
net-proxy/squid customlog
dev-php5/eaccelerator contentcache sharedmem

# Mail
mail-client/nail net
mail-mta/netqmail qmail-spp gencertdaily
net-mail/dovecot doc vpopmail
mail-filter/dovecot-antispam dspam
mail-filter/dspam clamav virtual-users
net-mail/vpopmail -mysql
mail-filter/spamassassin qmail
mail-filter/qmail-scanner clamav spamassassin
dev-lang/perl perlsuid
mail-client/squirrelmail spell

# Misc
dev-lang/python threads

Size of my /usr/portage (I'm still on 1k blocks):

dfelicia@catch-22 ~ $ cd /usr/portage/
dfelicia@catch-22 portage $ du -sh .
422M    .
dfelicia@catch-22 portage $ du -sh distfiles/
192M    distfiles/

Last time I did an emerge -e system (after changing CFLAGS when I was migrated to Xen), it only took a few hours.

The compile times aren't bad. I did try working with the supplied image and everything just started blowing up. I went ahead and used Finnix to bootstrap, other than a one or two "burps" went well.

I'm thinking since I've got an up to date "virgin" install and since I'm already going to create a tarball before I continue, is there a place to upload it for others?

@dfelicia:

I've been running Gentoo on my node for > 1 year. Compile time is great, especially since migrating to Xen. (My friend also runs Gentoo on a Linode, and we use distcc via the local LAN in Newark. Works great. Ping me if you're in Newark and want to join the party!) I've got a few linodes in Newark, but I don't like Gentoo. :wink:
@marcus0263:

This is true on the hardware, but there a few things like for one SAN's and iSCSI SANs aren't exactly cheap.

Doing it over the network is a good way to go long term though. Fast, low-contention space can be sold at a premium, with bulk space on slow disks being cheaper. Both provide great value, since it would be possible to tailor storage needs much more than you can with whatever disks host has to start with.

> I've got a few linodes in Newark, but I don't like Gentoo.
Distro doesn't matter, just the version of gcc. An up to date Gentoo uses:

dfelicia@catch-22 ~ $ gcc --version
gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)

@ArbitraryConstant:

I've got a few linodes in Newark, but I don't like Gentoo. :wink:
I've got a couple linodes running Gentoo, but I don't like Newark :)

Yeah, been dinking around with it for a few days I definitely think I'm going to like Linode 8)

Without apache running I'm only seeing about 45 Meg usage, love Gentoo ;)

I do see a butt load of script kiddies attempting to brute force, what do you all recommend for security? Eventual goal is to run Drupal and transfer my blog sites over with forums, Shorewall?

Anyone here use bfd and apf combo for BF attacks?

While I'm fairly literate on the systems level I'm still a rookie when it comes to admin'ng a website.

Cheers

@dfelicia:

See this post.
Cool, I think I'll check out Firewall Builder ;)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct