mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-04 21:37:11 -04:00
added space efficiency info
This commit is contained in:
parent
b476b6808e
commit
cb23cdf343
2 changed files with 33 additions and 1 deletions
|
@ -11,6 +11,10 @@ const raidCalculations = {
|
|||
// total disks * size
|
||||
return (num * size) * unit;
|
||||
},
|
||||
efficiency(num) {
|
||||
// uses 100% of space
|
||||
return 100;
|
||||
},
|
||||
fault(num, size, unit) {
|
||||
return 'None';
|
||||
},
|
||||
|
@ -25,6 +29,10 @@ const raidCalculations = {
|
|||
// total size is size of a single drive
|
||||
return size * unit;
|
||||
},
|
||||
efficiency(num) {
|
||||
// 1/N
|
||||
return (1 / num) * 100;
|
||||
},
|
||||
fault(num, size, unit) {
|
||||
// FT = total - 1
|
||||
return `${num - 1} drive failures`;
|
||||
|
@ -40,6 +48,10 @@ const raidCalculations = {
|
|||
// (N-1) * S (one drive for parity)
|
||||
return ((num - 1) * size) * unit;
|
||||
},
|
||||
efficiency(num) {
|
||||
// 1 - (1/N)
|
||||
return (1 - (1 / num)) * 100;
|
||||
},
|
||||
fault(num, size, unit) {
|
||||
// always 1 failure
|
||||
return '1 drive failure';
|
||||
|
@ -55,6 +67,10 @@ const raidCalculations = {
|
|||
// (N-2) * S (2 parity)
|
||||
return ((num - 2) * size) * unit;
|
||||
},
|
||||
efficiency(num) {
|
||||
// 1 - (2/N)
|
||||
return (1 - (2 / num)) * 100;
|
||||
},
|
||||
fault(num, size, unit) {
|
||||
// always 2 drive failures
|
||||
return '2 drive failures';
|
||||
|
@ -70,6 +86,10 @@ const raidCalculations = {
|
|||
// Total disks (stripe)/2 (mirror)
|
||||
return ((num * size) / 2) * unit;
|
||||
},
|
||||
efficiency(num) {
|
||||
// 1/2 (1/strips per stripe, 2 in this case)
|
||||
return 50;
|
||||
},
|
||||
fault(num, size, unit) {
|
||||
// one per mirror
|
||||
return '1 drive failure per mirrored set';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue