Geom_Raid5 best practices ?

Miroslav Lachman 000.fbsd at
Sun Mar 23 11:35:38 UTC 2008

Arnaud Houdelette wrote:
> I use geom_raid5 for my home NAS for  nearly 1 year.
> No problems so far (but just the fact I had to patch ata-disk.c to 
> modify the IO timeout in order to be able to use ataidle).
> Since I updated to 7.0-RELEASE, I was wondering if I should use gjournal 
> on the raid5 array.
> The array's purpose is to store music (2-10 MB) and video (300MB to 8GB) 
> files.
> My system is as it follow :
> - USB key for base system (power/sound efficient)
> - 120 GB Pata disk  for temporary downloads, /usr/src, ports and obj
> - 4x250 GB sata disks for mass storage (so 750GB usable space).
> I currently use plain UFS+SU on every FS, and daily snapshots on the 
> raid5 one.
> GJournal should protect the raid5 UFS from destruction by bad power 
> failures/kernel crashes, but with what performance impact ? Is the risk 
> of complete FS crash really important with only SU ? (loss of data 
> written at the time of the crash is no big deal, nor waiting for a fsck 
> to complete, as long as I can recover most of the data previously stored)
> But as the gjournal first introduction showed a big performance drop on 
> big files (they apparently have to be written twice), I was really 
> wondering if I should use a journal on the file system ?
> If so, where should I put the journal on, and wich journal size should I 
> use ?

I am not too experienced with gjournal, I think the best way for you is 
gjrounaled RAID5 (data) and journal on another disk (your 120GB) with 
size calculated from RAID5 write throughput and 
kern.geom.journal.switch_time (10 seconds by default) plus some reserve.
(place journal partition in start of the disk for better throughput)
This settup will give you the best performance you can achieve with 

Miroslav Lachman

More information about the freebsd-geom mailing list