Difference between revisions of "User:Mike"

From SME Server
Jump to navigationJump to search
Line 27: Line 27:
  
 
In the Boot Menu select Advanced installation options.
 
In the Boot Menu select Advanced installation options.
[[File:pic01.gif|499px|frameless|none|Advanced install options]]
+
[[File:pic01.gif|499px|frameless|none|Picture 1]]
  
  
 
Select Install or upgrade using the graphical installer.
 
Select Install or upgrade using the graphical installer.
[[File:pic02.gif|498px|frameless|none|Graphic installer]]
+
[[File:pic02.gif|498px|frameless|none|Picture 2]]
  
  
 
Skip the media check unless you have a reason not to.
 
Skip the media check unless you have a reason not to.
[[File:pic03.gif|590px|frameless|none|Media check]]
+
[[File:pic03.gif|590px|frameless|none|Picture 3]]
  
  
 
Select your language.
 
Select your language.
 
In this example we choose English.
 
In this example we choose English.
[[File:pic04.gif|589px|frameless|none|Media check]]
+
[[File:pic04.gif|589px|frameless|none|Picture 4]]
 
Click next.
 
Click next.
  
Line 46: Line 46:
 
Select your keyboard layout.
 
Select your keyboard layout.
 
In this example we choose U.S. English.
 
In this example we choose U.S. English.
[[File:pic05.gif|587px|frameless|none|Media check]]
+
[[File:pic05.gif|587px|frameless|none|Picture 5]]
 
Click next.
 
Click next.
  
  
 
Select Basic Storage Devices.
 
Select Basic Storage Devices.
[[File:pic06.gif|588px|frameless|none|Media check]]
+
[[File:pic06.gif|588px|frameless|none|Picture 6]]
 
Click next.
 
Click next.
  
  
 
Select Yes, discard any data.
 
Select Yes, discard any data.
[[File:pic07.gif|590px|frameless|none|Media check]]
+
[[File:pic07.gif|590px|frameless|none|Picture 7]]
 
Click next.
 
Click next.
  
  
 
Select your timezone.
 
Select your timezone.
[[File:pic08.gif|589px|frameless|none|Media check]]
+
[[File:pic08.gif|589px|frameless|none|Picture 8]]
 
Click next.
 
Click next.
  
  
 
Select Create Custom Layout.
 
Select Create Custom Layout.
[[File:pic09.gif|589px|frameless|none|Media check]]
+
[[File:pic09.gif|589px|frameless|none|Picture 9]]
 
Click next.
 
Click next.
  
Line 74: Line 74:
 
For the example I have two 40GByte SSD disks.
 
For the example I have two 40GByte SSD disks.
 
Both disks have a 250MB system partition (sda1 and sdb1) and a larger partition for the rest of the data (sda2 and sdb2).
 
Both disks have a 250MB system partition (sda1 and sdb1) and a larger partition for the rest of the data (sda2 and sdb2).
[[File:pic10.gif|590px|frameless|none|Media check]]
+
[[File:pic10.gif|590px|frameless|none|Picture 10]]
 
Click next.
 
Click next.
  
Line 81: Line 81:
 
After that you have a 2 partition free SSD’s like shown below.
 
After that you have a 2 partition free SSD’s like shown below.
 
You can see the disk is 40959 MB in size.
 
You can see the disk is 40959 MB in size.
[[File:pic11.gif|590px|frameless|none|Media check]]
+
[[File:pic11.gif|590px|frameless|none|Picture 11]]
  
  
Line 97: Line 97:
 
Select RAID Partition and click create.
 
Select RAID Partition and click create.
 
Set all options like shown in the folowing screen and select OK:
 
Set all options like shown in the folowing screen and select OK:
[[File:pic12.gif|293px|frameless|none|Media check]]
+
[[File:pic12.gif|293px|frameless|none|Picture 12]]
 
The size of the partition (250MB) will be the same whatever size SSD you will be using.
 
The size of the partition (250MB) will be the same whatever size SSD you will be using.
  
Line 103: Line 103:
 
Select RAID Partition and click create.
 
Select RAID Partition and click create.
 
Set all options like shown in the folowing screen and select OK:
 
Set all options like shown in the folowing screen and select OK:
[[File:pic13.gif|295px|frameless|none|Media check]]
+
[[File:pic13.gif|295px|frameless|none|Picture 13]]
 
