1834011 Members
1686 Online
110063 Solutions
New Discussion

quotas query

 
SOLVED
Go to solution
xcvzxvzxdv
Advisor

quotas query

Hi I have a query , I am setting the quotas for the users .

fs /user06 blocks (soft = 0, hard = 0) inodes (soft = 0, hard = 2)

In I need to ask what are blocks and what are inodes , how do i define space for the users based on them
12 REPLIES 12
Peter Godron
Honored Contributor

Re: quotas query

Hi,
if you do:
man 5 quota
you should get a basic understanding of the quota system.

default block size is 1k
inodes are internal 'file pointers'
Senthil Kumar .A_1
Honored Contributor

Re: quotas query

Blocks - are the chunk of bytes where the actual content of a file or directory is stored.

Inodes - are the FS metadata structure where the characteristics of the file are stored. e.g. size, address of data blocks define above, permission, number of links, uid, gid, modified time, accessed time etc... this is the info ls command spits out when used with "-l" option. Basically it is using "fstat()" and "stat()" system call to fetch the inode details.

To see the contents of the inode try ...

man fstat and see how the structure "struct stat" is defined to get an idea of inode.

If you want to know more of quota, please refer the man page of quota as peter suggested.

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
xcvzxvzxdv
Advisor

Re: quotas query

I want to ask how do I calculate the user space with blocks. Suppose if I am allocating 10000 blocks how much space am I allocating
Peter Godron
Honored Contributor

Re: quotas query

Hi,
As each block is 1K => 10000K
Senthil Kumar .A_1
Honored Contributor

Re: quotas query

Hi,

Let us assume you want to set quota on /dev/vg01/lvol5. Now check the block size of the file system with the below command.

fstyp -v /dev/vg01/lvol5

in my case it is "f_bsize: 8192" meaning 8 KB.

So if i were to allocate 10000 such blocks then I would effectively allocated approx : 80MB

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
Ninad_1
Honored Contributor

Re: quotas query

Hi,

I think what Peter is saying is correct - the block size is in 1k blocks.
Please refer man page of quota(5)
man 5 quota

regards,
Ninad
xcvzxvzxdv
Advisor

Re: quotas query

the f size is f_size: 1048576

this is a preety large value =1024 MB am I correct
Peter Godron
Honored Contributor

Re: quotas query

Hi,
I did a quick test on my system and it appears the unit is 1K.

You seem to have quite a few questions open.
Can you please review the solutions given, award points and close the threads.
Ninad_1
Honored Contributor

Re: quotas query

Hi,

What do you mean 1024MB is a pretty large value - its the filesystem size you are pointing out at ? Nowadays filesystems can be prety huge - even 50-100GB . Size is relative - and depends on for which application/what purpose the filesystem is allocated.
Now if you are talking about if quota is 1024MB its a huge figure then you may be right, but again as I said its relative and depends on purpose. So you are the best judge for your set of environment to decide whats a large size for quota for a particular user.

Again -would like to highlight that the f_size is not quota but your filesystem size.

Regards,
Ninad
Senthil Kumar .A_1
Honored Contributor
Solution

Re: quotas query

Hi,

In my previous query I asked you to check f_bsize for block size, not f_size. Please reconfirm once again.

Please recheck.

Regards,
Senthil Kumar .A
Let your effort be such, the very words to define it, by a layman - would sound like a "POETRY" ;)
xcvzxvzxdv
Advisor

Re: quotas query

thanks senthil in my case also it is 8192
Peter Godron
Honored Contributor

Re: quotas query

I do not think the f_bsize has any impact on the quota system, as this based around 1K blocks.

So regardless of what f_bsize is, a block quota of 10000 is 10000K.

Please read:
man 5 quota
man 1m edquota