LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-28-2011, 05:24 AM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian
Posts: 1,266

Rep: Reputation: 99
Question Disk Quotas not giving warning in ext4 filesystem of CentOS 6.0 32 Bit


Dear All,

I am using a CentOS 6.0 32 Bit box and have set up Disk Quotas for users based on File Size and Files limitation.

I get an error when a quota (file size OR no. of files) is increased but I do NOT get any warning. Although same (almost) configuration/steps in CentOS5.X works flawlessly.

These are the steps I am following:
1) Edit /etc/fstab as follows
Code:
/dev/mapper/vg_ftp-lv_home /home                   ext4    defaults,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0        1 2
2) Quotacheck
Code:
[root@ftp ~]# quotacheck -cvgum /home
quotacheck: Scanning /dev/mapper/vg_ftp-lv_home [/home] done
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
quotacheck: Checked 3 directories and 19 files
quotacheck: Old file not found.
quotacheck: Old file not found.
[root@ftp ~]#
3) Quota ON
Code:
[root@ftp ~]# quotaon -vgu /home
/dev/mapper/vg_ftp-lv_home [/home]: group quotas turned on
/dev/mapper/vg_ftp-lv_home [/home]: user quotas turned on
[root@ftp ~]#
4) Set Quota for user "vikas"

Warning Size of File(s) = 250 MB
Maximum Size of File(s) = 300 MB

Warning number of Files = 10
Maximum number of Files = 15

Code:
[root@ftp ~]# setquota -u vikas 256000  307200  10 15 -a /home
[root@ftp ~]# repquota /home
*** Report for user quotas on device /dev/mapper/vg_ftp-lv_home
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --      20       0       0              2     0     0       
vikas     --      16  256000  307200              4    10    15       
[root@ftp ~]#


Now, this should have given me a warning for files.
Code:
[vikas@ftp ~]$ ls -la
total 20
drwx------  2 vikas ftpusers 4096 Dec 28 22:13 .
drwxr-xr-x. 5 root  root     4096 Dec 28 22:13 ..
-rw-r--r--  1 vikas ftpusers   18 Jun 22  2010 .bash_logout
-rw-r--r--  1 vikas ftpusers  176 Jun 22  2010 .bash_profile
-rw-r--r--  1 vikas ftpusers  124 Jun 22  2010 .bashrc
[vikas@ftp ~]$ 
[vikas@ftp ~]$ touch 1 2 3 4 5 6 7 8
[vikas@ftp ~]$ 
[vikas@ftp ~]$ ls -la
total 20
drwx------  2 vikas ftpusers 4096 Dec 28 22:18 .
drwxr-xr-x. 5 root  root     4096 Dec 28 22:13 ..
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 1
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 2
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 3
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 4
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 5
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 6
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 7
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 8
-rw-r--r--  1 vikas ftpusers   18 Jun 22  2010 .bash_logout
-rw-r--r--  1 vikas ftpusers  176 Jun 22  2010 .bash_profile
-rw-r--r--  1 vikas ftpusers  124 Jun 22  2010 .bashrc
[vikas@ftp ~]$

[root@ftp ~]# repquota -a
*** Report for user quotas on device /dev/mapper/vg_ftp-lv_home
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --      20       0       0              2     0     0       
vikas     -+      16  256000  307200             13    10    15  6days
[root@ftp ~]#
OR on creating a file of 280 MB.

Code:
[vikas@ftp ~]$ dd if=/dev/zero of=file bs=1M count=290
290+0 records in
290+0 records out
304087040 bytes (304 MB) copied, 3.21322 s, 94.6 MB/s
[vikas@ftp ~]$ ls -lrtha
total 291M
-rw-r--r--  1 vikas ftpusers  124 Jun 22  2010 .bashrc
-rw-r--r--  1 vikas ftpusers  176 Jun 22  2010 .bash_profile
-rw-r--r--  1 vikas ftpusers   18 Jun 22  2010 .bash_logout
drwxr-xr-x. 5 root  root     4.0K Dec 28 22:13 ..
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 1
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 7
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 6
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 5
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 4
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 3
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:18 2
-rw-r--r--  1 vikas ftpusers    0 Dec 28 22:19 8
-rw-------  1 vikas ftpusers   59 Dec 28 22:19 .bash_history
drwx------  2 vikas ftpusers 4.0K Dec 28 22:21 .
-rw-r--r--  1 vikas ftpusers 290M Dec 28 22:21 file
[vikas@ftp ~]$
Any idea why RHEL 6 does not gives warning ?
Please help.
 
Old 12-31-2011, 07:14 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,458

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
Hi Vikas. I don't know if it is the reason of this behaviour (I cannot test it, right now) but usually after editing /etc/fstab you have to remount the filesystem, as explicitly stated in the Red Hat documentation, here! For a filesystem in use (and /home likely is) a system reboot is recommended.

Regarding the
Code:
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
messages, it's normal behaviour the first time you enable quota on a filesystem. Hope this helps.
 
Old 01-01-2012, 01:05 AM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian
Posts: 1,266

Original Poster
Rep: Reputation: 99
Quote:
Originally Posted by colucix View Post
Hi Vikas. I don't know if it is the reason of this behaviour (I cannot test it, right now) but usually after editing /etc/fstab you have to remount the filesystem, as explicitly stated in the Red Hat documentation, here! For a filesystem in use (and /home likely is) a system reboot is recommended.
.
Hi Colucix,

Thanks for the time. I had remounted the filesystem (even rebooted the server), my mistake I forgot to list this step in my post.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filesystem for SSD disk: BTRFS vs NILFS2 vs EXT4 ruppertus Linux - General 10 04-19-2012 12:19 AM
Import/export filesystem quotas rmvilhena Linux - Server 3 07-25-2011 05:05 AM
[SOLVED] Permanent filesystem corruption on reiserfs, ext3 and ext4 - disk failure? trumpet_tom Linux - Hardware 9 02-11-2010 05:29 AM
Bootup halts after Local Filesystem Quotas joaakim Linux - General 1 01-12-2006 03:45 AM
Setting Up Filesystem Quotas j_miguel_y Linux - Software 0 06-09-2004 10:21 AM


All times are GMT -5. The time now is 05:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration