Linux Debian support - quto / blocks

This is Interesting: Free IT Magazines  
Home > Archive > Linux Debian support > December 2007 > quto / blocks





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author quto / blocks
Séverin Richard

2007-12-14, 7:14 am

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.

Pierre Brua

2007-12-14, 1:13 pm

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/

Séverin Richard

2007-12-14, 1:13 pm

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 :
>
>
>
> 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,

Mark South

2007-12-14, 1:13 pm

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
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com