Problems with gjournal or something else.

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Oct 31 14:08:21 PDT 2007


On Wed, Oct 31, 2007 at 09:53:07PM +0300, Artem Kuchin wrote:
> First of all, thank you for replying. It is always very nice and informative
> for hear from the actual developer of something. Thank you.
> 
> >>Configure gjournaling on an existing file system, but only if gjournal
> >>allows this (i.e.: if the last sector is not already used by the file
> >>system):
> >>
> >>umount /dev/da0s1d
> >>gjournal label da0s1d da0s1e
> >>tunefs -J enable -n disable 
> >>mount -o async /dev/da0s1d.journal /mnt
> >>mount /dev/da0s1d /mnt
> >>
> >>However, this simple does not work.
> >>gjournal label da0s1d da0s1e - WILL FAIL ON EXISTING FS!
> >
> >Have you read what the warning says? It tells you that the last sector,
> >where it tries to write metadata is used by existing file system. Using
> >-f option will destroy the last sector. You not only decided to
> >overwrite single sector, but 1GB of data, because you didn't give separate
> >provider for journal.
> 
> My point here is that since it is and example of configuring a gjournaling 
> onf
> existing system then this 'gjournal label da0s1d da0s1e' will always fail.

No. It will fail only if your file system is using the last sector. UFS
operates on fragments, so if your disk/slice/partition is not
fragment-aligned it will work.

> Of course it says the warning, but basically, condidering that it overwrites
> last sector+1 GB of data on existing FS there is actual configuring on
> existing FS. It is simply destroying it.  

The example is using separate provider (da0s1e) for the journal, so it
only needs one sector from da0s1d.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20071031/eab1344f/attachment.pgp


More information about the freebsd-current mailing list