Operating System - HP-UX
1824169 Members
3343 Online
109669 Solutions
New Discussion юеВ

edquota parameter and block size

 
SOLVED
Go to solution
Tim Nelson
Honored Contributor

edquota parameter and block size

Hi:

I'm attempting to set up a quota for a user on the /home filesystem. I want it to be 50MB. My problem is I'm not very good with block sizes and I was hoping someone could tell me if the steps I'm taking are accurate.

1. DETERMINE BLOCK SIZE OF HOME FILESYSTEM
(Maybe this has nothing to do with my problem, please read further)
# fstyp -v /dev/vg00/lvol4
hfs
f_frsize: 1024
At this point I've determined the block size of /home to be 1K

2. SET UP THE QUOTA PARAMETERS FOR MY USER USING edquota.
# edquota timn
fs /home blocks (soft = 40000, hard = 50000) inodes (soft = 400, hard = 500)

I'm computing the hard block to be:
1024 x 50000 = 51,200,000.

Is my logic correct here? I guess my real question is: Is the block size for setting up quotas dependent upon what the block size is for the filesystem? In my case it 1024 as I've shown you above.

How do I know if the block size edquota is using is 512, 1024, or 2048??

Thank you,


2 REPLIES 2
Victor BERRIDGE
Honored Contributor

Re: edquota parameter and block size

There is only one way to check: fix a quota and compare.You are wright you seem to be in 1k block so soft 40000 should be 40Mb... how many files do you authorize that person to have is nb inodes.
Here is a case:
Disk quotas for batisse (uid 2123):
Filesystem usage quota limit timeleft files quota limit timeleft
/users/batisse 208 6200 10000
cd /users/batisse; du -sk
batisse # du -ks
208 .

so 50Mb quota is 50000...

Good luck
Victor
Dan Hetzel
Honored Contributor
Solution

Re: edquota parameter and block size

Hi Tim,

Bocksize for edquota is 1Kbytes.
Why are you multiplying 1024 by 50000 ? That woulg give approx 50GB instead of 50MB.

A megabyte is 1024 Kbytes or 1024 blocks
50 MBytes is 50 times a MB or 50x1024 blocks

Your quota setting per user should be (if you want 40Mb soft and 50Mb hard limits) 40960 and 51200 respectively.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com