Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > Debian Linux > Debian Linux support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-19-2008, 08:42 AM
=?ISO-8859-1?Q?S=E9verin_Richard?=
 
Posts: n/a
Default quto / blocks

Hi all,
I have a dedicated serveur gentoo.

I enconter problems managing disk quotas.

I thought that hard limit was in Mo, but it's obviously "blocks"
But trying to evaluate the size of a block give me unexpexted results:


1_ How can i know the size of my blocks??
i know 2 commands:
$$$> edquota username
and $$$> du /home/userdir

user1:
edquota gives me 156212 blocks
and du /home/user1 : 8 920 (Mo)
thus a block size is about: 8920 (000) / 156 212 == 57 o / block

user2:
edquota gives me 367 372 blocks
and du /home/user2: 28 964 (Mo)
thus a block size is here: 28 964 (000) / 367 372 == 78 o /block

What is the relation between "block" and disk usage????

How can i manage my disk quota in Mo.

This is a big problem because when quota exeeds, any file uploaded is
set to 0ko and erase the existing file. And all internet website goes wrong.



Thanks for help.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-19-2008, 08:42 AM
Pierre Brua
 
Posts: n/a
Default Re: quto / blocks

Fri, 14 Dec 2007 12:44:41 +0100, Séverin Richard wrote*:
> I enconter problems managing disk quotas.
> I thought that hard limit was in Mo, but it's obviously "blocks"
> But trying to evaluate the size of a block give me unexpexted results:
>
> 1_ How can i know the size of my blocks??


The size of blocks on a filesystem (sda1 in our example) is shown by the
following command:
sudo dumpe2fs /dev/sda1|grep -i "block size"

The usage information given by edquota is only an indication and may be
inaccurate. In your case, the block size is probably 64KB
(8920*1024*1024/156212=59875).
If you stay below the 64KB*block count limit, I suppose you won't be
locked by the system. Avoid little files since each one eat 64K anyway. A
65K file will consume 2 blocks.

Hope it helps,
--
Pierre Brua
System & Application Engineer
http://pierrebrua.com/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-19-2008, 08:42 AM
=?ISO-8859-15?Q?S=E9verin_Richard?=
 
Posts: n/a
Default Re: quto / blocks

thank you Pierre,

Your answer is helpfull.

It is possible that my block size is: 64k
My ratio between Mo and blocks is 57 and 78, depending on small
files.(for 2 users)


but the command:
dumpe2fs /dev/sda1|grep -i "block size"
(
i also try:
dumpe2fs /dev/hdc11|grep -i "block size" found on the internet
)
doesn't work: it returns:

dumpe2fs 1.38 (30-Jun-2005)
dumpe2fs: Aucun périphérique ou adresse lors de la tentative d'ouverture
de /dev/sda1
(no device or adress during connexion to /dev/sda1)


which device stores my block size?

it isn't /dev/sda1, nor /dev/hdc11
can u help me to found the correct device?

best regards,






Pierre Brua wrote:
> Fri, 14 Dec 2007 12:44:41 +0100, Séverin Richard wrote :
>
>>I enconter problems managing disk quotas.
>>I thought that hard limit was in Mo, but it's obviously "blocks"
>>But trying to evaluate the size of a block give me unexpexted results:
>>
>>1_ How can i know the size of my blocks??

>
>
> The size of blocks on a filesystem (sda1 in our example) is shown by the
> following command:
> sudo dumpe2fs /dev/sda1|grep -i "block size"
>
> The usage information given by edquota is only an indication and may be
> inaccurate. In your case, the block size is probably 64KB
> (8920*1024*1024/156212=59875).
> If you stay below the 64KB*block count limit, I suppose you won't be
> locked by the system. Avoid little files since each one eat 64K anyway. A
> 65K file will consume 2 blocks.
>
> Hope it helps,

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-19-2008, 08:42 AM
Mark South
 
Posts: n/a
Default Re: quto / blocks

On Fri, 14 Dec 2007 16:33:06 +0100, Séverin Richard wrote:

Séverin, please don't top post, OK?

> which device stores my block size?
>
> it isn't /dev/sda1, nor /dev/hdc11
> can u help me to found the correct device?


If you type "mount" without any parameters, it will show you which devices
are mounted and where. Example:

debian:~$ mount
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
....
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/hda6 on /home type ext3 (rw)

Note the /dev/hda1 and the /dev/hda6 which are the / and /home partitions
respectively.

Mark
--
Signature: unable to mount signature device /dev/sig
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 08:48 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62