Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2008 09:08:43 +0300
From:      Andrei Kolu <antik@bsd.ee>
To:        "fluffles.net" <bsd@fluffles.net>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: gjournal misconfiguration
Message-ID:  <48D7366B.5090004@bsd.ee>
In-Reply-To: <48D5C389.6040209@fluffles.net>
References:  <200805201423.56220.antik@bsd.ee> <4832D989.60607@quip.cz> <200805211121.53354.antik@bsd.ee> <48D5C389.6040209@fluffles.net>

next in thread | previous in thread | raw e-mail | index | archive | help
fluffles.net wrote:
> Andrei Kolu wrote:
>   
>>>> I created geom journal according to this documentation:
>>>> http://www.freebsd.org/doc/en/books/handbook/geom-gjournal.html
>>>>
>>>> I already had partition on second drive (da1s1d)
>>>>       
>>>>         
>
>   
>> to me: /dev/da1s1d.journal == /dev/da1s1.journald 
>>
>> does it make any sense?
>>   
>>     
>
> Hi Andrei!
>
> After some puzzling i realised that your issues with two names for your
> journal can actually make sense. If my theory is correct, the last
> sector of da1s1d and da1s1 are the same physical location on disk.
> Meaning that the d-parition covers the whole /dev/da1s1 device without
> leaving space for the metasector geom_journal needs. You then created a
> gjournal on it, warning you of an existing filesystem. You may have
> thought "i don't need this filesystem anymore" and disregarded the
> warning. The journal works, but now *two* journals are detected: one on
> the da1s1 device and one on the da1s1d device, since they both point to
> the same physical location where gjournal stores its data. So your
> problem is - i think - actually a partitioning problem, causing unwanted
> behavior.
>
> If you want to use BSD partitions or disklabels (a,d,e,f suffix) you
> should have labeled /dev/da1s1.journal and NOT /dev/da1s1 which you
> probably did. I guess you first created /dev/da1s1, then created bsd
> partitions on it and got /dev/da1s1d and then created a geom_journal on
> /dev/da1s1d. Geoms work like a container in a container. The
> /dev/da1s1.journal device (when used with seperate journal storage) is
> one sector smaller than the underlying /dev/da1s1 device. This keeps the
> metadata seperate, you can stack geom modules on top of eachother. In
> your procedure, you have 'violated' the sovereignty of the /dev/da1s1d
> device probably when you created this d-label, which points to the same
> last sector as /dev/da1s1. To use journaling on /dev/da1s1d, you should
> have made /dev/da1s1d at least one sector smaller, when using "bsdlabel
> -e /dev/da1s1". Then you would have had no problems, only a little lower
> performance due to stripe misalignment.
>
>   
I made da1s1d with sysinstall- I'd expect sysinstall to behave not 
create such a mess. Then:

# gjournal label -f /dev/da1s1d
# gjournal load
# newfs -O 2 -J /dev/da1s1d.journal
# mount /dev/da1s1d.journal /data

Those are exact steps I made, according to this manual: http://www.freebsd.org/doc/en/books/handbook/geom-gjournal.html

The real question is: Why it worked from command line without any 
warning message but failed after reboot and changed journaled filesystem 
labels? Do we need this .journal extension at all? For example we can 
live with softupdates without separate /dev/ad4s1a.softupdates name 
extension.

> You can't do this procedure if this is your system disk, ofcourse. I
> assume it is not.
>
>   
I wonder if I use swap space for journaling how does journaling 
information survive raw swap operations? IIRC then NTFS filesystem 
stores journaling information in a middle of partition for faster access 
and can survive harsh conditions- current FreeBSD last sector usage is a 
bit problematic. Have anyone tried journaling on geom mirror?

Andrei



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48D7366B.5090004>