OpenVZ Forum


Home » General » Support » Disk usage - custom value
Disk usage - custom value [message #10162] Sun, 11 February 2007 10:00 Go to next message
jele is currently offline  jele
Messages: 2
Registered: February 2007
Junior Member
Hello all,

-bash-3.00# df -h
Filesystem            Size  Used Avail Use% Mounted on
simfs                1000M  618M  329M  66% /


I need to set some custom value for "Used" and "Avail" of statfs(). For example:

-bash-3.00# df -h
Filesystem            Size  Used Avail Use% Mounted on
simfs                1000M   10M  990M   1% /


Is there a quick way to do that? I've tried to use "vzquota init" for that with custom "-p" value, but without any success.
Re: Disk usage - custom value [message #10163 is a reply to message #10162] Sun, 11 February 2007 10:44 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
What do you mean "custom"? Do you mean arbitrary, or a new value based on some function of the actual values?

Tell us more about the overall problem you are trying to solve and we can probably understand better.

Rick


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Disk usage - custom value [message #10165 is a reply to message #10163] Sun, 11 February 2007 13:57 Go to previous messageGo to next message
jele is currently offline  jele
Messages: 2
Registered: February 2007
Junior Member
Yes, I need arbitrary value. I will never call "vzquota init", so it will never be dropped to actual values.

This is just for my internal experiments. Thank you for your response.
Re: Disk usage - custom value [message #10174 is a reply to message #10165] Sun, 11 February 2007 21:11 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
hello
if you can edit and compile your kernel
please see my thread here

http://forum.openvz.org/index.php?t=msg&th=1860&star t=0&
Re: Disk usage - custom value [message #10185 is a reply to message #10174] Mon, 12 February 2007 09:28 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello, mora,

Here is a patch, that will help you.
But you're aware about possible problems.

Vasily
Re: Disk usage - custom value [message #10222 is a reply to message #10185] Mon, 12 February 2007 22:38 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
Hello
sorry to appear like illetrate

i have the following questions please bear with me and answer them

1-what does this batch exactly do ?
2- how to apply this hack exactly ?
3- how to remove this hack once needed ?

many many thanks for your time , efforts and help
Re: Disk usage - custom value [message #10244 is a reply to message #10222] Tue, 13 February 2007 15:07 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

Please, read article http://wiki.openvz.org/Kernel_build, it is about how to build kernel. Also there is a description how to add your patches.

Thanks to this patch simfs returns as free blocks, available blocks and amount of blocks values _directly_ from quota. It means that if you set quota limit to 50gb, df will always show 50gb.

To unroll this patch you should just boot in unpatched kernel.

HTH,
Vasily
Re: Disk usage - custom value [message #10287 is a reply to message #10244] Wed, 14 February 2007 12:14 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
Hello
thanks for your time again
i followed the instructions exactly on that link
but i get this message while compiling with command


root@HN [/usr/src/redhat/SPECS]# rpmbuild -ba --target=i686 kernel-ovz.spec

all goes ok untill
RedHat patch #5059 (linux-2.6.9-CVE-2006-2936-ftdi-sio-dos.patch):
RedHat patch #5060 (linux-2.6.9-CVE-2006-2935-cdrom-typo.patch):
RedHat patch #5061 (linux-2.6.9-CVE-2006-3468-nfs-fh.patch):
RedHat patch #5062 (linux-2.6.9-CVE-2006-3626-proc-setuid.patch):
RedHat patch #5063 (linux-2.6.9-CVE-2006-2444-snmp-nat-mem.patch):
RedHat patch #5064 (linux-2.6.9-CVE-2006-2932-ds-es-dos.patch):
RedHat patch #5065 (linux-2.6.9-CVE-2006-2071-mprotect-perms.patch):
RedHat patch #5066 (linux-2.6.9-CVE-2006-4623-dvb.patch):
RedHat patch #5067 (linux-2.6.9-CVE-2006-0039-netfilter.patch):
RedHat patch #5068 (linux-2.6.9-CVE-2006-4093-ppc-clear-en-attn.patch):
RedHat patch #5100 (linux-2.6.9-ptrace-sched-race.patch):
RedHat patch #10000 (linux-2.6.0-compile.patch):
RedHat patch #10001 (linux-2.6.9-exports.patch):
RedHat patch #10002 (linux-2.6.9-slab-update.patch):
RedHat patch #10003 (linux-2.6.9-pci-ids.patch):
RedHat patch #20000 (linux-kernel-test.patch):
+ cd ../linux-2.6.9
+ echo 'Patch #100 (patch-023stab040-core):'
Patch #100 (patch-023stab040-core):
+ patch -p1 -s
+ echo 'Patch #10000 (diff-simfs-hack):'
Patch #10000 (diff-simfs-hack):
+ patch -p1 -s
The text leading up to this was:
--------------------------
|--- fs/simfs.c.simfs-quota     2007-02-12 11:43:01.000000000 +0300
|+++ fs/simfs.c 2007-02-12 12:04:59.000000000 +0300
--------------------------
File to patch: 



so what should i input there ?
Re: Disk usage - custom value [message #10289 is a reply to message #10287] Wed, 14 February 2007 12:25 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Sorry,

this is my fault, I just generated patch from the wrong directory!
Please, use the patch, that is attached to this message.
Re: Disk usage - custom value [message #10291 is a reply to message #10289] Wed, 14 February 2007 12:31 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
still facing errors with same command


RedHat patch #10001 (linux-2.6.9-exports.patch):
RedHat patch #10002 (linux-2.6.9-slab-update.patch):
RedHat patch #10003 (linux-2.6.9-pci-ids.patch):
RedHat patch #20000 (linux-kernel-test.patch):
+ cd ../linux-2.6.9
+ echo 'Patch #100 (patch-023stab040-core):'
Patch #100 (patch-023stab040-core):
+ patch -p1 -s
+ echo 'Patch #10000 (diff-simfs-hack):'
Patch #10000 (diff-simfs-hack):
+ patch -p1 -s
1 out of 2 hunks FAILED -- saving rejects to file fs/simfs.c.rej
error: Bad exit status from /var/tmp/rpm-tmp.3588 (%prep)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.3588 (%prep)
Re: Disk usage - custom value [message #10292 is a reply to message #10291] Wed, 14 February 2007 12:37 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
=)

You're applying patch to 2.6.9 kernel, don't you?
And this is a patch agains 2.6.18 kernel...

Do you need such patch for 2.6.9?
Re: Disk usage - custom value [message #10295 is a reply to message #10292] Wed, 14 February 2007 13:11 Go to previous message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
Hello
i just downloaded the source rpm from http://download.openvz.org/kernel/stable/current/ovzkernel-2 .6.9-023stab040.1.src.rpm

i will be happy if you provide me the batch that works with it

i got HT cpu i dont know if this will allow the server to read the cpu HT as 2 processors after i apply the patch to that rpm source or i still have to apply custom configs ? i dont find any special .src.rpm for smp or entnosplit to apply the patch to

sorry im totally new to this

[Updated on: Wed, 14 February 2007 13:14]

Report message to a moderator

Previous Topic: strato server with second IP Adress
Next Topic: NIC problem with openvz patched kernel
Goto Forum:
  


Current Time: Wed Jun 25 13:54:36 GMT 2025

Total time taken to generate the page: 0.05958 seconds