From: Marc E. Fiuczynski (mef_at_CS.Princeton.EDU)
Date: Wed 25 Aug 2004 - 14:59:14 BST
Looks like the attachments didn't make it through. Folks interested in this
can just send me email and I'll make them available via some other channel.
[mailto:vserver-bounces_at_list.linux-vserver.org]On Behalf Of Marc E.
Sent: Wednesday, August 25, 2004 9:26 AM
Subject: RE: [Vserver] Context disk limits.
>I'm still waiting for some shiny hero, who will
>step forward and code a nice tool to calculate the
>precise number of inodes and blocks for a vserver ...
No shiny hero here. Attached is an updated version of vdu (called vdu-new)
that counts both inodes and diskblocks. It is based on vdu.c from
util-vserver to walk the directory tree. The main change is the handling for
files with hard linkcount > 1. It maintains a table of such files and only
accounts for the diskblock size if it can find all hardlinks. Otherwise, it
only accounts for the inode that are used within the /path/to/vserver.
Here is a simple example:
sudo vdu-new /vserver/v_mef
12966 315544 132251 /vservers/mef
where the numbers are inodes, blocks, and kb.
Hopefully this is useful. Comments and feedback are greatly appreciated!
Vserver mailing list