Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
ee368f9f
Commit
ee368f9f
authored
May 06, 2014
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #300: use disk_quota default settings from /etv/vz/vz.conf
parent
18baa942
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
OpenVZ.pm
PVE/OpenVZ.pm
+15
-0
OpenVZMigrate.pm
PVE/OpenVZMigrate.pm
+1
-1
No files found.
PVE/OpenVZ.pm
View file @
ee368f9f
...
...
@@ -112,6 +112,17 @@ sub get_rootdir {
return
$root
;
}
sub
get_disk_quota
{
my
(
$conf
)
=
@_
;
my
$disk_quota
=
$global_vzconf
->
{
disk_quota
};
if
(
$conf
->
{
disk_quota
}
&&
defined
(
$conf
->
{
disk_quota
}
->
{
value
}))
{
$disk_quota
=
$conf
->
{
disk_quota
}
->
{
value
};
}
return
$disk_quota
;
}
sub
read_user_beancounters
{
my
$ubc
=
{};
...
...
@@ -436,6 +447,7 @@ sub read_global_vz_config {
privatedir
=>
'
/var/lib/vz/private/$VEID
',
# note '$VEID' is a place holder
dumpdir
=>
'
/var/lib/vz/dump
',
lockdir
=>
'
/var/lib/vz/lock
',
disk_quota
=>
1
,
};
my
$filename
=
"
/etc/vz/vz.conf
";
...
...
@@ -473,6 +485,9 @@ sub read_global_vz_config {
$dir
=~
s/^\"(.*)\"/$1/
;
$res
->
{
lockdir
}
=
$dir
;
}
if
(
$data
=~
m/^\s*DISK_QUOTA=(no|false|off|0)$/m
)
{
$res
->
{
disk_quota
}
=
0
;
}
return
$res
;
};
...
...
PVE/OpenVZMigrate.pm
View file @
ee368f9f
...
...
@@ -164,7 +164,7 @@ sub phase1 {
}
}
my
$disk_quota
=
$conf
->
{
disk_quota
}
->
{
value
}
;
my
$disk_quota
=
PVE::OpenVZ::
get_disk_quota
(
$conf
)
;
if
(
!
defined
(
$disk_quota
)
||
(
$disk_quota
!=
0
))
{
$disk_quota
=
$self
->
{
disk_quota
}
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment