From: Christophe C. <chr...@pu...> - 2003-11-17 11:26:06
|
Jamie Cameron wrote: > However, oddly I can enable quotas with no problems on my Redhat 9 box > with the 2.4.20 kernel. Any ideas why that might be? Yes, the 'bug' is about kernel support for new quota format (ie vfsv0, format of aquota.{usr,group} files) RH supports the new quota format since 7.1 (std kernel + patch), and std 2.4.20 kernel natively includes vsfv0 quota support (without patches). Support for new vfsv0 quota format in kernel seems to be included - in std kernel >= 2.4.19 (not 2.4.18) - in patched kernels since RedHat >= 7.1 and Suse >= 7.2 - in some patched 2.4.x kernels (apparently since 2.4.0) From sgml doc of the quota-tools http://cvs.sourceforge.net/viewcvs.py/*checkout*/linuxquota/quota-tools/doc/quotadoc.sgml?content-type=text%2Fplain&rev=1.2 "<sect1>V0 quota format <p> This quota format is currently used in -ac series of kernels and also in new kernels distributed by RedHat (>= 7.1) and SuSE (>= 7.2). There are also patches for standard 2.4 kernels which implement this format. You can download them at <tt>ftp://atrey.karlin.mff.cuni.cz/pub/local/jack/quota/v2.4/</tt>. This format is called <tt/vfsv0/ in manpages and utilities and quotafiles are usually called <tt/aquota.user/ and <tt/aquota.group/." In my case, Debian GNU/Linux 3.O (aka woody), kernel included is 2.4.18 without quota patches, so no vfsv0 kernel support. Solution is to use a patch like mine, or compile/install a new kernel. The ideal patch should be able to check if running kernel has vfsv0 support or not, but I dont see how this can be done. My patch is egocentric: with kernels < 2.4.19, the old format is used. But for distributions that use kernels < 2.4.19 and quota patches (like RH >=7.1), old format would be used because of my path, even if new one is supported and should be used (ex using quotas on a reiserfs filesystem requires vfsv0 quota format). I think the better solution is a new option in quota module, which ask the quota format to use: - old (quota.user, quota.group) - new vfsv0 (aquota.user, aquota.group) with a doc saying vfsv0 may require std kernel >= 2.4.19 and default value set according os running (ie old for debian 3.0, vfsv0 for RH >=7.1, etc) What do you think? >> I also replace the quota version check from v2 to v3, as I think >> vfsv0 support wasnt there before quotatools v3. I'm not certain about this, but the quota-tools doc (link abose) says "As of version 3.01 quota utilities support original, vfsv0 and xfs quota format." So the check for quotatools version in the quota module seem wrong to me. >> Finally, I made '$_[0]' the argument of convertquota instead of >> '/', which I guess was a typo. Is it correct or am I wrong on this ? Christophe |