Journaling UFS with gjournal.

Peter Jeremy peterjeremy at optushome.com.au
Fri Jun 23 19:49:26 UTC 2006


On Fri, 2006-Jun-23 01:38:38 -0700, R. B. Riddick wrote:
>--- Alexandr Kovalenko <never at nevermind.kiev.ua> wrote:
>> Is it safe to do so on existing filesystem (if I'm using 2nd partition for
>> journal)?
...
>If your existing file system needs its last sector, then it wont work. If it
>does not need it, then it might work (although fsck does not check for a
>raw-device shrinkage - I think)...

In my experience, the last partition in a disk slice normally has an
odd number of sectors and UFS definitely can't handle anything smaller
than a fragment (which defaults to 2K) - and I suspect that UFS can't
handle a trailing fragment.  In this case, the last sector is
definitely unused.

I may be wrong but I don't think it's possible for the last sector of
a partition to be FS metadata because the metadata is always at the
beginning of a CG and newfs won't create a CG unless there's some
space for data in the CG.  If there are an integral number of
fragments (or maybe blocks), then marking the last fragment as 'bad'
would seem an adequate solution - the FS will ignore that block but
anything below the filesystem won't see the "bad block" marker.

-- 
Peter Jeremy
-------------- 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-fs/attachments/20060623/21a6cc99/attachment.pgp


More information about the freebsd-fs mailing list