Gjournal

From TykWiki
Revision as of 14:17, 22 February 2009 by Tykling (talk | contribs) (New page: * http://www.freebsd.org/doc/en/books/handbook/geom-gjournal.html * http://www.freebsd.org/cgi/man.cgi?query=gjournal&sektion=8 * http://www.manpages.info/freebsd/newfs.8.html * http://www...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Journaling system partitions on the boot disk

Sysinstall doesn't currently have a way to install FreeBSD to a journaled device. You will need to create extra partitions to contain the journals in the partitioning part of the sysinstall process. The handbook does not recommend journaling small file systems, so /usr and /var are candidates for journaling on a default partition scheme. The recommended approach is to create extra swap partitions to contain the journals in sysinstall, and after the installation is completed to remove the extra swap partitions from /etc/fstab so they won't be used for swap, and reboot. You need one journal partition per partition you want journaling enabled on, so in the default case two extra swap partitions should be created. The size depends on the expected load on the file system, not the size of the file system. A very busy file system needs to have a journal 3.3x the size of available system memory. More on journal sizes [here]. So, step by step:

  1. Install FreeBSD as you normally would, but create an extra swap partition per partition you want journaled. After the install remove the extra swap partitions from fstab.
  2. Use the following approach for each partition you want journaled, substituting the device names for your own of course. In this example from [the gjournal man page] the data partition is ad0s1d and the journal partition is da0s1e
	   gjournal label da0s1d da0s1e && \
	       tunefs -J enable -n disable da01sd.journal && \
	       mount -o async /dev/da0s1d.journal /mnt || \
	       mount /dev/da0s1d /mnt