SUJ doesn't work with GELI?

Boris Kochergin spawk at acm.poly.edu
Wed Dec 29 19:48:04 UTC 2010


Ahoy. I'm having trouble enabling SUJ on a UFS filesystem that lives on 
top of a GELI device. The system is an i386 -CURRENT build from December 
24th. I first noticed the problem when it happened with an actual disk, 
but here is an example with a memory disk for ease of reproduction:

root at t42 /root # dd if=/dev/zero of=file bs=1m count=500
500+0 records in
500+0 records out
524288000 bytes transferred in 29.282385 secs (17904553 bytes/sec)
root at t42 /root # mdconfig -a -t vnode -f file
md1
root at t42 /root # dd if=/dev/random of=key bs=64 count=1
1+0 records in
1+0 records out
64 bytes transferred in 0.000082 secs (780336 bytes/sec)
root at t42 /root # geli init -s 4096 -K key /dev/md1
Enter new passphrase:
Reenter new passphrase:

Metadata backup can be found in /var/backups/md1.eli and
can be restored with the following command:

         # geli restore /var/backups/md1.eli /dev/md1

root at t42 /root # geli attach -k key /dev/md1
Enter passphrase:
root at t42 /root # newfs /dev/md1.eli
/dev/md1.eli: 500.0MB (1023992 sectors) block size 16384, fragment size 4096
         using 4 cylinder groups of 125.00MB, 8000 blks, 8000 inodes.
super-block backups (for fsck -b #) at:
  160, 256160, 512160, 768160
root at t42 /root # fsck_ufs -y /dev/md1.eli
** /dev/md1.eli
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 2 used, 125944 free (12 frags, 31483 blocks, 0.0% fragmentation)

***** FILE SYSTEM IS CLEAN *****
tunefs -root at t42 /root # tunefs -j enable /dev/md1.eli
Using inode 4 in cg 0 for 4194304 byte journal
tunefs: Failed to read dir block: Invalid argument
tunefs: soft updates journaling can not be enabled

If I take GELI out of the picture, it works:

root at t42 /root # newfs /dev/md1
/dev/md1: 500.0MB (1024000 sectors) block size 16384, fragment size 2048
         using 4 cylinder groups of 125.02MB, 8001 blks, 16064 inodes.
super-block backups (for fsck -b #) at:
  160, 256192, 512224, 768256
root at t42 /root # fsck_ufs -y /dev/md1
** /dev/md1
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 2 used, 247861 free (21 frags, 30980 blocks, 0.0% fragmentation)

***** FILE SYSTEM IS CLEAN *****
root at t42 /root # tunefs -j enable /dev/md1
Using inode 4 in cg 0 for 4194304 byte journal
tunefs: soft updates journaling set

Thoughts?

-Boris


More information about the freebsd-fs mailing list