How to quickly determine if UFS2 FS is "clean" from command line?

Sergey Zaharchenko doublef-ctm at yandex.ru
Thu Dec 25 22:54:59 PST 2008


Hello David!

Thu, Dec 25, 2008 at 05:49:56PM -0800 you wrote:

> Would anyone else be interested in a hack to dumpfs(8) in the form
> of a command line flag (e.g., "-s" -- as in "short" or "super block
> only") to tell it to just spit out the FS super block information
> and skip the cylinder group stuff?

Some of the stuff you want can be found here:

root at shark:~# file -s /dev/ufs/home 
/dev/ufs/home: Unix Fast File system [v2] (little-endian) last mounted on /home, volume name home, last written at Fri Dec 26 06:33:07 2008, clean flag 0, readonly flag 0, number of blocks 13631488, number of data blocks 13202246, number of cylinder groups 145, block size 16384, fragment size 2048, average file size 16384, average number of files in dir 64, pending blocks to free 4, pending inodes to free 0, system-wide uuid 0, minimum percentage of free blocks 8, TIME optimization

You probably want the clean flag (which is 0 for me because that device
node is mounted).

HTH,

-- 
DoubleF
No virus detected in this message. Ehrm, wait a minute...
/kernel: pid 56921 (antivirus), uid 32000: exited on signal 9
Oh yes, no virus:)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20081226/aaba2480/attachment.pgp


More information about the freebsd-hackers mailing list