LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-03-2008, 10:57 AM   #1
snoopy1
Member
 
Registered: Jun 2007
Posts: 44

Rep: Reputation: 15
XFS & Quotas on Slack


I have a 21 PC network in a school running Slack 12.1. On the server end is a raid XFS drive. My students have decided to take liberty with being reasonable with having "unlimited space" and thus I must force them to be reasonable via quotas.

Here's the thing. I've set grpquota,usrquota and tried gquota in fstab. I've appended rootflags=quota to lilo.conf. I enabled XFS quota support in the kernel, and turned on Quota support for good measure though I don't think it's neccessary.

When I run xfs_quota -x -c "limit -g bsoft=200m bhard=225m users" /

I always get "function not implemented" or "device not found" followed by the first error.

I've tried different mount points, tried setting for just users, tried doing it by xfs_quota run by itself and nothing will set the darn quotas.

When I try xfs_quota > report I get nothing, same for state et all.

Ideas???

Thanks!
Andrew
 
Old 10-04-2008, 01:52 PM   #2
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
I know nothing about quotas (at all), but have you looked at the blurb in /etc/rc.d/rc.M about quotas? This probably won't help you since I think you know more than me about this (plus, since you're using XFS I'm not sure if there are additional steps), but just figured I'd mention it.
Code:
# Slackware-Mini-Quota-HOWTO:
# To really activate quotas, you'll need to add 'usrquota' and/or 'grpquota' to
# the appropriate partitions as listed in /etc/fstab.  Here's an example:
#
# /dev/hda2      /home      ext3     defaults,usrquota      1   1
#
# You'll then need to setup initial quota files at the top of the partitions
# to support quota, like this:
# touch /home/aquota.user /home/aquota.group
# chmod 600 /home/aquota.user /home/aquota.group
#
# Then, reboot to activate the system.
# To edit user quotas, use 'edquota'.  See 'man edquota'.  Also, the
# official Quota Mini-HOWTO has lots of useful information.  That can be found
# here:  /usr/doc/Linux-HOWTOs/Quota

# Check quotas and then turn quota system on:
if grep -q quota /etc/fstab ; then
  if [ -x /sbin/quotacheck ]; then
    echo "Checking filesystem quotas:  /sbin/quotacheck -avugm"
    /sbin/quotacheck -avugm
  fi
  if [ -x /sbin/quotaon ]; then
    echo "Activating filesystem quotas:  /sbin/quotaon -avug"
    /sbin/quotaon -avug
  fi
fi
/usr/doc/Linux-HOWTOs/Quota is referenced -- but there is a lot of mention of the 2.4.x kernel, so I don't know how relevant that is today.
 
Old 10-05-2008, 11:51 AM   #3
snoopy1
Member
 
Registered: Jun 2007
Posts: 44

Original Poster
Rep: Reputation: 15
Thanks, problem is XFS doesn't use the Linux quota system (apparently). I had set it up anyway and slackware says ignoring XFS filesystem on / or similar upon boot.

I've done lots of googling and there's nothing on it. I can't believe nobody has ever set up XFS quotas on slackware!

Andrew
 
Old 10-06-2008, 01:45 PM   #4
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Well your thread prompted me to play with this with a Slackware 12.1 VM and it seems to work.

Here's what I did..

Created a new disk and partitioned it then mkfs.xfs this partiton. I then amended my fstab adding to this: -

Code:
/dev/sdb1        /home/ed/mnts/xfs xfs        rw,defaults,grpquota,uquota  0  0
I then added
Code:
"append='rootflags=quota"
to my lilo.conf and re ran lilo the rebooted.

Then I create the two files
Code:
aquota.group and aquota.user
on the mounted xfs volume and chmod them 0600 chown root:root to be sure of perms.

Next as root I ran :-
Code:
xfs_quota -x -c 'limit bsoft=10m bhard=20m ed' /home/ed/mnts/xfs
Then :-
Code:
xfs_quota -x -c report /home/ed/mnts/xfs
which gave me a report about the limits I'd setup.

Then with :-
Code:
dd if=/dev/zero of=/home/ed/mnts/xfs/tmpfile bs=1048576 count=30
I checked the limits were being enforced which they were.

Hope this is useful to you - this is my first play with quotas so I can't be much more in depth but I find them interesting.

Last edited by bgeddy; 10-06-2008 at 01:49 PM.
 
Old 10-09-2008, 04:06 AM   #5
snoopy1
Member
 
Registered: Jun 2007
Posts: 44

Original Poster
Rep: Reputation: 15
Thanks for that!

The only diference is the creation of the aquota etc files. I didn't do this step because in the xfs manual it states it's not required, and that the Linux quota tools are not used (quotaon etc). It would appear that XFS support is now integrated and does use the Linux quota tools. Nice of them to update the manual though!

I'll give it a try and report back, it was a really helpful post that!

Cheers,

Andrew
 
  


Reply



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
Slack 11 and XFS pete_bogg Slackware 4 04-09-2007 05:13 PM
Disk quotas & ulcers, Galore! nintendology Slackware 2 01-12-2006 01:27 PM
Slack 10, XFS, and slackpkg cmiranda Slackware - Installation 2 01-18-2005 07:42 AM
Slack 9.0-xfs modem problem natedawg_38929 Slackware 4 04-02-2003 08:39 PM
xfs on slack gusgorman Slackware 0 02-23-2003 07:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:15 AM.

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