The size of the partition will be 90% of the SSD size - 250MB.
 
The size of the partition will be 90% of the SSD size - 250MB.
 
So this size will depend on the size SSD you are using and using 10% Over Provisioning.
 
So this size will depend on the size SSD you are using and using 10% Over Provisioning.
Line 111: Line 111:
 
Select RAID Partition and click create.
 
Select RAID Partition and click create.
 
Set all options like shown in the folowing screen and select OK:
 
Set all options like shown in the folowing screen and select OK:
[[File:pic14.gif|295px|frameless|none|Media check]]
+
[[File:pic14.gif|295px|frameless|none|Picture 14]]
 
The size of the partition (250MB) will be the same whatever size SSD you will be using.
 
The size of the partition (250MB) will be the same whatever size SSD you will be using.
  
Line 117: Line 117:
 
Select RAID Partition and click create.
 
Select RAID Partition and click create.
 
Set all options like shown in the folowing screen and select OK:
 
Set all options like shown in the folowing screen and select OK:
[[File:pic15.gif|294px|frameless|none|Media check]]
+
[[File:pic15.gif|294px|frameless|none|Picture 15]]
 
The size of the partition will be 90% of the SSD size - 250MB.
 
The size of the partition will be 90% of the SSD size - 250MB.
 
So this size will depend on the size SSD you are using and using 10% Over Provisioning.
 
So this size will depend on the size SSD you are using and using 10% Over Provisioning.
Line 124: Line 124:
 
Select RAID Device and click create.
 
Select RAID Device and click create.
 
Set all options like shown in the folowing screen and select OK:
 
Set all options like shown in the folowing screen and select OK:
[[File:pic16.gif|239px|frameless|none|Media check]]
+
[[File:pic16.gif|239px|frameless|none|Picture 16]]
 
Make sure you select both system partitions sda1 and sdb1 witch both are 250MB.
 
Make sure you select both system partitions sda1 and sdb1 witch both are 250MB.
  
Line 130: Line 130:
 
Select RAID Device and click create.
 
Select RAID Device and click create.
 
Set all options like shown in the folowing screen and select OK:
 
Set all options like shown in the folowing screen and select OK:
[[File:pic17.gif|240px|frameless|none|Media check]]
+
[[File:pic17.gif|240px|frameless|none|Picture 17]]
 
Make sure you select both system partitions sda2 and sdb2.
 
Make sure you select both system partitions sda2 and sdb2.
 
 
Line 136: Line 136:
 
Select LVM Volume Group and click create.
 
Select LVM Volume Group and click create.
 
Select Add and set all options like shown in the folowing screen and select OK:
 
Select Add and set all options like shown in the folowing screen and select OK:
[[File:pic18.gif|323px|frameless|none|Media check]]
+
[[File:pic18.gif|323px|frameless|none|Picture 18]]
 
Set the swap size the same as the default setting that was presented to you earlier.
 
Set the swap size the same as the default setting that was presented to you earlier.
  
 
Select Add again and set all options like shown in the folowing screen and select OK:
 
Select Add again and set all options like shown in the folowing screen and select OK:
[[File:pic19.gif|323px|frameless|none|Media check]]
+
[[File:pic19.gif|323px|frameless|none|Picture 19]]
 
Set the size the same as the maximum size shown in the same window.
 
Set the size the same as the maximum size shown in the same window.
 
 
 
Select OK again in this window to start the installation.
 
Select OK again in this window to start the installation.
[[File:pic20.gif|323px|frameless|none|Media check]]
+
[[File:pic20.gif|323px|frameless|none|Picture 20]]
  
  
 
The RAID1 set you just created is shown now.
 
The RAID1 set you just created is shown now.
 
Notice that both sda and sdb have 10% of free space now.
 
Notice that both sda and sdb have 10% of free space now.
[[File:pic21.gif|592px|frameless|none|Media check]]
+
[[File:pic21.gif|592px|frameless|none|Picture 21]]
 
Click next.  
 
Click next.  
 
 
 
Select Write changes to disk.
 
Select Write changes to disk.
[[File:pic22.gif|235px|frameless|none|Media check]]
+
[[File:pic22.gif|235px|frameless|none|Picture 22]]
  
  
 
After the partitioning/formatting has finished you will see the screen below:
 
