DragonFly BSD
DragonFly users List (threaded) for 2011-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

VFS-accounting branch available for testing


From: Francois Tigeot <ftigeot@xxxxxxxxxxxx>
Date: Thu, 1 Dec 2011 21:57:01 +0100

Hi,

Since last summer, I have been working on a vfs accounting subsystem in
my spare time.

The idea comes from an old Summer of Code proposal to implement
filesystem-agnostic quota support:

https://gist.github.com/846391

The vfs-accounting branch is not a quota implementation (yet). All it does
is count bytes used on the different mounted filesystems.

There is a global counter per mount point, as well as uid and gid-specific
ones.

The code is visible here:
http://gitweb.dragonflybsd.org/~ftigeot/dragonfly.git/shortlog/refs/heads/vfs-accounting

You can check it out locally by running the following commands:

  git remote add leaf git://leaf.dragonflybsd.org/~ftigeot/dragonfly.git
  git branch vfs-accounting leaf/vfs-accounting
  git checkout vfs-accounting

After a complete world + kernel build sequence, you'll be able to use a new
vquota(8) utility to see and manipulate the kernel counters

Some of the interesting commands are:

  vquota lsfs
  => shows the mount points with vfs accounting enabled

  vquota show /mount/point
  => returns a list of space used by uid and gid on a mounted filesystem

  vquota check /directory/name
  => scans a directory for real filesystem usage

  vquota sync /mount/point
  => scans the mounted filesystem for its real usage and initializes the
  in-kernel counters to the right values

The counters are not persistent between reboots; they are initialized to 0 at
startup; vquota sync has to be run first to get meaningful results on
persistent filesystems.

Enjoy!

-- 
Francois Tigeot



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]