Re: [Jfs-discussion] JFS and quota on 2.6.17
Dave Kleikamp wrote: > Here's a patch that should fix the problem. I am going to push a patch > to mainline that does this and also reorders the definitions in the > header file to avoid making the same mistake again. Weee :) I'll patch the kernel and test it later today. Thank you very much for quick response. -- Miha - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Jfs-discussion mailing list Jfs-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jfs-discussion
Re: [Jfs-discussion] JFS and quota on 2.6.17
On Wed, 2006-12-06 at 23:27 +0100, Miha Verlic wrote: > >> Are there any special conditions where jfs would set nointegrity flag on > >> partition whitout defining it at mount/remount? > > > > Not that I know of. Playing around with mount -o remount, it looks like > > remounts unexpectedly grab mount options out of /etc/fstab, but I'm > > assuming you don't have it specified there. (Or do you?) > > nope, only noatime,nodiratime,usrquota Doh! I just found the problem: #define JFS_NOINTEGRITY 0x0010 #define JFS_USRQUOTA0x0010 This has been broken since 2.6.14. How embarrassing. I'm not sure why I wasn't able to recreate it. I probably did something stupid. Here's a patch that should fix the problem. I am going to push a patch to mainline that does this and also reorders the definitions in the header file to avoid making the same mistake again. diff -Nurp linux-2.6.18/fs/jfs/jfs_filsys.h linux/fs/jfs/jfs_filsys.h --- linux-2.6.18/fs/jfs/jfs_filsys.h2006-09-19 22:42:06.0 -0500 +++ linux/fs/jfs/jfs_filsys.h 2006-12-06 17:52:24.0 -0600 @@ -30,7 +30,7 @@ * file system option (superblock flag) */ /* mount time flag to disable journaling to disk */ -#define JFS_NOINTEGRITY 0x0010 +#define JFS_NOINTEGRITY 0x0040 /* mount time flags for error handling */ #define JFS_ERR_REMOUNT_RO 0x0002 /* remount read-only */ > > -- > Miha -- David Kleikamp IBM Linux Technology Center - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Jfs-discussion mailing list Jfs-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jfs-discussion
Re: [Jfs-discussion] JFS and quota on 2.6.17
>> Are there any special conditions where jfs would set nointegrity flag on >> partition whitout defining it at mount/remount? > > Not that I know of. Playing around with mount -o remount, it looks like > remounts unexpectedly grab mount options out of /etc/fstab, but I'm > assuming you don't have it specified there. (Or do you?) nope, only noatime,nodiratime,usrquota -- Miha - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Jfs-discussion mailing list Jfs-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jfs-discussion
Re: [Jfs-discussion] JFS and quota on 2.6.17
On Wed, 2006-12-06 at 22:05 +0100, Miha Verlic wrote: > > cat /etc/fstab? Or is this /etc/mtab or /proc/mounts? I wouldn't expect > > /etc/fstab to change. > > Whoops sorry, nasty typo - this was of course /proc/mounts (the box > isn't networked, so I have to improvise). > I tried it on several boxes (all slackware or its derivates) running > 2.6.18 or 2.6.19, with or without grsecurity and I can't set > usrquota+integrity anywhere. > > Are there any special conditions where jfs would set nointegrity flag on > partition whitout defining it at mount/remount? Not that I know of. Playing around with mount -o remount, it looks like remounts unexpectedly grab mount options out of /etc/fstab, but I'm assuming you don't have it specified there. (Or do you?) -- David Kleikamp IBM Linux Technology Center - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Jfs-discussion mailing list Jfs-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jfs-discussion
Re: [Jfs-discussion] JFS and quota on 2.6.17
> cat /etc/fstab? Or is this /etc/mtab or /proc/mounts? I wouldn't expect > /etc/fstab to change. Whoops sorry, nasty typo - this was of course /proc/mounts (the box isn't networked, so I have to improvise). I tried it on several boxes (all slackware or its derivates) running 2.6.18 or 2.6.19, with or without grsecurity and I can't set usrquota+integrity anywhere. Are there any special conditions where jfs would set nointegrity flag on partition whitout defining it at mount/remount? -- Miha - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Jfs-discussion mailing list Jfs-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jfs-discussion
Re: [Jfs-discussion] JFS and quota on 2.6.17
> That is really weird. I haven't seen that. No matter what combination > of mount flags I use, I don't see the nointegrity flag being set. I'm > not running with the grsecurity patch, but I don't see anything there > that should change the behavior. I just tested this on local machine with slightly different distro (64-bit slamd64 with vanilla 2.6.19, instead of 32-bit slackware) and effect is the same: # cat /etc/fstab | grep sda1 /dev/sda1 /boot jfs rw 0 0 # mount -o remount,usrquota /boot # cat /etc/fstab | grep sda1 /dev/sda1 /boot jfs rw,nointegrity,usrquota 0 0 # mount -o remount,usrquota,integrity /boot # cat /etc/fstab | grep sda1 /dev/sda1 /boot jfs rw 0 0 # mount -o remount,integrity,usrquota /boot # cat /etc/fstab | grep sda1 /dev/sda1 /boot jfs rw,nointegrity,usrquota 0 0 I've got "JFS filesysetm support" and "JFS statistics" hardcoded into kernel, POSIX acl, security labels and debugging are not selected. > Keep me informed on what you find out. I'd like to figure out what's > happening here. Will do. -- Miha - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Jfs-discussion mailing list Jfs-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jfs-discussion
Re: [Jfs-discussion] JFS and quota on 2.6.17
On Wed, 2006-12-06 at 07:52 +0100, Miha Verlic wrote: > > No, they aren't related at all. It looks like usrquota gets cleared on > > any remount. It's not limited to jfs either. I see the same thing on > > ext4. I don't know if this is a known behavior or not. You can > > probably guess that I don't use quotas very much. > > Hm, I'm also pretty sure I tried -o remount,usrquota,integrity but it > didn't work... (can't remember exactly what happened, I'll try to retest > it somewhere) > > > Misleading really. The kernel doesn't really do anything with the quota > > flags. The quota tools use the presence of the flags to know when to > > enable or disable quotas. I copied the man-page text from ext2/3 a long > > time ago. > > So if I enforce quota on partition without usrquota flag (which has > integrity flag) quota should work here? The quotaon command depends on seeing the usrquota flag, so I'm not sure how you would enforce quotas without the flag. > >> I'm pretty sure I did a "mount -o remount,usrquota" on another machine > >> some time before and it didn't crash, however it also added nointegrity > >> flag along with usrquota. > > > > nointegrity is generally not a good idea. > > I know, that's why I'm trying to have both usrquota + integrity, but > apparently they don't play along - when I set usrquota it also sets > nointegrity along with it :( That is really weird. I haven't seen that. No matter what combination of mount flags I use, I don't see the nointegrity flag being set. I'm not running with the grsecurity patch, but I don't see anything there that should change the behavior. > > Not really. I can try stressing the file system and issuing remounts to > > see if I can recreate anything like it. > > Thanks, I'll try to test some things, but it's a bit annoying, since > this particular server is on colocation quite far away :/ Keep me informed on what you find out. I'd like to figure out what's happening here. -- David Kleikamp IBM Linux Technology Center - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Jfs-discussion mailing list Jfs-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jfs-discussion
Re: [Jfs-discussion] JFS and quota on 2.6.17
> No, they aren't related at all. It looks like usrquota gets cleared on > any remount. It's not limited to jfs either. I see the same thing on > ext4. I don't know if this is a known behavior or not. You can > probably guess that I don't use quotas very much. Hm, I'm also pretty sure I tried -o remount,usrquota,integrity but it didn't work... (can't remember exactly what happened, I'll try to retest it somewhere) > Misleading really. The kernel doesn't really do anything with the quota > flags. The quota tools use the presence of the flags to know when to > enable or disable quotas. I copied the man-page text from ext2/3 a long > time ago. So if I enforce quota on partition without usrquota flag (which has integrity flag) quota should work here? >> I'm pretty sure I did a "mount -o remount,usrquota" on another machine >> some time before and it didn't crash, however it also added nointegrity >> flag along with usrquota. > > nointegrity is generally not a good idea. I know, that's why I'm trying to have both usrquota + integrity, but apparently they don't play along - when I set usrquota it also sets nointegrity along with it :( > Not really. I can try stressing the file system and issuing remounts to > see if I can recreate anything like it. Thanks, I'll try to test some things, but it's a bit annoying, since this particular server is on colocation quite far away :/ -- Miha - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Jfs-discussion mailing list Jfs-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jfs-discussion
Re: [Jfs-discussion] JFS and quota on 2.6.17
On Tue, 2006-12-05 at 21:49 +0100, Miha Verlic wrote: > > It was broken for a while, but fixed in 2.6.18. > > hm... this should be mini quota subquestion, but I just might > encountered a bug: > > ~# cat /etc/fstab | grep md7 > /dev/md7 /home/users jfs > defaults,noatime,nodiratime,nosuid,noexec,usrquota 1 2 > > ~# cat /proc/mounts | grep md7 > /dev/md7 /home/users jfs > rw,nosuid,noexec,noatime,nodiratime,nointegrity,usrquota 0 0 > > ~# mount -o remount,integrity /home/users > > ~# cat /proc/mounts | grep md7 > /dev/md7 /home/users jfs rw,nosuid,noexec,noatime,nodiratime 0 0 > > > Are usrquota and integrity flags mutually exclusive? No, they aren't related at all. It looks like usrquota gets cleared on any remount. It's not limited to jfs either. I see the same thing on ext4. I don't know if this is a known behavior or not. You can probably guess that I don't use quotas very much. > Also, man page for mount says: > >Mount options for jfs > > noquota / quota / usrquota / grpquota > > These options are accepted but ignored. > > So what's the deal with this? Old data? :) Misleading really. The kernel doesn't really do anything with the quota flags. The quota tools use the presence of the flags to know when to enable or disable quotas. I copied the man-page text from ext2/3 a long time ago. > and now the funny part :/ Hmm. This is new. :-( > -- > ~]# mount -o remount,usrquota /home/users > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: stack segment: [#1] > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: SMP > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: CPU:0 > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: EIP is at txBeginAnon+0x20/0x165 > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: eax: c0c13758 ebx: 0002356c ecx: edx: 0001 > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: esi: edi: d3cad2cc ebp: esp: c5563bd4 > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: ds: 0068 es: 0068 ss: 0068 > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: Process httpd (pid: 4671, ti=c5562000 task=d46cd030 > task.ti=c5562000) > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: Stack: 0297 001b1baa f7901654 f7901668 d62bb8d8 > cf05f8a4 001cb0c9 f7901640 > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel:cf05f8a4 d1c94500 d62bb8d8 da97e080 > 001cb4b6 cf05f8a4 > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel:da97e080 0002356c d3cad2cc f7f7cbc0 > 000d6860 00036da6 > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: Call Trace: > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: Code: 01 83 c4 50 89 f0 5b 5e 5f 5d c3 55 57 56 53 83 ec > 44 8b 80 60 01 00 00 8b 68 18 b8 58 37 c1 c0 e8 a7 14 12 00 ff 05 b0 8f > c8 c0 <8b> 45 28 a8 04 75 11 8b 45 28 c1 e8 03 89 c2 83 e2 01 0f 84 80 > > Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... > server kernel: EIP: [<000da67b>] txBeginAnon+0x20/0x165 SS:ESP 0068:c5563bd4 > -- > > > I'm pretty sure I did a "mount -o remount,usrquota" on another machine > some time before and it didn't crash, however it also added nointegrity > flag along with usrquota. nointegrity is generally not a good idea. > The crash happened on P4 3ghz (HT) with 1gb ram, kernel 2.6.18.3 with > grsecurity patch, glibc 2.3.6 (nptl), gcc 3.3.6. Apache (with quite > heavy traffic ~10mbit/s) was running at time of remount command. > > Any clues? Not really. I can try stressing the file system and issuing remounts to see if I can recreate anything like it. > -- > Miha Shaggy -- David Kleikamp IBM Linux Technology Center - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Jfs-discussion mailing list Jfs-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jfs-discussion
Re: [Jfs-discussion] JFS and quota on 2.6.17
> It was broken for a while, but fixed in 2.6.18. hm... this should be mini quota subquestion, but I just might encountered a bug: ~# cat /etc/fstab | grep md7 /dev/md7 /home/users jfs defaults,noatime,nodiratime,nosuid,noexec,usrquota 1 2 ~# cat /proc/mounts | grep md7 /dev/md7 /home/users jfs rw,nosuid,noexec,noatime,nodiratime,nointegrity,usrquota 0 0 ~# mount -o remount,integrity /home/users ~# cat /proc/mounts | grep md7 /dev/md7 /home/users jfs rw,nosuid,noexec,noatime,nodiratime 0 0 Are usrquota and integrity flags mutually exclusive? Also, man page for mount says: >Mount options for jfs > noquota / quota / usrquota / grpquota > These options are accepted but ignored. So what's the deal with this? Old data? :) and now the funny part :/ -- ~]# mount -o remount,usrquota /home/users Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: stack segment: [#1] Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: SMP Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: CPU:0 Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: EIP is at txBeginAnon+0x20/0x165 Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: eax: c0c13758 ebx: 0002356c ecx: edx: 0001 Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: esi: edi: d3cad2cc ebp: esp: c5563bd4 Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: ds: 0068 es: 0068 ss: 0068 Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: Process httpd (pid: 4671, ti=c5562000 task=d46cd030 task.ti=c5562000) Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: Stack: 0297 001b1baa f7901654 f7901668 d62bb8d8 cf05f8a4 001cb0c9 f7901640 Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel:cf05f8a4 d1c94500 d62bb8d8 da97e080 001cb4b6 cf05f8a4 Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel:da97e080 0002356c d3cad2cc f7f7cbc0 000d6860 00036da6 Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: Call Trace: Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: Code: 01 83 c4 50 89 f0 5b 5e 5f 5d c3 55 57 56 53 83 ec 44 8b 80 60 01 00 00 8b 68 18 b8 58 37 c1 c0 e8 a7 14 12 00 ff 05 b0 8f c8 c0 <8b> 45 28 a8 04 75 11 8b 45 28 c1 e8 03 89 c2 83 e2 01 0f 84 80 Message from [EMAIL PROTECTED] at Tue Dec 5 21:34:54 2006 ... server kernel: EIP: [<000da67b>] txBeginAnon+0x20/0x165 SS:ESP 0068:c5563bd4 -- I'm pretty sure I did a "mount -o remount,usrquota" on another machine some time before and it didn't crash, however it also added nointegrity flag along with usrquota. The crash happened on P4 3ghz (HT) with 1gb ram, kernel 2.6.18.3 with grsecurity patch, glibc 2.3.6 (nptl), gcc 3.3.6. Apache (with quite heavy traffic ~10mbit/s) was running at time of remount command. Any clues? -- Miha - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Jfs-discussion mailing list Jfs-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jfs-discussion
Re: [Jfs-discussion] JFS and quota on 2.6.17
On Sun, 2006-12-03 at 02:08 +, Jonathan Miles wrote: > Hi all, > > What's the status of quota and JFS in the Linux kernel? It was broken for a while, but fixed in 2.6.18. > I tried to setup quota with JFS for the first time today, but can't seem > to get it working with 2.6.17 and quotautils 3.13. The partition is > mounted as / with {usr,grp}quota options and the quota files have been > created. > > # mount > /dev/sda2 on / type jfs (rw,usrquota,grpquota,errors=remount-ro) > > When running quotaon, I get the following: > > # quotaon / > quotaon: using //aquota.group on /dev/sda2 [/]: Invalid argument > quotaon: Maybe create new quota files with quotacheck(8)? > quotaon: using //aquota.user on /dev/sda2 [/]: Invalid argument > quotaon: Maybe create new quota files with quotacheck(8)? This problem was reported here: http://bugzilla.kernel.org/show_bug.cgi?id=6872 and it's fixed in the 2.6.18 kernel. > open("//aquota.user", O_RDONLY|O_LARGEFILE) = 3 > ... > quotactl( >Q_QUOTAON|USRQUOTA, >"/dev/sda2", >2, >{ > 7022360269181497135, 4971974479945364782, 244813135896, > 701898877744431, 7809632559044715890, 7021225542849146213, > 6076814323885239139, 4064063760383880518 >} > ) = -1 EINVAL (Invalid argument) > > I checked the quotautils code and it has JFS support compiled in, but > don't know the kernel code well enough to check what's going on there. > > Any ideas? > > Regards, > > Jon. Thanks, Shaggy -- David Kleikamp IBM Linux Technology Center - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Jfs-discussion mailing list Jfs-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jfs-discussion