After the partitioning/formatting has finished you will see the screen below:
[[File:pic23.gif|593px|frameless|none|Media check]]
+
[[File:pic23.gif|593px|frameless|none|Picture 23]]
 
Click next.
 
Click next.
  
 
The packages will now be installed.
 
The packages will now be installed.
[[File:pic24.gif|594px|frameless|none|Media check]]
+
[[File:pic24.gif|594px|frameless|none|Picture 24]]
  
  
 
After some time your installation will be completed and you are asked to reboot:
 
After some time your installation will be completed and you are asked to reboot:
[[File:pic25.gif|592px|frameless|none|Media check]]
+
[[File:pic25.gif|592px|frameless|none|Picture 25]]
 
Click Reboot.
 
Click Reboot.
 
After reboot, finish your SME configuration as you are used to, set an admin password, IP-settings and so on…
 
After reboot, finish your SME configuration as you are used to, set an admin password, IP-settings and so on…
 
 
 
Login to your server with user root and use the command cat /proc/mdstat to check if your RAID1 set is synchronising:
 
Login to your server with user root and use the command cat /proc/mdstat to check if your RAID1 set is synchronising:
[[File:pic26.gif|591px|frameless|none|Media check]]
+
[[File:pic26.gif|591px|frameless|none|Picture 26]]
  
  
 
After the synchronisation finished the command cat /proc/mdstat output should look something like this:
 
After the synchronisation finished the command cat /proc/mdstat output should look something like this:
[[File:pic27.gif|340px|frameless|none|Media check]]
+
[[File:pic27.gif|340px|frameless|none|Picture 27]]
  
 
'''Tip:'''  
 
'''Tip:'''  
 
Do not use the admin account to add an SSD disk to a RAID1 set that is custum partitioned to use less than 100% of the disk space from the menu (Option 5. Manage disk redundancy) because the script behind this option will not check how the disk that needs to be cloned is partitioned.
 
Do not use the admin account to add an SSD disk to a RAID1 set that is custum partitioned to use less than 100% of the disk space from the menu (Option 5. Manage disk redundancy) because the script behind this option will not check how the disk that needs to be cloned is partitioned.
 
The script will add the disk but will partition it using 100% of the disk space even when the first SSD disk in the RAID1 set is partitioned using less than 100% of the disk space.
 
The script will add the disk but will partition it using 100% of the disk space even when the first SSD disk in the RAID1 set is partitioned using less than 100% of the disk space.

Revision as of 23:45, 16 September 2014

Setup an SME Server with 2 SSD’s in a RAID1 setup with Over Provisioning


Write Amplification

This manual describes how to setup an SME Server with 2 Solid State Drives (SSD’s) in a RAID1 setup with Over Provisioning to prevent Write Amplification. SSD’s are much faster than conventional hard disks and they last longer if you threat them right. An SSD is vulnerable to Write Amplification which means it writes and erases certain memory blocks more than others and therefor the most used memory blocks reach the maximum amount of writes it can do much faster. This is because it uses the free space of the SSD to move data around which means that the Write Amplification and therefor the performance and the lifecycle of the SSD decrease drastically if the SSD just has a few % of empty space left. 2 ways to prevent Write Amplification are Over Provisioning and Trimming (Garbage collection). Unfortunately Trimming is still unsupported on Software RAID like used in the SME Server which leaves us with Over Provisioning. Also SSD’s in RAID5 is discouraged as it also vastly increases Write Amplification. Because this is a manual on how to setup an SME Server with 2 SSD’s in a RAID1 setup with Over Provisioning to prevent Write Amplification, and not on What Write Amplification is exactly, I will not go into that any further. For more information on that, this is a good place to start: http://en.wikipedia.org/wiki/Write_amplification


Over Provisioning

Over Provisioning is a fancy term for partitioning xx% less than the full capacity of the disk. There is not a right amount of Over Provisioning but 10% is usually an average used setting which means you only use 90% of the disk size to partition. Because the default RAID1 installation of the SME Server is not made with SSD’s in mind, it uses 100% of the 2 disks capacity which means we have to manually partition the 2 disks.| This manual shows you how to do that and it is made using the SME Server 9.0 as an example.


Setup an SME Server with 2 SSD’s in a RAID1 setup with Over Provisioning

In the Boot Menu select Advanced installation options.

Picture 1


Select Install or upgrade using the graphical installer.

