Gjournal on top of Gmirror: bsdlabel on a gjournal provider?

After a lot of googling I found a few notes on mailinglists that putting bsdlabels on a gjournal provider is bad, but I never found why exactly.

Can this be done safely?

The reason I'm asking this is that I want to create a mirrored (gmirror) drive setup where everything that can be journaled is in fact journaled, without having to create a journal for every partition I have, and without any need for a gmirror sync after a crash/outage. A gmirror sync would still be needed when some part of the disk is not journaled, so that's not an option.

So I tried it out by doing this on two 500 GB disks (ad4 and ad6):

- Label ad4 as a mirror/gm0 entire-disk mirror.
- Insert ad6 into the mirror.

- Initialize mirror/gm0 as a combined gjournal data+journal, creating /dev/mirror/gm0.journal as the usable disk space.

- Place bsdlabels on /dev/mirror/gm0.journal for my /, /usr, /var, /tmp and /data filesystems, creating /dev/mirror/gm0.journala, /dev/mirror/gm0.journald and so on, making sure it also installs the bootstrap code.

Et voila, it actually seems to work. There are no PC-style slices since it will never get touched by a non-FreeBSD system anyway, and after a lot of reset tests under heavy disk load it always shows the journals as consistent and mounts the jourbnala/journald/etc partitions on boot correctly.

I'm using FreeBSD 7.1-RELEASE-p5 for this atm.
Is this really a safe say of using the gmirror+gjournal combo to prevent gmirror syncs, or am I really required to chop up the disk for a lot of journals?

By the way: /dev/mirror/gm0.journalb is the swap partition, as far as I know this is not getting journaled at all in this setup because it misses the UFS gjournal hooks. Is this correct?
 
btw: I formatted the journala, journald devices using the newfs -J option to make use of the UFS gjournal functionality.
 
Back
Top