patchutil-vserver - Patches: patch #4814, Disk limits support in the...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

patch #4814: Disk limits support in the configuration

Submitted by:  Daniel Hokka Zakrisson <daniel_hozac>
Submitted on:  Fri 20 Jan 2006 05:33:23 AM UTC  
 
Category: Vserver startup/stopPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Enrico Scholz <ensc>Open/Closed: Closed
Release: alpha

Sun 22 Jan 2006 02:28:11 PM UTC, comment #2:

The problem with traversing directories with a 0 tagging is that if you put just the mount point (i.e. /vservers) into .../dlimits/0/directory, you'll get /vservers/.pkg, /vservers/.hash etc. counted against you as well, so the results will be a bit misleading.
That could be fixed by a bit of documentation though, so I guess it really shouldn't be much of a problem.

I didn't think that counting the first directory was important enough to warrant all the special code it would need, as it is just one inode/a few blocks.

I tried to avoid using *chdir(), to get more verbose error messages should there be a problem, but that's more of a debugging thing anyway, so it shouldn't be needed.

Daniel Hokka Zakrisson <daniel_hozac>
Project Member
Sun 22 Jan 2006 01:34:36 PM UTC, comment #1:

much thanks.

Your patch stops traversing when it sees a directory tagged with the
wrong xid and might miss files with the correct xid there. Was this
intentionally? It does not seem to count the first directory, neither.

I rewrote some parts of 'vdu' to use EsafeChdir(), to go into foreign
directories and to count the first directory.

Regarding the cache-files: I use /var/cache/vservers/... for the cache
files; resulting code is a little bit ugly but should work...

0.30.210 should appear soon; very much thanks for you help again.

Enrico Scholz <ensc>
Project AdministratorIn charge of this item.
Fri 20 Jan 2006 05:33:23 AM UTC, original submission:

This patch lets users configure disk limits in /etc/vservers/<name>/dlimits/*/, and have them set on the start of the vserver, as well as saved when stopping the vserver.

For counting the amount of inodes and space used by a certain vserver on a filesystem, I modified the old and broken vdu program (vdu bin etc would not find etc, for instance) and made it useful again.

The cache files will probably need some love, I'm a bit uncertain as to where to put them (or rather, the symlink to their location).

This is the last piece of the disk limits puzzle. A variant of this would be really nice to have in 0.30.210. (do you have an ETA on that, btw?)

Daniel Hokka Zakrisson <daniel_hozac>
Project Member

 

Attached Files
file #9456:  util-vserver-0.30.209-dlimit-config.patch added by daniel_hozac (19kB - application/octet-stream - Disk limit configuration patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter 421 here (basic anti-spam test):

 

 

Follow 6 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 17 Sep 2006 10:17:20 PM UTCdaniel_hozacStatusReady For Test=>Done
  Open/ClosedOpen=>Closed
Sun 22 Jan 2006 01:34:49 PM UTCenscStatusWorks For Me=>Ready For Test
Sun 22 Jan 2006 01:34:36 PM UTCenscStatusNone=>Works For Me
  Assigned toNone=>ensc
Fri 20 Jan 2006 05:33:23 AM UTCdaniel_hozacAttached File-=>Added util-vserver-0.30.209-dlimit-config.patch, #5790
Show feedback again

Back to the top


Powered by Savane 3.1-cleanup