Sponsored Content
Operating Systems Linux Red Hat User and Group quota is not working on RHEL6.2 ext4/ext3 Post 302598148 by admin_xor on Monday 13th of February 2012 02:05:50 PM
Old 02-13-2012
User and Group quota is not working on RHEL6.2 ext4/ext3

Hello!

I am in a weird problem of not able to set quota on an ext4 file system. I have setup a logical volume on which this ext4 filesystem resides. It's going to be used by an application for dumping data. But we want to setup quota so that it does not consume all the free space of the lv. The application will generate an error log if the quota limit is crossed. But the problem is that I am not able to set quota on the filesystem.
Here's the mount options used:
Code:
# mount | grep u02
/dev/mapper/vg_app-lv_app on /u02 type ext4 (rw,acl,usrquota,grpquota)

Here's what I get when trying to enable quota:
Code:
# quotacheck -cug /u02
quotacheck: Cannot create new quotafile /u02/aquota.user.new: Permission denied
quotacheck: Cannot initialize IO on new quotafile: Permission denied
quotacheck: Cannot create new quotafile /u02/aquota.group.new: Permission denied
quotacheck: Cannot initialize IO on new quotafile: Permission denied

Here's the permissions on the /u02 directory:
Code:
# ls -ld /u02
drwxr-xr-x. 4 root root 4096 Feb 13 18:38 /u02
# getfacl /u02
getfacl: Removing leading '/' from absolute path names
# file: u02
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

dmesg | tail gives a hint that SELinux is using xattr on this filesystem:
Code:
EXT4-fs (dm-1): mounted filesystem with ordered data mode
SELinux: initialized (dev dm-1, type ext4), uses xattr

SELinux is set to enforcing. After setting SELinux to permissive mode, I was actually able to run the quotacheck command. But, I need to figure out a solution for this as SELinux has to be set to Enforcing as per the company policy.

There's no boolean for quota:
Code:
# getsebool -a | grep quota
#

SELinux context for the directory is like this:
Code:
# ls -ldZ /u02
drwxr-xr-x. root root system_u:object_r:file_t:s0      /u02

My guess is that this xattr thingy is causing the problem. Anyone has any idea what it is and how I can do my job without having to set SELinux to permissive mode? Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how can I check the user's mail quota?

how can I check mail quota, and then how can I send mail to user whose quota get full??? :confused: For this which script must I use? (8 Replies)
Discussion started by: emreatlier
8 Replies

2. Linux

How to set user quota

I've a redhat 9.0 and I want to set a user quota. but the question is where should I start from and How ??? :confused: :confused: :confused: :confused: (2 Replies)
Discussion started by: KaiXiang
2 Replies

3. UNIX for Advanced & Expert Users

Adding quota for a group

***deleted by reborg for rule 1 violation*** (1 Reply)
Discussion started by: manoranjan
1 Replies

4. UNIX for Dummies Questions & Answers

Enable user quota

hi! i would like to enable user quota on my system (FreeBSD 6.2) i've check on enabling user quota here but i still confuse with fstab it shows there: /dev/da1s2g /home ufs rw,userquota 1 2 but my current /etc/fstab : # Device Mountpoint FStype Options ... (1 Reply)
Discussion started by: rdns
1 Replies

5. Red Hat

User quota

Hi, I want to apply the user quota, but i am unable to apply the quota to user. Kindly provide the guide line, so that i can sortout the problem. Step 1: Create partion on device #fdisk /dev/sda (because hard disk is scsi) #n (new partition table) i.e /dev/sda8. #p ( to print the partition... (2 Replies)
Discussion started by: sahu.tapan
2 Replies

6. UNIX for Advanced & Expert Users

lvm user quota

Whats the best method of setting lvm user quota? I saw both of these and I am not sure which to use. Linux File System Quotas Howtos Linux-Vserver With LVM And Quotas - 5dollarwhitebox.org Media Wiki (1 Reply)
Discussion started by: cokedude
1 Replies

7. Red Hat

Convert ext4 to ext3

Is there any way to conver ext4 to ext3 filesystem without formatting the partition/disk .. Had ext3 filesystem and had converted it to ext4 by issuing following command # tune2fs -O extents,uninit_bg,dir_index /dev/sda1 # fsck -pf /dev/sda1 # blkid /dev/sda1 /dev/sda1:... (1 Reply)
Discussion started by: Shirishlnx
1 Replies

8. Linux

Quota issue on user belongs to multiple Group

I have setup a group quota for better disk usage. What i am doing is to setup a quota with Samba share. I created user1,user2 and group project1 which belongs to /home/project1 dir. Quota is implemented on project1 group to write 100 MB on this share and This is working fine if a user1 and user2... (3 Replies)
Discussion started by: sunnysthakur
3 Replies

9. Red Hat

Auto Increasing Quota for User.

Hi, I would like to know wheather we can increase the quota for particular user automatically? I am having requirement to increase the quota only for 2 days in a week. but that shoule be automatically instead of manualy modification. is it possible? (3 Replies)
Discussion started by: manoj.solaris
3 Replies

10. Red Hat

User is a Part of a Group But Group Details Do Not Show the User

Hi, In the following output you can see the the user "richard" is a member on the team/group "developers": # id richard uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers) but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies
REPQUOTA(8)						      System Manager's Manual						       REPQUOTA(8)

NAME
repquota - summarize quotas for a filesystem SYNOPSIS
/usr/sbin/repquota [ -vsug ] [ -t | -n ] [ -F format-name ] filesystem... /usr/sbin/repquota [ -avtsug ] [ -t | -n ] [ -F format-name ] DESCRIPTION
repquota prints a summary of the disc usage and quotas for the specified file systems. For each user the current number of files and amount of space (in kilobytes) is printed, along with any quotas created with edquota(8). OPTIONS
-a Report on all filesystems indicated in /etc/mtab to be read-write with quotas. -v Report all quotas, even if there is no usage. Be also more verbose about quotafile information. -t Truncate user/group names longer than 9 characters. This results in nicer output when there are such names. -n Don't resolve UIDs/GIDs to names. This can speedup printing a lot. -s Try to report used space, number of used inodes and limits in more appropriate units than default ones. -F format-name Report quota for specified format (ie. don't perform format autodetection). Possible format names are: vfsold (version 1 quota), vfsv0 (version 2 quota), rpc (quota over NFS), xfs (quota on XFS filesystem) -g Report quotas for groups. -u Report quotas for users. This is the default. Only the super-user may view quotas which are not their own. FILES
aquota.user or aquota.group quota file at the filesystem root (version 2 quota, non-XFS filesystems) quota.user or quota.group quota file at the filesystem root (version 1 quota, non-XFS filesystems) /etc/mtab default filesystems /etc/passwd default set of users /etc/group default set of groups SEE ALSO
quota(1), quotactl(2), edquota(8), quotacheck(8), quotaon(8) 4th Berkeley Distribution REPQUOTA(8)
All times are GMT -4. The time now is 09:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy