UFS SUJ and fsck questions

Mark Felder feld at feld.me
Fri May 25 13:24:19 UTC 2012


Hi guys,

I'm building out a highly available storage backend with HAST+NFS on UFS.  
So far I've encountered a node going down and the filesystem being dirty,  
so the other side won't mount it automatically. I've resolved this issue  
with the following before the mount:

fsck -C -t ufs -y /dev/hast/${disk}

However, the problem is that on a disk nearly 1TB in size it will take a  
long time to fsck and the failover won't be as smooth. SUJ would fit the  
bill here pretty well. My main issue is not understanding the interaction  
between SUJ and fsck.

If I simply try to mount a fs with SUJ, it will do the SUJ magic if  
necessary and move on. But what if it's damaged beyond what SUJ can handle  
and needs a real fsck? Can I use the same procedure? Will executing `fsck  
-C` against an SUJ enabled filesystem that hasn't run the SUJ journal yet  
do that first and exit if the journal replay was successful? If not, does  
anyone have any ideas on how I can detect that automatically so I can get  
the filesystem mounted cleanly without human intervention?


Thanks!


More information about the freebsd-fs mailing list