From: Miguel Subject: Re: "df -i" support Date: Fri, 14 May 2004 19:40:40 +0200 Message-ID: <20040514194040.22389128.turtle.power@wanadoo.es> References: <20040513093432.52d3d7a3.turtle.power@wanadoo.es> <1084439945.14090.6209.camel@tribesman.namesys.com> <20040514173227.5b0541b5.turtle.power@wanadoo.es> <200405141655.i4EGtrAT007250@turing-police.cc.vt.edu> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Return-path: list-help: list-unsubscribe: list-post: Errors-To: flx@namesys.com In-Reply-To: <200405141655.i4EGtrAT007250@turing-police.cc.vt.edu> List-Id: Content-Type: text/plain; charset="iso-8859-1" To: Valdis.Kletnieks@vt.edu Cc: Vladimir Saveliev , reiserfs-list@namesys.com On Fri, 14 May 2004 12:55:53 -0400 Valdis.Kletnieks@vt.edu wrote: > On Fri, 14 May 2004 17:32:27 +0200, Miguel said: >=20 > > We are migrating our mtas from ext3 to reiserfs and the > > monitorization(a plugin) relies on the output of df -i, this output > > is very diferent between those filesystems, because reiserfs always > > return -1 as a total number of inodes. >=20 > The only reason you care about df -i is because on ext[23] and > similar, it is possible to run out of inodes before you run out of > files. Since reiserfs allocates inodes as needed, you can't run out > of them unless you run out of space - in which case your monitoring > system should be flagging that. No, we check this value to know how many files are in that partition (well an aproximation). I hope that this is true for ext2/3, isn't? >=20 > So just fix your code to say '-1 means unlimited', or if that's too > complicated make it say: >=20 > if (value =3D=3D -1) { value =3D 2147483648; } >=20 > which won't be right but should make your scripts act correctly. df -i on a 2.4.x kernel already returns (2^32 - 1) free inodes. probably kernel return -1 but df "get" this as a non-signed value. Here's an example sda1 is an ext3 partition an sdb1 is reiserfs formatted: Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda1 4480448 132216 4348232 3% / /dev/sdb1 4294967295 0 4294967295 0% /var/spool/postfix scripts return about 132000 files in / and 0 files in the other filesystem --=20 La resistencia es f=FAtil todos ser=E9is asimilados