<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>raid Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/raid/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 10 Oct 2019 02:26:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How To Set Up A Software RAID-1 On Centos8</title>
		<link>https://www.osradar.com/how-to-set-up-a-software-raid-1-on-centos8/</link>
					<comments>https://www.osradar.com/how-to-set-up-a-software-raid-1-on-centos8/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Fri, 11 Oct 2019 08:50:49 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[centos8]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[tools]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=14165</guid>

					<description><![CDATA[<p>RAID introduces:&#160;(Redundant Array of Inexpensive Disks or Drives, or&#160;Redundant Array of Independent Disks) is a data&#160;storage virtualization&#160;technology that combines multiple physical&#160;disk drive&#160;components into one or more logical units for the purposes of&#160;data redundancy, performance improvement, or both. This was in contrast to the previous concept of highly reliable mainframe disk drives referred to as &#8220;single [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-set-up-a-software-raid-1-on-centos8/">How To Set Up A Software RAID-1 On Centos8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><strong>RAID introduces:&nbsp;(Redundant Array of Inexpensive Disks or Drives, or&nbsp;Redundant Array of Independent Disks) </strong>is a data&nbsp;<a href="https://en.wikipedia.org/wiki/Storage_virtualization">storage virtualization</a>&nbsp;technology that combines multiple physical&nbsp;<a href="https://en.wikipedia.org/wiki/Disk_drive">disk drive</a>&nbsp;components into one or more logical units for the purposes of&nbsp;<a href="https://en.wikipedia.org/wiki/Data_redundancy">data redundancy</a>, performance improvement, or both. This was in contrast to the previous concept of highly reliable mainframe disk drives referred to as &#8220;single large expensive disk&#8221; (SLED). </p>



<p>Data is distributed across the drives in one of several ways, referred to as RAID levels, depending on the required level of and performance. The different schemes, or data distribution layouts, are named by the word &#8220;RAID&#8221; followed by a number, for example, RAID&nbsp;0 or RAID&nbsp;1. Each scheme, or RAID level, provides a different balance among the key goals:&nbsp;<a href="https://en.wikipedia.org/wiki/Reliability_engineering">reliability</a>,&nbsp;<a href="https://en.wikipedia.org/wiki/Availability">availability</a>,&nbsp;<a href="https://en.wikipedia.org/wiki/Computer_performance">performance</a>, and&nbsp;<a href="https://en.wikipedia.org/wiki/Computer_data_storage#Capacity">capacity</a>. RAID levels greater than RAID&nbsp;0 provide protection against unrecoverable&nbsp;<a href="https://en.wikipedia.org/wiki/Disk_sector">sector</a>&nbsp;read errors, as well as against failures of whole physical drives.——[<a href="https://en.wikipedia.org/wiki/RAID">RAID.wikipedia]</a></p>



<h3><strong>The test environment</strong></h3>



<ul><li>CentOS 8.0 virtual machine</li><li>Add two hard disks</li><li>The installation for mdadm</li></ul>



<h3><strong>raid-1 operating steps</strong></h3>



<ul><li>Use LSBLK to view the current hard disk partition</li></ul>



<pre class="wp-block-preformatted">lsblk</pre>



<figure class="wp-block-image is-resized"><img loading="lazy" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/raid.png" alt="" class="wp-image-14462" width="690" height="330" srcset="https://www.osradar.com/wp-content/uploads/2019/10/raid.png 581w, https://www.osradar.com/wp-content/uploads/2019/10/raid-300x144.png 300w" sizes="(max-width: 690px) 100vw, 690px" /><figcaption> disk partition info</figcaption></figure>



<p>You can see that sdb and sdc are not in use</p>



<ul><li>partition for sdb and sdc</li></ul>



<p>Because RAID requires the same size of each hard disk, sdb and sdc are partitioned respectively, and each hard disk is partitioned into a 16G partition, and Hex code is modified as fd</p>



<pre class="wp-block-preformatted">fdisk /dev/sdc</pre>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="413" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/fdisk-1024x413.png" alt="partition for sdc" class="wp-image-14463" srcset="https://www.osradar.com/wp-content/uploads/2019/10/fdisk-1024x413.png 1024w, https://www.osradar.com/wp-content/uploads/2019/10/fdisk-300x121.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/fdisk-768x310.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/fdisk-696x280.png 696w, https://www.osradar.com/wp-content/uploads/2019/10/fdisk-1068x430.png 1068w, https://www.osradar.com/wp-content/uploads/2019/10/fdisk-1042x420.png 1042w, https://www.osradar.com/wp-content/uploads/2019/10/fdisk.png 1330w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption> partition for sdc</figcaption></figure>



<p>Other hard disk partition process omitted, partition after as follows:</p>



<figure class="wp-block-image"><img loading="lazy" width="933" height="306" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/企业微信截图_15706112399803.png" alt="" class="wp-image-14465" srcset="https://www.osradar.com/wp-content/uploads/2019/10/企业微信截图_15706112399803.png 933w, https://www.osradar.com/wp-content/uploads/2019/10/企业微信截图_15706112399803-300x98.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/企业微信截图_15706112399803-768x252.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/企业微信截图_15706112399803-696x228.png 696w" sizes="(max-width: 933px) 100vw, 933px" /><figcaption>disk info</figcaption></figure>



<ul><li>installation mdadm</li></ul>



<pre class="wp-block-preformatted">yum install madadm</pre>



<ul><li>Create a RAID-1</li></ul>



<p>sdb1, sdc1 form a group of raid-1, RAID device named /dev/md0</p>



<pre class="wp-block-preformatted">mdadm -C /dev/md0 -a yes -l 1 -n 2 /dev/sd{c1,b1}</pre>



<figure class="wp-block-image"><img loading="lazy" width="684" height="189" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/raid1.png" alt="raid-1" class="wp-image-14466" srcset="https://www.osradar.com/wp-content/uploads/2019/10/raid1.png 684w, https://www.osradar.com/wp-content/uploads/2019/10/raid1-300x83.png 300w" sizes="(max-width: 684px) 100vw, 684px" /><figcaption>build raid-1</figcaption></figure>



<p>Check the progress:</p>



<pre class="wp-block-preformatted">cat /proc.mdstat </pre>



<figure class="wp-block-image"><img loading="lazy" width="882" height="178" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/raidmastat.png" alt="" class="wp-image-14467" srcset="https://www.osradar.com/wp-content/uploads/2019/10/raidmastat.png 882w, https://www.osradar.com/wp-content/uploads/2019/10/raidmastat-300x61.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/raidmastat-768x155.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/raidmastat-696x140.png 696w" sizes="(max-width: 882px) 100vw, 882px" /><figcaption> progress </figcaption></figure>



<p>View RAID information:</p>



<pre class="wp-block-preformatted">mdadm -D /dev/md0</pre>



<figure class="wp-block-image"><img loading="lazy" width="877" height="386" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/info.png" alt="" class="wp-image-14468" srcset="https://www.osradar.com/wp-content/uploads/2019/10/info.png 877w, https://www.osradar.com/wp-content/uploads/2019/10/info-300x132.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/info-768x338.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/info-696x306.png 696w" sizes="(max-width: 877px) 100vw, 877px" /><figcaption>  RAID information </figcaption></figure>



<p>

Here we create a RAID1 disk array from mdadm

</p>



<ul><li>Create the md0 profile</li></ul>



<pre class="wp-block-preformatted">echo DEVICE /dev/sd{b,c}1 &gt;&gt; /etc/mdadm.conf
mdadm -Evs &gt;&gt; /etc/mdadm.con </pre>



<ul><li>Format &amp; create directory and <a href="https://www.osradar.com/how-to-mount-unmount-a-file-system-in-linux/">mount</a></li></ul>



<pre class="wp-block-preformatted">mkfs.xfs /dev/md0
mkdir    /raid1
mount    /dev/md0 /raid1
df       -h</pre>



<figure class="wp-block-image is-resized"><img loading="lazy" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/10/mount.png" alt="" class="wp-image-14470" width="697" height="383" srcset="https://www.osradar.com/wp-content/uploads/2019/10/mount.png 654w, https://www.osradar.com/wp-content/uploads/2019/10/mount-300x165.png 300w" sizes="(max-width: 697px) 100vw, 697px" /><figcaption>mount disk</figcaption></figure>



<p>At this time we can go to /raid1 directory to store our files</p>



<ul><li>Write the partition table and mount automatically at startup</li></ul>



<pre class="wp-block-preformatted">echo "/dev/md0 /raid1 xfs defaults 0 0" &gt;&gt; /etc/fstab </pre>



<h3><strong>Conclusion</strong></h3>



<p>Save A file to display of RAID 1, RAID will cut into A1, A2, A3, branch of two pieces of written to disk, can make the disk write speed slightly down, because this way is written to disk, one of the hard disk is broken, another have the same backup hard disk, so the RAID 1 is redundant support, but the cost is quite high, also only 1/2 of the disk space can be used</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-set-up-a-software-raid-1-on-centos8/">How To Set Up A Software RAID-1 On Centos8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-set-up-a-software-raid-1-on-centos8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
