Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Brenno on October 05, 2004, 08:32:02 PM
-
I've searched the forums for solutions to this, but found none so far.
I just set up a v6.0 (final) server here in a machine with 4 SCSI drives. The install was performed as a RAID1 (mirrored on two drives,) and I then formatted and installed the other two SCSI drives, one mounted at /home/e-smith/files/users and the other at /home/e-smith/files/ibays.
Now, when I go into the server manager, the disk utilization contrib correctly reports each user's usage, but the quotas page doesn't! Their quota is correctly listed, but the current usage just says 0.0. When I go to modify the user's quota, it says they have 0 files occupying 0.00 megabytes.
The quotas page was working fine before I added the other two drives, but I can't figure out what's changed.
How can I get this back?
-
Brenno,
Have you activated quota correctly ?
Check /etc/fstab and /etc/mtab
(...or show the contents here if you do not know what to look for)
If you want something to read ;-) :
http://www.tldp.org/HOWTO/Quota.html
Regards
Reinhold
-
Here's a copy of /etc/fstab:
LABEL=/ / ext3 usrquota,grpquota $
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/md2 swap swap defaults 0 0
/dev/sdc1 /home/e-smith/files/users ext3 usrquota,grpquota 1 2
/dev/sdd1 /home/e-smith/files/ibays ext3 usrquota,grpquota 1 2
And here's a copy of /etc/mtab:
/dev/md1 / ext3 rw,usrquota,grpquota 0 0
none /proc proc rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/md0 /boot ext3 rw 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
none /dev/shm tmpfs rw 0 0
/dev/sdc1 /home/e-smith/files/users ext3 rw,usrquota,grpquota 0 0
/dev/sdd1 /home/e-smith/files/ibays ext3 rw,usrquota,grpquota 0 0
I can see there are some differences between them, especially when referring to the last column in /etc/fstab vs. /etc/mtab (specifically, the "1 2" in fstab is listed as "0 0" in mtab.
When I set up the new drives following the howto, it explained how to change the fstab file to match what I've got, but there was no mention of mtab. Should this file have been altered, or is it automatically generated from fstab?
I also noted that when I ran "repquota -a" there were no hard, soft or grace values listed despite them appearing in server-manager.
Thoughts?
-
Brenno,
That doesn't look bad (at least your raid swap seems quota free <grin> .-)
Try another:
# quotacheck -vugc /dev/sdc1
and
# quotacheck -vugc /dev/sdd1
...and see whether this either fixes your stuff or gives an errormessage with useful info .-)
- you can also look for quota.user and quota.group manually ... have a read: man quotacheck
Regards
Reinhold
P.S.: There is one "$" in your posted data
(signifying there is more data which didn't fit in line)
... please make sure that EVERY SINGLE LINE IS
terminated with LF or CR/LF
-
Reinhold,
I ran those commands as you suggested, and it returned with no errors on either drive.
I used MC to search for quota.user and quota.group and it found neither. I do have an "aquota.group" and "aquota.user" in the /home/e-smith/files/users and /home/e-smith/files/ibays directories (both the root mountpoints for the two drives.) The contents of these files are completely illegible and non-sensical (which maybe they're supposed to be?) so I'm not sure if there's an error there.
Also, I checked the /etc/fstab file and all lines are terminated with a carriage return.
Since the quota checks came back okay, is it possible this isn't a quota issue at all? Server-manager is reporting the quotas I set for each user properly, it's just not reporting their current usage properly.
-
Brenno,
I agree "No errors" on quotacheck do seem to indicate the problem is somewhere else :-(
Let's assume the error is somewhere on the "user" setup side of things...
Now what happens if:
- you create a completely new user,
- be sure to set a quota to this new user,
- now copy some files while logged in as this user
then check again.
You may want to: ssh into the SME and check
# quota -u thisnewuser
I have never seen this display either "quota none" or "quota ... data"
(...just a reminder that for a quota reported on e-smith side you have to have quota "on" for at least one user !)
Sry but I'm still on the road - havent' got more.
In SME "Aquota" fname should be right :roll: :-D
... it's non human readable ...you should have several of them (use "locate" - much easier)
Regards
Reinhold
-
Reinhold (or anyone else!)
I may have discovered a bit more about this error.
When I run "#quota -u brent" it correctly reports the quota set in server-manager as below:
Disk quotas for user brent (uid 5008):
Filesystem blocks quota limit grace files quota limit grace
/dev/md1 4 194560 204800 2 0 0
But... recall that I installed a new HD in the machine and mounted /home/e-smith/files/users/ to this disk, so it should actually require the quota on /dev/sdc1, not on /dev/md1. Is this right?
In fact, if i run "#edquota brent", this is what I get:
Disk quotas for user brent (uid 5008):
Filesystem blocks soft hard inodes soft hard
/dev/md1 4 194560 204800 2 0 0
/dev/sdc1 50476 0 0 1674 0 0
/dev/sdd1 0 0 0 0 0 0
As you can see, the file usage is actually under /dev/sdc1, but the quota is being applied to /dev/md1. Is there a way to combine these, or to move/change which device the quota monitors?
-
Brenno,
/dev/sdc1 /home/e-smith/files/users
/dev/sdd1 /home/e-smith/files/ibays
...will need 2 quota systems (!)
SME indeed does not support this -and- from the way Charlie and Shad treated this (and some poking, see below)
I think this won't be supported in a loooonng time.
Look into the user quota modification routine:
(pico /etc/e-smith/events/actions/user-modify-quota)
# Get a $dev value appropriate for use in Quota::query call.
my $dev = Quota::getqcarg("/home/e-smith/files");
# Get current quota settings.
@curr_quota{@QProps} = (Quota::query($dev, $uid, 0))[1,2,5,6];
and you see that "you have gone 1 level too far"
/dev/sdc1 /home/e-smith/files/users 8-)
As RL has caught up with me (like last time :oops: )
I can only recommend (with tongue in cheek)
you to "make a raid and mount at "/home/e-smith/files"...
(Seriously it can be done but from the peek into the code it seems a lot of work resulting in a hack mainly for you :-( )
Regards
Reinhold
:pint: :pint: :pint:
-
Blast! If only I'd known this when I set the box up, I'd have made sure to plan around that limitation. I thought I was being clever by putting the ibays and user files on separate drives to maximize space.
In retrospect, it wasn't completely necesary, especially for the ibays which only total about 84MB of data at this point. But it's turned out to be important for the user files, as I have some users with 500+MB of email.
Reinhold, thanks for digging into this a bit for me. At least I finally have some explanations for the behaviour. Frankly, I was suprised at how my "bug" was shrugged off, seemingly without any due consideration. Alas, I realize that the bug team has bigger fish to fry sometimes ;)