gjournal: journaled slices vs. journaled partitions

Volodymyr Kostyrko c.kworr at gmail.com
Tue Nov 4 07:11:25 PST 2008


Carl wrote:
>>> So how do I achieve per-slice journaling instead of per-partition?
>> The docs only says this: "gjournal only supports UFS2". It does not 
>> specifically say that you cannot have per-slice journaling. However, 
>> since you could have other filesystems on your slice, I bet that slice 
>> based journaling is not supported.
> 
> I thought I read somewhere that because gjournal is block based and not 
> really part of the filesystem, that it could easily be extended for any 
> other filesystem. My imagination said that gjournal was probably 
> therefore only temporarily limited to a slice full of UFS partitions. 
> Anyone know for sure?

gjournal needs to know what what data is actually metadata. In case of 
UFS the -J flag given to newfs tells system that using this fs we should 
mark metadata for gjournal use.

>> Another tricky question: why would you journal a SWAP partition?
> 
> Well, I don't really want to, but how big does a partition like /var 
> have to be before it's no longer ill-advised to journal it individually? 
> A fair bit of writing can occur in /var and the scenario my server will 
> occupy has me concerned about inglorious shutdowns.
> 
> What are the actual reasons for why journaling a small partition is 
> considered a bad idea?

Journal needs to bee big enough to amass all modifications. By default 
it's 1G. Just compare this to the size of your /var.

-- 
Sphinx of black quartz judge my vow.



More information about the freebsd-questions mailing list