{"id":666,"date":"2021-04-02T12:26:21","date_gmt":"2021-04-02T10:26:21","guid":{"rendered":"https:\/\/apfelcast.com\/?p=666"},"modified":"2021-04-02T12:26:21","modified_gmt":"2021-04-02T10:26:21","slug":"mehrere-festplatten-kombinieren-mit-raspberry-pi-raid-system","status":"publish","type":"post","link":"https:\/\/it-ion.de\/index.php\/2021\/04\/02\/mehrere-festplatten-kombinieren-mit-raspberry-pi-raid-system\/","title":{"rendered":"Mehrere Festplatten kombinieren mit Raspberry Pi &#8211; RAID System"},"content":{"rendered":"\n<div class=\"brlbs-cmpnt-container brlbs-cmpnt-content-blocker brlbs-cmpnt-with-individual-styles\" data-borlabs-cookie-content-blocker-id=\"default\" data-borlabs-cookie-content=\"PGlmcmFtZSB0aXRsZT0iWW91VHViZSB2aWRlbyBwbGF5ZXIiIHNyYz0iaHR0cHM6Ly93d3cueW91dHViZS5jb20vZW1iZWQvdEE0WG4ta1JkMk0iIHdpZHRoPSI1NjAiIGhlaWdodD0iMzE1IiBmcmFtZWJvcmRlcj0iMCIgYWxsb3dmdWxsc2NyZWVuPSJhbGxvd2Z1bGxzY3JlZW4iPjwvaWZyYW1lPg==\">\n<div class=\"brlbs-cmpnt-cb-preset-a\">\n<p class=\"brlbs-cmpnt-cb-description\">Sie sehen gerade einen Platzhalterinhalt von <strong>Standard<\/strong>. Um auf den eigentlichen Inhalt zuzugreifen, klicken Sie auf die Schaltfl\u00e4che unten. Bitte beachten Sie, dass dabei Daten an Drittanbieter weitergegeben werden.<\/p>\n<div class=\"brlbs-cmpnt-cb-buttons\"> <a class=\"brlbs-cmpnt-cb-btn\" href=\"#\" data-borlabs-cookie-unblock role=\"button\">Inhalt entsperren<\/a> <a class=\"brlbs-cmpnt-cb-btn\" href=\"#\" data-borlabs-cookie-accept-service role=\"button\" style=\"display: none\">Erforderlichen Service akzeptieren und Inhalte entsperren<\/a> <\/div>\n<p> <a class=\"brlbs-cmpnt-cb-provider-toggle\" href=\"#\" data-borlabs-cookie-show-provider-information role=\"button\">Mehr Informationen<\/a> <\/div>\n<\/div>\n<p>In diesem Video zeige Ich euch, wie Ihr den Speicherplatz von mehreren Festplatten an eurem Raspberry Pi kombinieren k\u00f6nnt, um so ein gro\u00dfes Volume zu erhalten, oder um die Daten redundant zu Speichern. Wir erstellen also ein RAID System mit einem Raspberry Pi und Ich zeige euch, wie man dieses mit Nextcloud verbindet.<\/p>\n<p>\u00bb\u00bb Ben\u00f6tigte Hardware:<\/p>\n<p>\u00bb Raspberry Pi:<br \/>\nRaspberry Pi 4 mit 4GB RAM: <a href=\"https:\/\/amzn.to\/2NfWfVR\">https:\/\/amzn.to\/2NfWfVR<\/a><\/p>\n<p>\u00bb2,5 Zoll externe Festplatten:<br \/>\n1TB externe Festplatte 2,5 Zoll: <a href=\"https:\/\/amzn.to\/2MO9tKu\">https:\/\/amzn.to\/2MO9tKu<\/a><br \/>\n2TB externe Festplatte 3,5 Zoll: <a href=\"https:\/\/amzn.to\/2pS8PTl\">https:\/\/amzn.to\/2pS8PTl<\/a><br \/>\n500GB SSD Festplatte: <a href=\"https:\/\/amzn.to\/32X3KYA\">https:\/\/amzn.to\/32X3KYA<\/a><\/p>\n<p>\u00bb Cases &amp; Adapter:<br \/>\neSATA auf USB 3.0 Adapter: <a href=\"https:\/\/amzn.to\/343uxlY\">https:\/\/amzn.to\/343uxlY<\/a><br \/>\n2,5 Zoll Festplatten Case: <a href=\"https:\/\/amzn.to\/2Wjni6A\">https:\/\/amzn.to\/2Wjni6A<\/a><br \/>\n3,5 Zoll Festplatten Case: <a href=\"https:\/\/amzn.to\/2WeA9XY\">https:\/\/amzn.to\/2WeA9XY<\/a><\/p>\n<p>\u00bb Stromversorgung &amp; USB-Hub:<br \/>\nUSB-Hub mit ex. Stromversorgung: <a href=\"https:\/\/amzn.to\/2Wi1SXw\">https:\/\/amzn.to\/2Wi1SXw<\/a><br \/>\nStarkes USB-C Netzteil f\u00fcr Pi 4: <a href=\"https:\/\/amzn.to\/2pSiLfA\">https:\/\/amzn.to\/2pSiLfA<\/a><\/p>\n<p>&nbsp;<\/p>\n<div id=\"93964-1\"><script src=\"\/\/ads.themoneytizer.com\/s\/gen.js?type=1\"><\/script><script src=\"\/\/ads.themoneytizer.com\/s\/requestform.js?siteId=93964&#038;formatId=1\"><\/script><\/div>\n<p>&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#### Raspberry Pi RAID Konfiguration ####\n\n## Update Sources ##\nsudo apt-get update\n\n## Install RAID Software mdadm ##\nsudo apt-get install mdadm\n\n## Reboot Pi ##\nsudo reboot\n\n## Check disks ##\nlsblk\n\n## Remove all data &amp; partitions from disks ##\nsudo parted \/dev\/sda \"rm 1\"\nsudo parted \/dev\/sdb \"rm 1\"\n\n## Check if no partitions are on disks ##\nlsblk\n\n## Create MSDOS Table if disk is &lt; 2TB ##\nsudo parted \/dev\/sda \"mklabel msdos\"\nsudo parted \/dev\/sdb \"mklabel msdos\"\n\n## Create GPT Table if disk is &gt; 2TB ##\nsudo parted \/dev\/sda \"mklabel gpt\"\nsudo parted \/dev\/sdb \"mklabel gpt\"\n\n## Create partition on each disk ##\nsudo parted \/dev\/sda \"mkpart primary ext4 1M -1\"\nsudo parted \/dev\/sdb \"mkpart primary ext4 1M -1\"\n\n## Activate RAID for each partition ##\nsudo parted \/dev\/sda \"set 1 raid on\"\nsudo parted \/dev\/sdb \"set 1 raid on\"\n\n\n## Check status ##\nsudo parted -s \/dev\/sda print\nsudo parted -s \/dev\/sdb print\n\n## Create RAID Level 0 ##\nsudo mdadm --create \/dev\/md0 --level=0 --raid-devices=2 \/dev\/sda1 \/dev\/sdb1\n\n## Create RAID Level 1 ##\nsudo mdadm --create \/dev\/md0 --level=1 --raid-devices=2 \/dev\/sda1 \/dev\/sdb1\n\n## Check staus ##\nlsblk\n\n## Create Datasystem on RAID-System to be able to put files on it ##\nsudo mkfs -t ext4 \/dev\/md0\n\n## Check prograss ##\ncat \/proc\/mdstat\nsudo mdadm --detail \/dev\/md0\n\n\n## Create Mount Directory ##\nsudo mkdir \/media\/raid\n\n## Mount RAID ##\nsudo mount \/dev\/md0 \/media\/raid\n\n## Configure autostrat &amp; mount at boot ##\nsudo nano \/etc\/fstab\/\nadd: \/dev\/md0 \/media\/raid ext4 4,nofail 0 0\n\nsudo crontab -e\nadd: @reboot sleep 5; sudo mount \/dev\/md0 \/media\/raid\n\n### Use RAID as Nextcloud data directory ###\n\nsudo su\n\nmkdir \/media\/raid\/nextcloud\/\nchown -R www-data:www-data \/media\/raid\/nextcloud\/\n\n## open current data directory ##\ncd PATH\/TO\/DATA\/\nmv data \/media\/raid\/nextcloud\n\n## Configure Nextcloud data directory ##\nnano \/var\/www\/nextcloud\/config\/config.php\n\nedit this line: 'datadirectory' =&gt; '\/media\/raid\/nextcloud\/data\/',\n\n## restart webserver ##\nservice apache2 restart<\/pre>\n<p>&nbsp;<\/p>\n<h3>apfelcast Support<\/h3>\n<p>Du ben\u00f6tigst Unterst\u00fctzung bei deinem Projekt oder hast Fragen zur Umsetzung?<br \/>\n<strong>Dann melde ich gern bei uns!<\/strong><\/p>\n<p>[button link=&#8220;https:\/\/apfelcast.com\/kontakt&#8220; type=&#8220;big&#8220; class=&#8220; custom-button&#8220;] Kontaktieren[\/button]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sie sehen gerade einen Platzhalterinhalt von Standard. Um auf den eigentlichen Inhalt zuzugreifen, klicken Sie&#8230;<\/p>\n","protected":false},"author":1,"featured_media":667,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-666","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allgemein"],"taxonomy_info":{"category":[{"value":1,"label":"Allgemein"}]},"featured_image_src_large":["https:\/\/it-ion.de\/wp-content\/uploads\/2021\/04\/maxresdefault-1024x576.jpg",1024,576,true],"author_info":{"display_name":"Daniel Klozb\u00fccher","author_link":"https:\/\/it-ion.de\/index.php\/author\/wp-master\/"},"comment_info":0,"category_info":[{"term_id":1,"name":"Allgemein","slug":"allgemein","term_group":0,"term_taxonomy_id":1,"taxonomy":"category","description":"","parent":0,"count":89,"filter":"raw","cat_ID":1,"category_count":89,"category_description":"","cat_name":"Allgemein","category_nicename":"allgemein","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/posts\/666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/comments?post=666"}],"version-history":[{"count":0,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/posts\/666\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/media\/667"}],"wp:attachment":[{"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/media?parent=666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/categories?post=666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it-ion.de\/index.php\/wp-json\/wp\/v2\/tags?post=666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}