# Building a gentoo fileserver, need help

## PietdeBoer

Hi Guys,

Im going to build a new gentoo server for my home experimenting.. the server will be running VM's using KVM and needs to have a lot of storage for my media wich will be served using samba and ftp.

I've already bought 4x 2TB WD a while ago and have a chieftec bigtower case large enough to house all the new hardware and keep it cool.

Currelty im evaluating this hardware:

Mobo: ASUS SABERTOOTH 990FX (130 euros)

Proc: AMD FX-8150 8x 3600Mhz (125 euros)

Mem: 2x 	Kingston 8GB DDR3-1333 KTH-PL313/8G (85 euros de piece)

Storage:

Media: 4x 2TB Western digital sata-300 for media, configured in raid5 using mdadm.

OS: 2x SSD configured in raid1 using mdadm

VM: 2x SSD configured in raid1 using mdadm.

Iam still concerned about the use of SSD's in mdadm software raid because i can't find a clear answer to the question if they support the TRIM command yet.

What do you guys think of it?

----------

## KillerHonky

According to this, TRIM with mdadm is only supported in JBOD. Read post #305:

http://forum.notebookreview.com/sony/465962-z-series-ssd-question-raid-trim-concerns-31.html

----------

## krinn

trim or not, SSD are bad media to handle a system that do many write. And gentoo is one.

----------

## NeddySeagoon

PietdeBoer,

Unless you will drive the server hard, with 8G RAM, the system drives will rarely be accessed, applications will get loaded into RAM and stay there, so SSD is a waste.

Further, you can put the operating system onto the storage drives with no noticable drop in performance.

I have a HP Microserver with 8G RAM running 4 KVMs, including a media server. It has 5x2Tb HDD with everything except /boot in LVM. /boot is raid1 on all 5 spindles.

It contains two logical volume sets, one for the bare metal install, the other for the KVMs and my media collection. So far thats 1200 DVDs. I have yet to add music and photos and about another 100 DVD titles.

----------

## krinn

I think you just need a floppy to handle the throuput of samba  :Smile: 

----------

## PietdeBoer

 *krinn wrote:*   

> trim or not, SSD are bad media to handle a system that do many write. And gentoo is one.

 

totally agreed, i realise that i've to do some optimizing on the kvm's.. stuff like noatime, tmpfs will make a big different.

The vm's will run mostly debian based distro's.

Iam now doubting wether it would be better to buy some 15K (raptor) disks and put them in raid1 / 5 for the vm's and maybe use a single SSD for swap.

----------

## NeddySeagoon

PietdeBoer,

You really don't want to be using swap on the bare metal install of a KVM host.

It will swap out the RAM assigned to to your KVMS, which is interesting but a performace killer.

I once ran 6 KVMs assigned 2G RAM each in my 8G Real RAM KVM host.  It all worked, sort of. Overcomitting RAM like that is a bad idea.

Having swap prevents the kernel OOM manager killing a KVM, which would be really ugly - it would be like a power fail for the VM only faster. Think trashed filesystesms.

----------

## PietdeBoer

Still im interested in using SSD's for the kvm storage.. since the server will run several mysql hosts wich require a lot of I/O.

Since i don't trust these ssd's to run alone i would like to put them in raid1 using mdadm.. since the OS can reach the disks directly i should be able to use the TRIM command.. am i wrong here?

----------

## kingfame_147

 *krinn wrote:*   

> trim or not, SSD are bad media to handle a system that do many write. And gentoo is one.

 

I disagree. We are living in 2012 and not 2008. Todays SSDs are fine and can handle a lot of writes. I'm 100% convinced that whatever you do with a modern ssd you will not kill it simply because of to many writes within 2 or 3 years. Okay, "whatever you do" is to mutch :) But a little bit of compiling will not hurt.

I'm using SSDs for 3 years now for gentoo, doing a lot of emerge, compiling, running databases, running vms and all that crap. Speed is the same since I started using the SSDs. Of course that are only some SSDs, but a read a lot of tests from websites/magazines and they seems to have the same oppinion.

If you are really concerned about failing SSDs you could use a SLC SSDs. I'm working for a big storage company and we're using EFDs for quite some time now for whatever workload you like (if you pay ;))

----------

## PietdeBoer

 *kingfame_147 wrote:*   

>  *krinn wrote:*   trim or not, SSD are bad media to handle a system that do many write. And gentoo is one. 
> 
> I disagree. We are living in 2012 and not 2008. Todays SSDs are fine and can handle a lot of writes. I'm 100% convinced that whatever you do with a modern ssd you will not kill it simply because of to many writes within 2 or 3 years. Okay, "whatever you do" is to mutch  But a little bit of compiling will not hurt.
> 
> I'm using SSDs for 3 years now for gentoo, doing a lot of emerge, compiling, running databases, running vms and all that crap. Speed is the same since I started using the SSDs. Of course that are only some SSDs, but a read a lot of tests from websites/magazines and they seems to have the same oppinion.
> ...

 

Totally agreed, the thing is I don't want to spent the big bucks on SLC ssd's.. just build a raid1 volume with two identical SSD's.. the TRIM support is needed to ensure the thing will perform the upcoming few years.

After like 3 years the system will most likely be upgraded with new SSD's or whatever cool and fast storage is out there  :Smile: .

A year ago people started mentioning on the forums that mdadm will support trim on raid1 in the near future.. i can't find it anywhere.. does someone know if they do yet?

----------

## christophe_y2k

Hello, i wan't to tell you my experience with SSD

 i use INTEL SSD (Series X25 on desktop, Series 520 on 1 desktop and 1 server)  for Gentoo system since approx 1 year

and i want to say that work fine, (just add "discard" command on fstab and use ext4 filesystem, before i use discard have one bad sector on my first SSD)

i test the sdd at start and after 8 month and i notice no performance problem

With SSD, Gentoo start run and emerge/compile faster than classic HDD or SATA HDD combined in RAID1 or RAID5)

When you use SSD you can't return on classic HDD ...

In some time i try MDADM raid1 with SSD

and if SSD crash, Intel have excellent warranty service (5years for 520 and 3years for 330)

Sorry for my English but i'm French.

----------

