Take the 2-minute tour ×

We have one server that was upgraded via buildworld etc. from FreeBSD 6.4 to 7.2. As you know one of the best new features in 7.* freebsd's branch is gjournal, but it seems to me that it is impossible to turn it on on already formatted disk. Am I wrong ? And if it's so how to enable journalling on running system (i.e. without disk reformatting, reboot is ok)

share|improve this question
add comment

2 Answers

You can do it if one of following conditions is true:

  1. You have big idle partition (swap or tmp) that you can cut into 2 pieces
  2. You have some free space left on hard drive

Then using official manual you can setup journaling.

share|improve this answer
add comment

It is possible.

The second example in the gjournal man page explains how to do this (the one starting with "umount /dev/da0s1d"). You will need a free device to designate as your journal provider (the 2nd device passed to the gjournal command). As suggested by someone else, /tmp or the swap device are good candidates to reclaim.

If you're in a pinch and short on free devices, you could reclaim the swap device and then use a swap file on a device with sufficient free space.

Be mindful of the journal size (explained in the "official manual" link provided by someone else here), since gjournal can cause the machine to panic under heavy load if the journal is not large enough.

If this a production server, I highly recommend that you stage this on a test machine so you'll know what to expect under load and how it behaves during a boot after an unclean shutdown.

share|improve this answer
add comment

Your Answer


