managing quotas

hello,

I attributed quotas on a file system, and for test, I created my user qcheck, here's with the edquota command:

fs /myFS blocks (soft = 100, hard = 200) inodes (soft = 3, hard = 5)

I made quotaon -va, and to check the availability of the quotas, I copied a 1Mo file in the qcheck directory.

Surprise! I could do so (although I limited him for 200Ko), and my repquota check shows me the following:

qcheck-+61002006357.0 days

So, it only shows me that I'm over about inodes (+), but not for my blocks!!!

Can't understand.

Could anybody explain to me?

Thanks

[625 byte] By [widjayy] at [2007-11-26 6:59:18]
# 1
What does quota -v return if you run it as the user in question?Also, make sure that all the files you copied to the qcheck directory are owned by the user who you enabled quota for, since the quotas are dependant on UID rather than paths.. 7/M.
mAbrante at 2007-7-6 15:37:01 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2

hi.

I made what you told me. That's ok now, I've got the + flag about the blocks.

But that's a bit strange to me: I thought I couldn' t overwrite the size limit on hard blocks, and nevertheless, it seems it's possible. Why?

example:

qcheck++21751002007.0 days20356.1 days

You see that 2175 > 200. :-)

It just means that in a 7 days period I couldn't write on my fs with that user.

But there will be 1975 Ko over quota.

widjayy at 2007-7-6 15:37:01 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 3

Hmm, i've seen certain conditions where you actually could write more data than the quota limit should let you write. However i can't recall why it happend :-)

Then again, when you run quotacheck the system recalculates the quotas for the users which have a quota set for them, so if there are any inconsity (or if a user have managed to write data above his quota limit), thats when it will be detected and the quotas updated..

You could play around some more, then run "quota -v <user>", quotacheck -a and then quota -v again to see if the figures changes after you run quotacheck.

I haven't used quota that much for many years, but i remember that the last time i used it was on a Solaris 2.5.1 system, and we had a cronjob which ran quotacheck nightly on the NFS server :-)

7/M.

mAbrante at 2007-7-6 15:37:01 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 4

You're right, that's working now. I tried vi with my user in his directory, and I couldn't. But with root, no problem. That's a bit annoying. Do you know a system bin that could really (and not virtually) limit the directory of a user (except resizing the fs and create special partitions)?

Thank you

widjayy at 2007-7-6 15:37:01 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 5
not on the top of my head. Do you feel it would be a major problem?Actually i can't think of a way to do it with ufs and nfs, but i'm sure there is a 3:rd party solution or some other way of solving that problem.. 7/M.
mAbrante at 2007-7-6 15:37:01 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 6
Ok, so thank you for all :-)
widjayy at 2007-7-6 15:37:01 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 7

ZFS would let you set a hard limit on a directory.

You would need to be running Solaris Express today to use it, or wait for Solaris 10 update 2 to be released.

Otherwise you could use Sun volume manger, create a soft partition and put a filesystem on it. As mentioned that is a little more overhead to manage. ZFS does this easily once you have it installed.

--

Darren

Darren_Dunham at 2007-7-6 15:37:01 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 8

Wat quotas provide is slightly different to what your looking for.

What quotas provide is a limit on the total size of files owned by a user, regardless of where they are on the filesystem.

Whereas your looking for a limit on the size of a directory.

Now usually there close to the same thing since a user can only write to his own directory.

But when you write a file to the directory as root, the file is owned by root not the user.

So it doesnt count towards the users quota.

robertcohen at 2007-7-6 15:37:01 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...