Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 50: Line 50:  
===Save raid array structure===
 
===Save raid array structure===
 
Next we need to save array structure to the mdadm.conf file in order for the SME Server to continue working with the array on reboot of the system.
 
Next we need to save array structure to the mdadm.conf file in order for the SME Server to continue working with the array on reboot of the system.
 +
 
  mdadm --detail --scan | grep md3 >> /etc/mdadm.conf
 
  mdadm --detail --scan | grep md3 >> /etc/mdadm.conf
    
Once that command is run it would be a good idea to look inside it. You should only see one new line in that file.
 
Once that command is run it would be a good idea to look inside it. You should only see one new line in that file.
   
It is the then advisable to create a copy of the mdadm.conf run the following
 
It is the then advisable to create a copy of the mdadm.conf run the following
cp /etc/mdadm.conf /etc/mdadm.conf.bak
+
cp /etc/mdadm.conf /etc/mdadm.conf.bak
Keep this file permanently as it is possible in the future something may occur on your sme server to cause the mdadm.conf file to be trashed or reset, in that case you can use this backup file to rewrite your required raid information.
+
Keep this file permanently as it is possible in the future something may occur on your SME Server to cause the mdadm.conf file to be trashed or reset, in that case you can use this backup file to rewrite your required raid information.
 
  −
 
  −
 
  −
 
  −
for example using this command to partition the new drive
     −
sfdisk -d /dev/sda > sfdisk_sda.output
+
===Create your lvm partition===
sfdisk -f /dev/sde < sfdisk_sda.output
+
When using the vgcreate command use a good name for your partition, I have just used vg_DATA and lv_DATA.
 +
  pvcreate /dev/md3
 +
  vgcreate vg_DATA /dev/md3
 +
  lvcreate --name lv_DATA -l 100%FREE vg_DATA
   −
If you have errors using the sfdisk command, you can clean the drive with the dd command.
+
{{Note box|I have noticed these commands do take a while, be patience..}}
{{Warning box|Be aware that dd is called data-destroyer, be certaing of the partition you want zeroed.}}
  −
#dd if=/dev/zero of=/dev/sdX bs=512 count=1
       
20

edits

Navigation menu