LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-19-2017, 12:51 PM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Rep: Reputation: Disabled
Quota limits does not work??


Setting this example for quota limits on ext4 filesystem.
Code:
[root@Centos7 mnt1]# pwd
/mnt/mnt1

#Edit /etc/fstab
[root@Centos7 mnt1]# cat /etc/fstab
... ...
/dev/vdb7  /mnt/mnt1  ext4  defaults,usrquota,grpquota  0 2
... ...

#mount
[root@Centos7 mnt1]# mount /mnt/mnt1

#Create quota database
[root@Centos7 mnt1]# quotacheck --create-files --user --group /dev/vdb7


#edquota --user root
Disk quotas for user root (uid 0):
  Filesystem  blocks  soft  hard   inodes   soft   hard
  /dev/vdb7   17      15    16     6        3      4  

#edquota --group root
Disk quotas for group root (gid 0):
  Filesystem   blocks   soft  hard  inodes    soft    hard
  /dev/vdb7    13       14    15     2        3        5  

[root@Centos7 mnt1]# quotaon /mnt/mnt1

#Added a few files.... using touch to purposely exceed hard 
#and soft limits for inodes, and number of files.

[root@Centos7 mnt1]#  df --inodes .
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/vdb7       25688    17 25671    1% /mnt/mnt1

#Add more files... not shown

[root@Centos7 mnt1]# ls -a
.  ..  aquota.group  aquota.user  file1  file2  file3  file4  lost+found
[root@Centos7 mnt1]# quotacheck --user --verbose .
quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
quotacheck: Scanning /dev/vdb7 [/mnt/mnt1] done
quotacheck: Checked 2 directories and 6 files

[root@Centos7 mnt1]# touch file5

[root@Centos7 mnt1]# ls -a
.  ..  aquota.group  aquota.user  file1  file2  file3  file4  file5  lost+found

[root@Centos7 mnt1]# quotacheck --user --verbose .
quotacheck: Your kernel probably supports journaled quota 
but you are not using it. Consider switching to journaled 
quota to avoid running quotacheck after an unclean shutdown.
quotacheck: Scanning /dev/vdb7 [/mnt/mnt1] done
quotacheck: Checked 2 directories and 7 files

[root@Centos7 mnt1]# df -i .
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/vdb7       25688    18 25670    1% /mnt/mnt1
Then redo this also:
Quote:
[root@Centos7 mnt1]# quotaon /mnt/mnt1
[root@Centos7 mnt1]# ls
aquota.group aquota.user file1 file2 file3 file4 file5 lost+found
[root@Centos7 mnt1]# touch file6
[root@Centos7 mnt1]# ls
aquota.group aquota.user file1 file2 file3 file4 file5 file6 lost+found

[root@Centos7 mnt1]# df -i .
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vdb7 25688 19 25669 1% /mnt/mnt1

Why am I still allowed to add files when I have
exceeded the user and group quota limits for inodes?

Last edited by fanoflq; 03-19-2017 at 01:01 PM.
 
Old 03-19-2017, 01:10 PM   #2
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Distribution: Mint/MATE
Posts: 2,927

Rep: Reputation: 1246Reputation: 1246Reputation: 1246Reputation: 1246Reputation: 1246Reputation: 1246Reputation: 1246Reputation: 1246Reputation: 1246
Before you run quotacheck you must enable quota (in the kernel), either by umount/mount the filesystems or by the quotaon command.
 
1 members found this post helpful.
Old 03-19-2017, 01:16 PM   #3
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MadeInGermany View Post
Before you run quotacheck you must enable quota (in the kernel), either by umount/mount the filesystems or by the quotaon command.
May be you posted before I updated my original post.
I did ran quotaon. See addendum to post again.
 
Old 03-19-2017, 02:18 PM   #4
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
@MadeInGermany:

I tried reboot and it works.
But running quotaon right after you
created quota (before a reboot)
for the filesystem partition does
not appear to work.

Does anyone else have same quotaon problem?

Thank you.

Last edited by fanoflq; 03-19-2017 at 02:19 PM.
 
  


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
soft and hard limits for nproc value in /etc/security/limits.conf file kraljic Linux - General 3 07-13-2015 08:13 AM
LXer: Microsoft Contractors Face New Work Limits LXer Syndicated Linux News 0 07-21-2014 10:03 PM
print quota exceeded limits nayan123 Linux - Newbie 1 06-16-2011 03:02 PM
Groupquotas doesn't work even if Repquota finds limits Berkut83 Linux - Hardware 1 04-20-2006 12:49 PM
Groupquotas doesn't work even if Repquota finds limits Berkut83 Red Hat 0 04-19-2006 11:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:10 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration