Merge pull request #597 from bergware/master

Added BTRFS balance mode dropdown options
This commit is contained in:
tom mortensen
2020-02-20 06:41:00 -08:00
committed by GitHub
3 changed files with 14 additions and 10 deletions

View File

@@ -208,7 +208,6 @@ function xfsCheck(path) {
}
function updateMode(form,mode) {
$(form).find('input[name="#arg[3]"]').val(mode);
if (mode.indexOf('raid5')>0||mode.indexOf('raid6')>0) $('#mode-warning').text('RAiD5/6 still has some issues and should be used for testing purposes only'); else $('#mode-warning').text('');
}
$(function() {
<?if (count($sheets)>1):?>
@@ -364,15 +363,15 @@ btrfs balance status:
&nbsp;
: <input type="submit" value="Balance">
<?if ($var['SYS_CACHE_SLOTS']>1):?>
<select name="dconvert" onchange="updateMode(this.form,this.value)">
<select onchange="updateMode(this.form,this.value)">
<?=mk_option(1,'','Perform full balance');?>
<?=mk_option(1,'-dconvert=single -mconvert=raid1','Convert to single mode');?>
<?=mk_option(1,'-dconvert=raid0 -mconvert=raid1','Convert to raid0 mode');?>
<?=mk_option(1,'-dconvert=raid1 -mconvert=raid1','Convert to raid1 mode');?>
<?if ($var['SYS_CACHE_SLOTS']>=4) echo mk_option(1,'-dconvert=raid10 -mconvert=raid10','Convert to raid10 mode');?>
<?if ($var['SYS_CACHE_SLOTS']>=3) echo mk_option(1,'-dconvert=raid5 -mconvert=raid1','Convert to raid5 mode');?>
<?if ($var['SYS_CACHE_SLOTS']>=4) echo mk_option(1,'-dconvert=raid6 -mconvert=raid1','Convert to raid6 mode');?>
</select><span id="mode-warning" class="red-text"></span>
<?if ($var['SYS_CACHE_SLOTS']>=3) echo mk_option(1,'-dconvert=raid5 -mconvert=raid1','Convert to raid5 mode *see help');?>
<?if ($var['SYS_CACHE_SLOTS']>=4) echo mk_option(1,'-dconvert=raid6 -mconvert=raid1','Convert to raid6 mode *see help');?>
</select>
<?else:?>
*Perform full balance*
<?endif;?>
@@ -380,14 +379,19 @@ btrfs balance status:
> **Balance** will run the *btrfs balance* program to restripe the extents across all pool devices, for example,
> to convert the pool from raid1 to raid0 or vice-versa.
>
> Without any options specified a "full balance" is performed which will basically rewrite everything in the filesystem.
> The run time is potentially very long, depending on the filesystem size.
> When a *full balance* is perfomred, it basically rewrites everything in the current filesystem.
>
> A *mode conversion* affects the btrfs data extents; metadata always uses raid1 and is converted to raid1 if necessary by any balance operation.
>
> The run time is potentially very long, depending on the filesystem size and speed of the device.
>
> Unraid uses these default options when creating a multiple-device pool:
>
> `-dconvert=raid1 -mconvert=raid1`
>
> For more complete documentation, please refer to the btrfs-balance [Manpage](https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-balance).
> For more complete documentation, please refer to the btrfs-balance [Manpage](https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-balance)
>
> *Note: raid5 and raid6 are generally still considered **experimental** by the Linux community*
<?else:?>
<input type="hidden" name="#command" value="/webGui/scripts/btrfs_balance">

View File

@@ -33,7 +33,7 @@ span#dropbox{border:1px solid #1c1c1c;border-radius:5px;background:#e8e8e8;paddi
<?endif;?>
i.top{position:absolute;padding-top:4px;cursor:pointer}
i#showPass.checked{opacity:0.5}
.usage-disk.sys{display:inline-block;width:10rem;top:<?=$themes2?'1.2':'.7'?>rem;margin-left:12px;border-radius:4px}
.usage-disk.sys{display:inline-block;width:10rem;top:<?=$themes2?'1.2':'.2'?>rem;margin-left:12px;border-radius:4px}
</style>
<script src="<?autov('/webGui/javascript/jquery.filedrop.js')?>"></script>

View File

@@ -40,7 +40,7 @@ span#dropbox{border:1px solid #1c1c1c;border-radius:5px;background:#e8e8e8;paddi
<?endif;?>
i.top{position:absolute;padding-top:4px;cursor:pointer}
i#showPass.checked{opacity:0.5}
.usage-disk.sys{display:inline-block;width:10rem;top:<?=$themes2?'1.2':'.7'?>rem;margin-left:12px;border-radius:4px}
.usage-disk.sys{display:inline-block;width:10rem;top:<?=$themes2?'1.2':'.2'?>rem;margin-left:12px;border-radius:4px}
</style>
<script src="<?autov('/webGui/javascript/jquery.filedrop.js')?>"></script>