From: Christophe C. <chr...@pu...> - 2003-11-13 14:09:30
Attachments:
debian-linux-lib-patch.pl.txt
|
Hi, [ Hope it's the good list to post.. ] quotaon() in the quota module dont always work for kernels <= 2.4.18 It fails (on some Linux) with an error msg like this # quotaon -u /home/ quotaon: Cannot find quota file on /home [/dev/hda7] to turn quotas on/off. Reason is the module tries to use quota v2 (vfsv0, aquota.user), after converting from quota v1 quota.user (convertquota) But there is no vfsv0 support in official kernels < 2.4.19 unless patched (RedHat >= 7.1 or Suse >= 7.2). See quotadoc.sgml in cvs of linuxquota (sourceforge) and ftp://atrey.karlin.mff.cuni.cz/pub/local/jack/quota/v2.4 # uname -r 2.4.18-bf2.4 # quotaon -F vfsv0 -u /home/ quotaon: Required format vfsv0 not supported by kernel. I'm using Debian GNU/Linux 3.0 with std kernel 2.4.18. I've made a patch that uses std quota.user instead of aquota.user for kernels < 2.4.19. Perhaps its not the better way, but at least it works, and should be harmless for later kernels. I also replace the quota version check from v2 to v3, as I think vfsv0 support wasnt there before quotatools v3. Finally, I made '$_[0]' the argument of convertquota instead of '/', which I guess was a typo. The patch if for quota/debian-linux-lib.pl (from webmin 1.121) but the same changes should be applied for quota/linux-lib.pl Feel free to use/modify it (I added too verbose comments), or resolve that issue a better way. Regards, Christophe |
From: Jamie C. <jca...@we...> - 2003-11-17 10:15:53
|
Thanks for the information .. despite all the tricks that the module does to support the various quote versions, it looks like I have missed some! 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? - Jamie Christophe Chisogne wrote: > > Hi, > > [ Hope it's the good list to post.. ] > > quotaon() in the quota module dont always work for kernels <= 2.4.18 > It fails (on some Linux) with an error msg like this > > # quotaon -u /home/ > quotaon: Cannot find quota file on /home [/dev/hda7] to turn quotas on/off. > > Reason is the module tries to use quota v2 (vfsv0, aquota.user), > after converting from quota v1 quota.user (convertquota) > But there is no vfsv0 support in official kernels < 2.4.19 > unless patched (RedHat >= 7.1 or Suse >= 7.2). > See quotadoc.sgml in cvs of linuxquota (sourceforge) > and ftp://atrey.karlin.mff.cuni.cz/pub/local/jack/quota/v2.4 > > # uname -r > 2.4.18-bf2.4 > > # quotaon -F vfsv0 -u /home/ > quotaon: Required format vfsv0 not supported by kernel. > > I'm using Debian GNU/Linux 3.0 with std kernel 2.4.18. > > I've made a patch that uses std quota.user instead of aquota.user > for kernels < 2.4.19. Perhaps its not the better way, but at least > it works, and should be harmless for later kernels. > I also replace the quota version check from v2 to v3, as I think > vfsv0 support wasnt there before quotatools v3. > Finally, I made '$_[0]' the argument of convertquota instead of > '/', which I guess was a typo. > > The patch if for quota/debian-linux-lib.pl (from webmin 1.121) > but the same changes should be applied for quota/linux-lib.pl > Feel free to use/modify it (I added too verbose comments), > or resolve that issue a better way. |
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 |
From: Jamie C. <jca...@we...> - 2003-11-17 21:53:53
|
So is this the third quote format that Linux has used? Because I've seen those aquota.{user,group} files for a while now, certainly long before the 2.4.19 kernel. Would it be correct to say that the old format uses quota.{user,group}, while the two new formats both user aquota.{user,group} ? - Jamie On Mon, 2003-11-17 at 22:25, Christophe Chisogne wrote: > 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 > > > > ------------------------------------------------------- > This SF. Net email is sponsored by: GoToMyPC > GoToMyPC is the fast, easy and secure way to access your computer from > any Web browser or wireless device. Click here to Try it Free! > https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl > - > Forwarded by the Webmin development list at web...@we... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-devel |
From: Christophe C. <chr...@pu...> - 2003-11-18 08:47:57
|
Jamie Cameron wrote: > So is this the third quote format that Linux has used? Because I've seen > those aquota.{user,group} files for a while now, certainly long before > the 2.4.19 kernel. Perhaps I'm wrong, but I think its only the second one, dating back somewhere near the 2.4.13-ac8 kernel http://lists.insecure.org/linux-kernel/2001/Dec/1892.html and backported to the 2.4.0 kernels, ftp://atrey.karlin.mff.cuni.cz/pub/local/jack/quota/v2.4/ On linuxhq.com a search on vfsv0 give results for 2.4.19-rc3-ac2 (23-Jul-2003) http://www.linuxhq.com/kernel/file/fs/quota_v2.c and my std 2.4.18 (without quota patches) doesnt support vfsv0. I dont know more, knowing only the old format until recently. So I would say the vfsv0 (aquota) exists since patched 2.4 kernels, and has been included in official kernel since 2.4.19. > Would it be correct to say that the old format uses quota.{user,group}, > while the two new formats both user aquota.{user,group} ? I cant say more that what I found in the quota-tools doc on sf.net >>This format is called <tt/vfsv0/ in manpages and utilities and >>quotafiles are >> >> usually >> >>called <tt/aquota.user/ and <tt/aquota.group/." I remember seeing a thread on a kernel dev list saying creating a new quota format would require a new filename (I guess new format is vfsv0 and filename is aquota). But I see a post from Jan Kara who wrote vfsv0 patches at suse saying both formats would be supported (backward compat) and included in 2.4 and 2.5 kernels. http://search.luky.org/linux-kernel.2001/msg53249.html From this, I think its a good bet (but not certain) to say the vfsv0 always uses aquota.* files I cant say more, because I'm not a quota guru. Hope it helps, Christophe |