Picture 2


Skip the media check unless you have a reason not to.

Picture 3


Select your language. In this example we choose English.

Picture 4

Click next.


Select your keyboard layout. In this example we choose U.S. English.

Picture 5

Click next.


Select Basic Storage Devices.

Picture 6

Click next.


Select Yes, discard any data.

Picture 7

Click next.


Select your timezone.

Picture 8

Click next.


Select Create Custom Layout.

Picture 9

Click next.


You are given a default RAID1 layout which uses the full disk capacity. This is where we start costomizing the partition layout. For the example I have two 40GByte SSD disks. Both disks have a 250MB system partition (sda1 and sdb1) and a larger partition for the rest of the data (sda2 and sdb2).

Picture 10

Click next.


Remove all partitions by selecting sda and sdb and selection delete with both. After that you have a 2 partition free SSD’s like shown below. You can see the disk is 40959 MB in size.

Picture 11


Now, Over Provisioning usually is set somewhere between 5% and 25% and like said before, there is no right value to set for Over Provisioning. Usually people set it at 10% and that is what most SSD tools advise. Setting it lower than that will age your SSD disk faster and will compromise your SSD’s performance. If you are rather safe that sorry and the diskcapacity of your RAID1 set is not an issue you could set it to 15% or 20%. Setting it higher seems like overkill to me. In our example we will use 10% Over Provisioning. The system (250MB) and swap (4064MB) partitions will be the same size as in the default setting. That will make the size of the larger data partition: 40959MB x 0,9 = 36863MB – 250MB = 36613MB.


We will start bij partitioning disk sda. Select sda and click create. Select RAID Partition and click create. Set all options like shown in the folowing screen and select OK:

Picture 12

The size of the partition (250MB) will be the same whatever size SSD you will be using.

Under sda select the Free space and click create. Select RAID Partition and click create. Set all options like shown in the folowing screen and select OK:

Picture 13

The size of the partition will be 90% of the SSD size - 250MB. So this size will depend on the size SSD you are using and using 10% Over Provisioning.

Now we will do the same for the disk sdb. Select sdb and click create. Select RAID Partition and click create. Set all options like shown in the folowing screen and select OK:

Picture 14

The size of the partition (250MB) will be the same whatever size SSD you will be using.

Under sda select the Free space and click create. Select RAID Partition and click create. Set all options like shown in the folowing screen and select OK:

Picture 15

The size of the partition will be 90% of the SSD size - 250MB. So this size will depend on the size SSD you are using and using 10% Over Provisioning.

Select Hard Drives and select create. Select RAID Device and click create. Set all options like shown in the folowing screen and select OK:

Picture 16

Make sure you select both system partitions sda1 and sdb1 witch both are 250MB.

Select Hard Drives and select create. Select RAID Device and click create. Set all options like shown in the folowing screen and select OK:

Picture 17

Make sure you select both system partitions sda2 and sdb2.   Under RAID Devices select md1 and click create. Select LVM Volume Group and click create. Select Add and set all options like shown in the folowing screen and select OK:

Picture 18

Set the swap size the same as the default setting that was presented to you earlier.

Select Add again and set all options like shown in the folowing screen and select OK:

Picture 19

Set the size the same as the maximum size shown in the same window.   Select OK again in this window to start the installation.

Picture 20


The RAID1 set you just created is shown now. Notice that both sda and sdb have 10% of free space now.

Picture 21

Click next.   Select Write changes to disk.

Picture 22


After the partitioning/formatting has finished you will see the screen below:

Picture 23

Click next.

The packages will now be installed.

Picture 24


After some time your installation will be completed and you are asked to reboot:

Picture 25

Click Reboot. After reboot, finish your SME configuration as you are used to, set an admin password, IP-settings and so on…   Login to your server with user root and use the command cat /proc/mdstat to check if your RAID1 set is synchronising:

Picture 26


After the synchronisation finished the command cat /proc/mdstat output should look something like this:

Picture 27

Tip: Do not use the admin account to add an SSD disk to a RAID1 set that is custum partitioned to use less than 100% of the disk space from the menu (Option 5. Manage disk redundancy) because the script behind this option will not check how the disk that needs to be cloned is partitioned. The script will add the disk but will partition it using 100% of the disk space even when the first SSD disk in the RAID1 set is partitioned using less than 100% of the disk space.