User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:public:create_a_raid_array [2017/10/26 05:05]
craibuc adding content
en:public:create_a_raid_array [2017/10/27 13:55] (current)
craibuc adding content
Line 50: Line 50:
 mmcblk0rpmb ​    ​4M ​                                                       mmcblk0rpmb ​    ​4M ​                                                      
 </​code>​ </​code>​
-  - Mount drive by adding a section to /​etc/​config/​fstab:​ <​code>​+  - Mount drive by adding a section ​(**choose one of the two options**) ​to ''​/​etc/​config/​fstab''​: <​code>​
 # cat /​etc/​config/​fstab # cat /​etc/​config/​fstab
 +
 +# mount using UUID
 config mount config mount
  option enabled '​1'​  option enabled '​1'​
  option uuid '​[UUID]'​  option uuid '​[UUID]'​
  option target '/​mnt/​raid'​  option target '/​mnt/​raid'​
 +
 +# mount using device ​
 +config mount
 + option enabled '​1'​
 + option device '/​dev/​md0'​
 + option target '/​mnt/​raid'​
 +
 </​code>​ </​code>​
-  - Create the settings file with the following contents(/​etc/​mdadm/​mdadm.conf:​ <​code>​+  - Create the settings file (''​/​etc/​mdadm/​mdadm.conf''​) with the following contents: <​code>​
 # mdadm.conf # mdadm.conf
 # #
Line 100: Line 109:
 </​code>​ </​code>​
   - Test the settings file:<​code>​   - Test the settings file:<​code>​
-# mdadm --monitor --scan --test+# mdadm --monitor --scan --test ​--oneshot
 </​code>​ </​code>​
-  - An email should be received:<​code>​+  - An email should be received:<​code ​txt>
 This is an automatically generated mail message from mdadm running on turris ​ This is an automatically generated mail message from mdadm running on turris ​
  
Line 119: Line 128:
 unused devices: <​none> ​ unused devices: <​none> ​
 </​code>​ </​code>​
-  - Adjust /​etc/​rc.local to enable RAID on boot: <​code>​+  - Adjust ​''​/​etc/​rc.local'' ​to enable RAID on boot: <​code>​
 # disable NCQ # disable NCQ
 echo 1 > /​sys/​block/​sda/​device/​queue_depth echo 1 > /​sys/​block/​sda/​device/​queue_depth
Line 126: Line 135:
 # start RAID array # start RAID array
 mdadm --assemble --scan mdadm --assemble --scan
 +
 +# start RAID monitoring
 +# --scan ​       -s   : find mail-address/​program in config file (/​etc/​mdadm/​mdadm.conf)
 +# --test ​       -t   : Generate a TestMessage event against each array at startup
 +# --daemonise ​  ​-f ​  : Fork and continue in child, parent exits
 +mdadm --monitor --scan --test --daemonize
  
 # existing code # existing code