OpenVZ Forum


Home » General » Support » *SOLVED* diskspace no more than 40 GB
icon9.gif  *SOLVED* diskspace no more than 40 GB [message #9877] Fri, 26 January 2007 22:29 Go to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
Hello
i try to set a vps diskspace to 100 GB


i ran the following command

vzctl set 110--diskspace 100000000:100100000 --save

then when i ran df on the vps it says

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/simfs            41718452   3221336  33665168   9% /
/tmp                  41718452   3221336  33665168   9% /var/tmp


and

vzquota stat 110 -t


says :-
   resource          usage       softlimit      hardlimit    grace
  1k-blocks        3221348       100000000      100100000         
     inodes          95941         1816877        1998565         
User/group quota: on,active
Ugids: loaded 57, total 57, limit 900
Ugid limit was exceeded: no
 
User/group grace times and quotafile flags:
 type block_exp_time inode_exp_time  dqi_flags
 user                                       0h
group                                       0h
 
User/group objects:
ID           type  resource       usage   softlimit   hardlimit    grace status
0            user 1k-blocks     2620892           0           0          loaded
0            user    inodes       76454           0           0          loaded
0           group 1k-blocks     2494760           0           0          loaded
0           group    inodes       75375           0           0          loaded
1            user 1k-blocks       22792           0           0          loaded
1            user    inodes          90           0           0          loaded
1           group 1k-blocks       22792           0           0          loaded
1           group    inodes          90           0           0          loaded
2            user 1k-blocks         472           0           0          loaded
2            user    inodes          45           0           0          loaded
2           group 1k-blocks         472           0           0          loaded
2           group    inodes          45           0           0          loaded
5           group 1k-blocks          16           0           0          loaded
5           group    inodes         514           0           0          loaded
6           group 1k-blocks           0           0           0          loaded
6           group    inodes           1           0           0          loaded
9           group 1k-blocks           0           0           0          loaded
9           group    inodes           3           0           0          loaded
10          group 1k-blocks      150984           0           0          loaded
10          group    inodes        2638           0           0          loaded
12          group 1k-blocks        2280           0           0          loaded
12          group    inodes         265           0           0          loaded
15          group 1k-blocks         172           0           0          loaded
15          group    inodes          26           0           0          loaded
20          group 1k-blocks         168           0           0          loaded
20          group    inodes          37           0           0          loaded
22          group 1k-blocks         296           0           0          loaded
22          group    inodes           3           0           0          loaded
25           user 1k-blocks          60           0           0          loaded
25           user    inodes          15           0           0          loaded
25          group 1k-blocks          64           0           0          loaded
25          group    inodes          16           0           0          loaded
37           user 1k-blocks       15876           0           0          loaded
37           user    inodes         108           0           0          loaded
37          group 1k-blocks       15876           0           0          loaded
37          group    inodes         108           0           0          loaded
43           user 1k-blocks           0           0           0          loaded
43           user    inodes           2           0           0          loaded
43          group 1k-blocks           0           0           0          loaded
43          group    inodes           2           0           0          loaded
47           user 1k-blocks        1676           0           0          loaded
47           user    inodes         145           0           0          loaded
47          group 1k-blocks          12           0           0          loaded
47          group    inodes           3           0           0          loaded
54          group 1k-blocks           4           0           0          loaded
54          group    inodes           1           0           0          loaded
99           user 1k-blocks          24           0           0          loaded
99           user    inodes          57           0           0          loaded
99          group 1k-blocks         116           0           0          loaded
99          group    inodes          32           0           0          loaded
100          user 1k-blocks       21808           0           0          loaded
100          user    inodes         121           0           0          loaded
100         group 1k-blocks        2624           0           0          loaded
100         group    inodes         227           0           0          loaded
101         group 1k-blocks       21808           0           0          loaded
101         group    inodes         121           0           0          loaded
500          user 1k-blocks        7900           0           0          loaded
500          user    inodes         613           0           0          loaded
500         group 1k-blocks        7900           0           0          loaded
500         group    inodes         613           0           0          loaded
501          user 1k-blocks       33128           0           0          loaded
501          user    inodes        2473           0           0          loaded
501         group 1k-blocks        4176           0           0          loaded
501         group    inodes         299           0           0          loaded
502         group 1k-blocks          56           0           0          loaded
502         group    inodes           2           0           0          loaded
1000         user 1k-blocks        5784           0           0          loaded
1000         user    inodes         548           0           0          loaded
1000        group 1k-blocks        5000           0           0          loaded
1000        group    inodes         436           0           0          loaded
1001         user 1k-blocks        1736           0           0          loaded
1001         user    inodes         102           0           0          loaded
1001        group 1k-blocks         412           0           0          loaded
1001        group    inodes          29           0           0          loaded
1002         user 1k-blocks         156           0           0          loaded
1002         user    inodes          18           0           0          loaded
15033        user 1k-blocks         360           0           0          loaded
15033        user    inodes          24           0           0          loaded
32001        user 1k-blocks       39380           0           0          loaded
32001        user    inodes        2215           0           0          loaded
32001       group 1k-blocks       39388           0           0          loaded
32001       group    inodes        2217           0           0          loaded
32002        user 1k-blocks      110204           0           0          loaded
32002        user    inodes        6923           0           0          loaded
32002       group 1k-blocks          12           0           0          loaded
32002       group    inodes           1           0           0          loaded
32003        user 1k-blocks           4      102400      102400          loaded
32003        user    inodes           2           0           0          loaded
32003       group 1k-blocks      109888           0           0          loaded
32003       group    inodes        6845           0           0          loaded
32004        user 1k-blocks         548           0           0          loaded
32004        user    inodes         121           0           0          loaded
32004       group 1k-blocks         812           0           0          loaded
32004       group    inodes          14           0           0          loaded
32005        user 1k-blocks      337392      512000      512000          loaded
32005        user    inodes        5698           0           0          loaded
32005       group 1k-blocks        1140           0           0          loaded
32005       group    inodes         122           0           0          loaded
32006        user 1k-blocks        1152     1024000     1024000          loaded
32006        user    inodes         168           0           0          loaded
32006       group 1k-blocks         624           0           0          loaded
32006       group    inodes           6           0           0          loaded
32007        user 1k-blocks           8     1024000     1024000          loaded
32007        user    inodes           2           0           0          loaded
32007       group 1k-blocks      337720           0           0          loaded
32007       group    inodes        5672           0           0          loaded
32008        user 1k-blocks           0    10240000    10240000          loaded
32008        user    inodes           0           0           0          loaded
32008       group 1k-blocks        1760           0           0          loaded
32008       group    inodes         174           0           0          loaded
32009       group 1k-blocks          12           0           0    
...

[Updated on: Tue, 13 February 2007 15:08] by Moderator

Report message to a moderator

Re: diskspace no more than 40 GB [message #9946 is a reply to message #9877] Wed, 31 January 2007 09:54 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

And what's the problem? Smile
You've described the situation, but there is no information in post about what confuses you?

Vasily
Re: diskspace no more than 40 GB [message #9952 is a reply to message #9946] Wed, 31 January 2007 11:46 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
the problem is that when i set the diskspace to more than 40 GB it only shows 40 even if i set it to 80 GB
and when the /vz partition gets filled i find that disksapce from df -h inside the vz automatically decrease from 40 to 38 to 35 to 30 GB and so on

------
forgot to say
i got this from /etc/fstab

/dev/sda9 /vz ext3 defaults,usrquota 1 2

i have quotas on but when i try to start up a vps it cannot and alwayse say quota error file exists wven when i delete /var/vzquotas/* or do anything
so my only fix to make it able to starta vps is to runthe following command

quotaoff /vz
then when i start my vps's with disk quotas on they start but the problem i described above occures
Re: diskspace no more than 40 GB [message #9953 is a reply to message #9952] Wed, 31 January 2007 12:10 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
There is an article at wiki, where this behaviour is described:
http://wiki.openvz.org/OpenVZ_disk_quota%2C_df_and_stat_weir d_behaviour
Re: diskspace no more than 40 GB [message #9959 is a reply to message #9953] Wed, 31 January 2007 16:01 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
Hello
i went through that page
and i tried
stoping the vps
dropquota VEID
starting the vps

and i still cannot get the df to tell the diskspace written in the VEID.conf file Sad
please help as its urgent for me

[Updated on: Wed, 31 January 2007 16:02]

Report message to a moderator

Re: diskspace no more than 40 GB [message #9966 is a reply to message #9959] Thu, 01 February 2007 07:50 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Please, start the VE in question (let VE id is <veid>) and provide the following information:

1) output of `df -a`
2) output of `vzquota stat <veid>`
3) output of `cat /etc/vz/conf/<veid>.conf`
4) output of `cat /etc/vz/vz.conf`

Thanks.

P.S. Please, attach this information as a separate files!
Re: diskspace no more than 40 GB [message #9970 is a reply to message #9966] Thu, 01 February 2007 12:01 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
hello
thanks for your interest in helping me i do appreciate this
here is the data you asked




commands are excuted and output attached as per requested


ps. this problem is not specific to a certain VEID but its global to all vps ( i cannot make their df to show a total disk space above 40 GB and when /vz has less than 40 GB free i find that total disk space from the vps df command shows the free space of the /vz partition and my problem is that i want to be able to make df for any vps shows the amount i put in the VEID.conf regardless of how much free space i got on the HN /vz partition )
  • Attachment: out.txt.txt
    (Size: 2.50KB, Downloaded 320 times)

[Updated on: Thu, 01 February 2007 12:06]

Report message to a moderator

Re: diskspace no more than 40 GB [message #9971 is a reply to message #9970] Thu, 01 February 2007 14:01 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello!

According to
# vzquota stat 111
   resource          usage       softlimit      hardlimit    grace
  1k-blocks        2716712        39000000       39100000
                                    ^^^^^

you set a blocks limit for 111th VE to ~39Gb, and only ~2.7Gb are used in VE. Remember these numbers.

According to
#df -a
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda9             95121228  62907700  27381580  70% /vz
                       ^^^^       ^^^^^^

/vz partion is of ~95Gb size and ~63 Gb is used, so ~32Gb is free. Remember these numbers to.

Ok. When you give a df command inside VE, what should it output in this situation? First, consider the total amount of space. Should df output 39Gb? No! VE can't write so much, because there is not enough space on /vz partion.
According to http://wiki.openvz.org/OpenVZ_disk_quota%2C_df_and_stat_weir d_behaviour
df should output quota_usage + free_ext2 = 2.7 + 32 = ~34Gb. This is what we see in your output:

# df -a
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/simfs            34930264   2716712  27381604  10% /
                        ^^^^^^


So you problem is actually formulated in http://wiki.openvz.org/OpenVZ_disk_quota%2C_df_and_stat_weir d_behaviour:
"Do not set random disk quota barrier/limit! Even if you want VE to be unlimited, consider reasonable values."

HTH,
Vasily.
Re: diskspace no more than 40 GB [message #9974 is a reply to message #9971] Thu, 01 February 2007 15:05 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
Hello
thanks for your follow up
i understood that

but that doesn't mean that i cannot oversell spaces at all ? i know i should not oversell but im sure that some vps's wont consume all allocated space
any work around please
Re: diskspace no more than 40 GB [message #9975 is a reply to message #9974] Thu, 01 February 2007 15:15 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Quote:


... i'm sure that some vps's wont consume all allocated space...



If so, why do you want to set so big blocks limit? Smile Why not decrease it?

Thanks,
Vasily.
Re: diskspace no more than 40 GB [message #9976 is a reply to message #9975] Thu, 01 February 2007 16:39 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
Lolz
thats because i wanted to oversell diskspace and then add new HDDS and the real partition gets filled physically
so am i able to set diskspace string in the VEID.conf to a number higher than the sum of ( the free space on the /vz partition + used space by the ve itself )
Re: diskspace no more than 40 GB [message #9980 is a reply to message #9976] Thu, 01 February 2007 19:26 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
please help me
Re: diskspace no more than 40 GB [message #9986 is a reply to message #9974] Fri, 02 February 2007 11:52 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

More, you can oversell diskspace.
BUT. There is one problem. Some applications like RPM use df output
for determining whether they will succeed. So df should not report
more space then there is *really* physically available on the disk.

So if you have only 1Gb free on /vz, and set 100Gb limit on all your VEs - ok, but df will still show MAX 1GB free.

If you still want to show more - do a small patch for kernel, but I informed about potential problems.


http://static.openvz.org/userbars/openvz-developer.png
Re: diskspace no more than 40 GB [message #9987 is a reply to message #9986] Fri, 02 February 2007 11:55 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
Hello
thanks for your reply
iminterested in patching kernel to have this working
please guide me through this Smile and i will be more than thankful
Re: diskspace no more than 40 GB [message #9988 is a reply to message #9987] Fri, 02 February 2007 11:59 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

take a look at fs/simfs.c, function quota_get_stat()

I suppose you are interested in 2 if's:

if (buf->f_bfree < free_blk)
adj_blk = free_blk - buf->f_bfree;

if (free_blk < buf->f_bavail)
buf->f_bavail = (long)free_blk; /* min(f_bavail, free_blk) */




http://static.openvz.org/userbars/openvz-developer.png
Re: diskspace no more than 40 GB [message #10003 is a reply to message #9988] Sun, 04 February 2007 09:23 Go to previous messageGo to next message
mora is currently offline  mora
Messages: 37
Registered: October 2006
Member
Hello
since im a noob and never compiler , batched akernel

i would that you please provide me / us with this batch

i think this would be so great

thanks in advance
Re: diskspace no more than 40 GB [message #10216 is a reply to message #10003] Mon, 12 February 2007 21:31 Go to previous message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

I've attached the patch in http://forum.openvz.org/index.php?t=tree&th=1932&mid =10185&&rev=&reveal=
Previous Topic: Emergency - Server Crash
Next Topic: *SOLVED* ports and port forwarding
Goto Forum:
  


Current Time: Mon Nov 11 15:50:04 GMT 2024

Total time taken to generate the page: 0.03901 seconds