Bug 66753 - quota does not display disk quota for user when using RAID1 disk arrays
quota does not display disk quota for user when using RAID1 disk arrays
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: quota (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Copeland
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-14 19:19 EDT by Daryle Niedermayer
Modified: 2007-04-18 12:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-06-15 10:46:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daryle Niedermayer 2002-06-14 19:19:49 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (Windows NT 5.0; U)

Description of problem:
When using quota quota-3.03-1.i386.rpm (or version 2.94) on a RAID1 system, a root user gets proper quota reporting on a user, but when the 
user 
uses the quota command to report on their own quota, no disk quotas are reported.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Install quotas on a filesystem that is mirrored across two physical drives.
2. Apply quotas to a user on the system
3. From a root shell, use `quota -v $user` to see the user's quota.
4. From a user's shell, use `quota -v` to see the user's own quota. No quota is reported
	

Actual Results:  [root@server root]# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/md6                497765     70353    401713  15% /
/dev/md7                 46537      6268     37866  15% /boot
none                    155768         0    155768   0% /dev/shm
/dev/md4               1509936     32944   1400288   3% /tmp
/dev/md2               2015952   1323508    590036  70% /usr
/dev/md5               1209496     78688   1069368   7% /var
/dev/md0               5036160     32868   4747468   1% /www
/dev/md3               2015952     32840   1880704   2% /var/spool/mail
/dev/md8               2015952     32836   1880708   2% /ftp
/dev/md1               5036160     37440   4742896   1% /home
[root@server root]# quota -v wizard
Disk quotas for user wizard (uid 501): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
       /dev/md0       0       0       0               0       0       0        
       /dev/md3       0    3072    5120               1      64     128        
       /dev/md8       0       0       0               0       0       0        
       /dev/md1      40*     30    5120   5days      12     512    1024        
[root@server root]# su - wizard
[wizard@server wizard]$ quota -v
Disk quotas for user wizard (uid 501): none


Expected Results:  [root@server root]# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/md6                497765     70353    401713  15% /
/dev/md7                 46537      6268     37866  15% /boot
none                    155768         0    155768   0% /dev/shm
/dev/md4               1509936     32944   1400288   3% /tmp
/dev/md2               2015952   1323508    590036  70% /usr
/dev/md5               1209496     78688   1069368   7% /var
/dev/md0               5036160     32868   4747468   1% /www
/dev/md3               2015952     32840   1880704   2% /var/spool/mail
/dev/md8               2015952     32836   1880708   2% /ftp
/dev/md1               5036160     37440   4742896   1% /home
[root@server root]# quota -v wizard
Disk quotas for user wizard (uid 501): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
       /dev/md0       0   0       0               0       0       0        
       /dev/md3       0    3072    5120               1      64     128        
       /dev/md8       0       0       0               0       0       0        
       /dev/md1      40*     30    30   5days      12     512    1024        
[root@server root]# su - wizard
[wizard@server wizard]$ quota -v
Disk quotas for user wizard (uid 501): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
       /dev/md0       0       0       0               0       0       0        
       /dev/md3       0    3072    5120               1      64     128        
       /dev/md8       0       0       0               0       0       0        
       /dev/md1     484*     30    30   5days      12     512    1024        


Additional info:

From the above example, even though "wizard" appears to have exceeded his/her quota, he/she can still add more blocks and files to the available 
filesystems. This additional quota isn't recorded until the next time `quotacheck` is run (and then only for the root user). The quota accounting 
system does not keep a current accounting of quota usage. Even when the user has exceeded their allowable hard limit as reported by the `quota` 
command from root, the system does not prevent them from increasing disk usage and their own use of the quota system indicates that they have 
no Disk quotas.

This can cause a security problem because it allows for a malicious or thoughtless user to consume all available disk space thereby creating a 
Denial of Service attack.
Comment 1 Daryle Niedermayer 2002-06-15 10:46:43 EDT
After quotas were first applied (by editing the /etc/fstab file), filesystems on which quotas were applied were `umount`ed and then re`mount`ed as 
per man pages and RedHat on-line documentation.

Problem was resolved with a server reboot. Documentation for quota should be amended to state that a server reboot is required to effect quota 
installation/configuration on RAID1 filesystems. Simply remounting filesystems is not sufficient for these cases.

Comment 2 Phil Copeland 2002-08-07 12:43:58 EDT
I've a somewhat more complex setup using LVM on RAID0
/boot is a standalone RAID0 device so I'll use that for test and test2 for LVM
on RAID0


[root@dhcp59-202 boot]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/Volume00/LogVol00
                       8256952   4718976   3118548  61% /
/dev/md0                126803     17953    102303  15% /boot
/dev/Volume00/LogVol02
                       8256952   3825672   4011852  49% /compile
none                    256948         0    256948   0% /dev/shm
/dev/Volume00/LogVol01
                        507748      9926    471608   3% /tmp
/dev/Volume00/LogVol03
                       1032088    403564    576096  42% /var


[root@dhcp59-202 boot]# useradd -m test -d /boot/test
[root@dhcp59-202 boot]# useradd -m test2 
[root@dhcp59-202 boot]# quota -v test
Disk quotas for user test (uid 500): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/Volume00/LogVol00
                     64       0       0               7       0       0        
       /dev/md0      16       0       0              11       0       0        
/dev/Volume00/LogVol02
                      0       0       0               0       0       0        
/dev/Volume00/LogVol01
                      0       0       0               0       0       0        
/dev/Volume00/LogVol03
                      0       0       0               1       0       0        
[root@dhcp59-202 boot]# quota -v test2
Disk quotas for user test2 (uid 501): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/Volume00/LogVol00
                     48       0       0              11       0       0        
       /dev/md0       0       0       0               0       0       0        
/dev/Volume00/LogVol02
                      0       0       0               0       0       0        
/dev/Volume00/LogVol01
                      0       0       0               0       0       0        
/dev/Volume00/LogVol03
                      0       0       0               1       0       0        


Ok so what did the user see


[root@dhcp59-202 boot]# su - test
[test@dhcp59-202 test]$ quota -v
Disk quotas for user test (uid 500): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/Volume00/LogVol00
                     64       0       0               7       0       0        
       /dev/md0      16       0       0              11       0       0        
/dev/Volume00/LogVol02
                      0       0       0               0       0       0        
/dev/Volume00/LogVol01
                      0       0       0               0       0       0        
/dev/Volume00/LogVol03
                      0       0       0               1       0       0        

[root@dhcp59-202 boot]# su - test2
[test2@dhcp59-202 test2]$ quota -v
Disk quotas for user test2 (uid 501): 
     Filesystem  blocks   quota limit   grace   files   quota   limit   grace
/dev/Volume00/LogVol00
                     48       0       0              11       0       0        
       /dev/md0       0       0       0               0       0       0        
/dev/Volume00/LogVol02
                      0       0       0               0       0       0        
/dev/Volume00/LogVol01
                      0       0       0               0       0       0        
/dev/Volume00/LogVol03
                      0       0       0               1       0       0        

I don't see your reported behaviour
You could grab the latest errata kernel and also the latest quota
(ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/quota-3.06*)
which I've got in the errata system to be deployed across all the 7.x series.

Phil
=--=

Note You need to log in before you can comment on or make changes to this bug.