Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


Gentoo Setup

Click here to go to the original topic
Goto page 1, 2  Next
 
       Linode.com Forum Forum Index -> General Discussion
Author Message
marcus0263



Joined: 21 Jul 2008
Posts: 77
Location: Seattle

Posted: Tue Jul 29, 2008 6:45 pm    Post subject: 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
Back to top  
Stever



Joined: 07 Dec 2007
Posts: 41
Location: NC, USA

Posted: Wed Jul 30, 2008 9:45 am    Post subject:  

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.
Back to top  
ArbitraryConstant



Joined: 10 Feb 2007
Posts: 54

Posted: Wed Jul 30, 2008 12:51 pm    Post subject:  

Stever wrote: 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).
Back to top  
marcus0263



Joined: 21 Jul 2008
Posts: 77
Location: Seattle

Posted: Wed Jul 30, 2008 2:04 pm    Post subject:  

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)
Back to top  
anderiv



Joined: 27 Apr 2004
Posts: 129

Posted: Wed Jul 30, 2008 2:53 pm    Post subject:  

marcus0263 wrote: 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.
Back to top  
Stever



Joined: 07 Dec 2007
Posts: 41
Location: NC, USA

Posted: Wed Jul 30, 2008 3:13 pm    Post subject:  

marcus0263 wrote: /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.
Back to top  
marcus0263



Joined: 21 Jul 2008
Posts: 77
Location: Seattle

Posted: Wed Jul 30, 2008 3:45 pm    Post subject:  

anderiv wrote: marcus0263 wrote: 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 ;)
Back to top  
anderiv



Joined: 27 Apr 2004
Posts: 129

Posted: Wed Jul 30, 2008 3:46 pm    Post subject:  

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



Joined: 21 Jul 2008
Posts: 77
Location: Seattle

Posted: Wed Jul 30, 2008 3:47 pm    Post subject:  

Stever wrote: marcus0263 wrote: /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.
Back to top  
marcus0263



Joined: 21 Jul 2008
Posts: 77
Location: Seattle

Posted: Wed Jul 30, 2008 3:48 pm    Post subject:  

anderiv wrote: marcus0263 wrote: 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.
Back to top  
SteveG



Joined: 30 Nov 2003
Posts: 220

Posted: Wed Jul 30, 2008 4:53 pm    Post subject:  

anderiv wrote:
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 :-)
Back to top  
mwalling



Joined: 10 Dec 2007
Posts: 142

Posted: Wed Jul 30, 2008 6:28 pm    Post subject:  

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.
Back to top  
dfelicia



Joined: 30 Jul 2007
Posts: 41

Posted: Wed Jul 30, 2008 8:32 pm    Post subject:  

Quote: 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:

Code:
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
Code:
# 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):
Code:
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.
Back to top  
marcus0263



Joined: 21 Jul 2008
Posts: 77
Location: Seattle

Posted: Wed Jul 30, 2008 8:59 pm    Post subject:  

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?
Back to top  
ArbitraryConstant



Joined: 10 Feb 2007
Posts: 54

Posted: Thu Jul 31, 2008 4:18 pm    Post subject:  

dfelicia wrote: 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 wrote: 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.
Back to top  
 
       Linode.com Forum Forum Index -> General Discussion Goto page 1, 2  Next
Page 1 of 2