Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
ed15a6dd
Commit
ed15a6dd
authored
Mar 30, 2015
by
Mike Hibler
Browse files
Account for LVM roundup of LVs to the extent size (4MiB).
parent
57b3c7e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside/tmcc/linux/liblocstorage.pm
View file @
ed15a6dd
...
...
@@ -916,6 +916,7 @@ sub os_check_storage_slice($$)
my
$ginfo
=
$so
->
{'
DISKINFO
'};
my
$bdisk
=
$so
->
{'
BOOTDISK
'};
my
$pttype
=
"
MBR
";
my
$slop
=
0
;
# figure out the device of interest
if
(
$bsid
eq
"
SYSVOL
")
{
...
...
@@ -926,6 +927,8 @@ sub os_check_storage_slice($$)
$dev
=
"
emulab/
$lv
";
$mdev
=
"
mapper/emulab-
$lv
";
$devtype
=
"
LVM
";
# XXX LVM rounds up to extent size (4 MiB)
$slop
=
3
;
}
my
$devsize
=
$href
->
{'
VOLSIZE
'};
...
...
@@ -943,12 +946,9 @@ sub os_check_storage_slice($$)
# Ditto for size, unless this is the SYSVOL where we ignore user size
# or if the size was not specified.
#
# XXX Note that the size of the volume may be rounded up from what we
# asked for, hopefully not more than 1 MiB!
#
my
$asize
=
$ginfo
->
{
$dev
}
->
{'
size
'};
if
(
$bsid
ne
"
SYSVOL
"
&&
$devsize
&&
!
(
$asize
=
=
$devsize
||
$asize
=
=
$devsize
+
1
))
{
!
(
$asize
>
=
$devsize
&&
$asize
<
=
$devsize
+
$slop
))
{
warn
("
***
$lv
: actual size (
$asize
) != expected size (
$devsize
)
\n
");
return
-
1
;
}
...
...
Write
Preview
Supports
Markdown
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