Booting a disk with gmirror and gjournal

Patrick Bihan-Faou freebsd-fs at mindstep.com
Tue Jun 3 09:13:09 UTC 2008


Jeremy Chadwick a écrit :
> On Tue, Jun 03, 2008 at 09:23:29AM +0200, Patrick Bihan-Faou wrote:
>   
>> Hi,
>>
>> I am trying to setup a system with one gjournal'ed partition mirrored on 
>> two disks using FreeBSD 6.3, and it does not work...
>>
>> Here is what I have routinely done so far:
>>
>> one partition, no journal, mirrored disks => I can have a working system.
>> one partition, no mirror, journal => everything is ok
>>
>> but as soon as I try combine both gjournal and gmirror, I get stuck: once 
>> the system boots I get stuck at the F1 prompt and things do go any further.
>>
>>
>> Could anybody help me with this ?
>>
>> Patrick.
>>     
>
> As far as I know, FreeBSD's bootloader doesn't understand how to handle
> such things.
>
>   
Actually, the bootloader copes just fine with such a setup. I just 
didn't do things in the right order.

Here is how I managed to get it going:


# gmirror label -h gm0 ad0
# fdisk -I -B -v /dev/mirror/gm0
# bsdlabel -r -w /dev/mirror/gm0s1 auto

# bsdlabel /dev/mirror/gm0s1 > bsdlabel.file

... edit the label to create one single a partition (and/or whatever 
ones need)

# bsdlabel -R -B /dev/mirror/gm0s1 bsdlabel.file


# gjournal label -f /dev/mirror/gm0s1a

# newfs -L 'boothd' -J /dev/mirror/gm0s1a.journal

... on now install freebsd on /dev/mirror/gm0s1a.journal or /dev/ufs/boothd

Sorry for the noise, my problem was due to not doing things in the right 
order.


Patrick.


More information about the freebsd-fs mailing list