mirror of
https://github.com/webmin/webmin.git
synced 2026-05-26 16:10:29 +01:00
Function to create a thin pool
This commit is contained in:
@@ -195,7 +195,7 @@ thin_desc=A thin pool is a pair of LVs that can be used to create additional LVs
|
||||
thin_header=New thin pool details
|
||||
thin_datalv=Existing LV for data
|
||||
thin_metadatalv=Existing LV for metadata
|
||||
thin_ok=Convert LVs Into Thin Pool
|
||||
thin_ok=Convert LVs To Thin Pool
|
||||
thin_elvs=No LVs that are not already in use were found in this VG!
|
||||
thin_err=Failed to create thin pool
|
||||
thin_esame=Both selected LVs are the same
|
||||
|
||||
@@ -875,5 +875,17 @@ return $out =~ /^(\d+)\./ && $1 >= 3 ||
|
||||
$out =~ /^(\d+)\.(\d+)\.(\d+)/ && $1 == 2 && $2 == 6 && $3 >= 35;
|
||||
}
|
||||
|
||||
# create_thin_pool(&data-lv, &metadata-lv)
|
||||
# Convert two LVs into a thin pool
|
||||
sub create_thin_pool
|
||||
{
|
||||
local ($datalv, $metadatalv) = @_;
|
||||
local $cmd = "lvconvert --type thin-pool --poolmetadata ".
|
||||
quotemeta($metadatalv->{'device'})." ".
|
||||
quotemeta($datalv->{'device'});
|
||||
local $out = &backquote_logged("$cmd 2>&1 </dev/null");
|
||||
return $? ? $out : undef;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user