<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Solaris software RAID</title>
	<atom:link href="http://www.tech-recipes.com/rx/225/solaris-software-raid/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tech-recipes.com/rx/225/solaris-software-raid/</link>
	<description>Computer and technology tutorials and guides</description>
	<lastBuildDate>Sun, 22 Nov 2009 02:44:39 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: </title>
		<link>http://www.tech-recipes.com/rx/225/solaris-software-raid/comment-page-1/#comment-2936</link>
		<dc:creator></dc:creator>
		<pubDate>Wed, 21 Jun 2006 09:26:53 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-2936</guid>
		<description>The quick way of making a stripe:

partition each of your disks with a 10mb partition, (I use slice3) to hold your metadb&#039;s, assigning the rest of the space to slice 7

Create you metadb&#039;s
metadb -a -f -c 3 /dev/dsk/c1t1d0s3 /dev/dsk/c1t2d0s3 /dev/dsk/c1t3d0s3

At the following to /etc/lvm/md.tab

d0 3 1 dev/dsk/c1t1d0s7 1  /dev/dsk/c1t2d0s7 1  /dev/dsk/c1t3d0s7

Build the stripe:

metainit d0

create the file system:

newfs  /dev/md/rdsk/d0

mount the file system to check it works:

mount /dev/md/dsk/d0 /mnt

write to it, df it, fsck it, etc.

then edit /etc/vfstab 

/dev/md/dsk/d0   /dev/md/rdsk/d0  /mnt  ufs  2  yes  quota

This means the file system is mounted on /mnt at reboot, and will not be mounted in single user mode, change the 2 for 1 if you want it mounted when the kernel comes up.

Note: it&#039;s usefull to keep the output from newfs somewhere, because if your disk ever dies, you need to know where your next super block is, (for use with fsck) and the output from newfs is the only way you have of knowing this.

Note also, that if you ever screw your metadevice you can still mount the individual disks manually:

mount /dev/dsk /dev/dsk/c1t1d0s7 /mnt

It is frequently quicker to do this, back up the data, then rebuild your metadevice from scratch, then restrore the data, than it is to try to recover the metadevice.

To build a mirror, same rules for partitions

Edit /etc/lvm/md.tab

d0 -m /dev/md/dsk/d1 /dev/md/dsk/d2
d1 1 1 /dev/dsk/c1t1d0s7
d2 1 1 /dev/dsk/c1t2d0s7

The rest is the same.

If ever a mirror disk goes bad, you can do a soft replace with the following command:

metareplace -e d0 c1t2d0s7

It will then try to resync the disk.

If a mirrored disk dies and has to be replaced use the following:

metadb -d /dev/dsk/c1t1d0s3 (to delete the state databases)
replace physical disk (c1t1)
prtvtoc /dev/rdsk/c1t2d0s2 &#124; fmthard –s - /dev/rdsk/c1t1d0s2 (to mirror the partition table, working drive -&gt; new drive)
metadb -a -c 3 /dev/dsk/c1t1d0s3 (to rebuild the state databases)
metareplace -e d0 c1t1d0s7 (to replace the failed mirror)

Note:
You can replace the disk on the fly, repartition and metareplace. *THEN* metadb -d &amp; metadb -a -c 3 with the system up...</description>
		<content:encoded><![CDATA[<p>The quick way of making a stripe:</p>
<p>partition each of your disks with a 10mb partition, (I use slice3) to hold your metadb&#8217;s, assigning the rest of the space to slice 7</p>
<p>Create you metadb&#8217;s<br />
metadb -a -f -c 3 /dev/dsk/c1t1d0s3 /dev/dsk/c1t2d0s3 /dev/dsk/c1t3d0s3</p>
<p>At the following to /etc/lvm/md.tab</p>
<p>d0 3 1 dev/dsk/c1t1d0s7 1  /dev/dsk/c1t2d0s7 1  /dev/dsk/c1t3d0s7</p>
<p>Build the stripe:</p>
<p>metainit d0</p>
<p>create the file system:</p>
<p>newfs  /dev/md/rdsk/d0</p>
<p>mount the file system to check it works:</p>
<p>mount /dev/md/dsk/d0 /mnt</p>
<p>write to it, df it, fsck it, etc.</p>
<p>then edit /etc/vfstab </p>
<p>/dev/md/dsk/d0   /dev/md/rdsk/d0  /mnt  ufs  2  yes  quota</p>
<p>This means the file system is mounted on /mnt at reboot, and will not be mounted in single user mode, change the 2 for 1 if you want it mounted when the kernel comes up.</p>
<p>Note: it&#8217;s usefull to keep the output from newfs somewhere, because if your disk ever dies, you need to know where your next super block is, (for use with fsck) and the output from newfs is the only way you have of knowing this.</p>
<p>Note also, that if you ever screw your metadevice you can still mount the individual disks manually:</p>
<p>mount /dev/dsk /dev/dsk/c1t1d0s7 /mnt</p>
<p>It is frequently quicker to do this, back up the data, then rebuild your metadevice from scratch, then restrore the data, than it is to try to recover the metadevice.</p>
<p>To build a mirror, same rules for partitions</p>
<p>Edit /etc/lvm/md.tab</p>
<p>d0 -m /dev/md/dsk/d1 /dev/md/dsk/d2<br />
d1 1 1 /dev/dsk/c1t1d0s7<br />
d2 1 1 /dev/dsk/c1t2d0s7</p>
<p>The rest is the same.</p>
<p>If ever a mirror disk goes bad, you can do a soft replace with the following command:</p>
<p>metareplace -e d0 c1t2d0s7</p>
<p>It will then try to resync the disk.</p>
<p>If a mirrored disk dies and has to be replaced use the following:</p>
<p>metadb -d /dev/dsk/c1t1d0s3 (to delete the state databases)<br />
replace physical disk (c1t1)<br />
prtvtoc /dev/rdsk/c1t2d0s2 | fmthard –s &#8211; /dev/rdsk/c1t1d0s2 (to mirror the partition table, working drive -&gt; new drive)<br />
metadb -a -c 3 /dev/dsk/c1t1d0s3 (to rebuild the state databases)<br />
metareplace -e d0 c1t1d0s7 (to replace the failed mirror)</p>
<p>Note:<br />
You can replace the disk on the fly, repartition and metareplace. *THEN* metadb -d &amp; metadb -a -c 3 with the system up&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: </title>
		<link>http://www.tech-recipes.com/rx/225/solaris-software-raid/comment-page-1/#comment-2770</link>
		<dc:creator></dc:creator>
		<pubDate>Mon, 27 Mar 2006 09:08:01 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-2770</guid>
		<description>why do you use 64mb? is it enough for every disk size? i want to build raid1 with two 400gb disks, can i still use 64mb?</description>
		<content:encoded><![CDATA[<p>why do you use 64mb? is it enough for every disk size? i want to build raid1 with two 400gb disks, can i still use 64mb?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reg</title>
		<link>http://www.tech-recipes.com/rx/225/solaris-software-raid/comment-page-1/#comment-2445</link>
		<dc:creator>Reg</dc:creator>
		<pubDate>Wed, 14 Dec 2005 05:44:58 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-2445</guid>
		<description>&lt;ul id=&quot;quote&quot;&gt;&lt;h6&gt;Reg wrote:&lt;/h6&gt;&lt;ul id=&quot;quote&quot;&gt;&lt;h6&gt;Anonymous wrote:&lt;/h6&gt;on sol9:

bash-2.05# metainit -f d0 d10
metainit: srv-e4500: d0: &quot;d10&quot;: syntax error

ideas?&lt;/ul&gt;

metainit d0 -m d10
metainit d0 -m d10

the metattach further down should be left without the -f switch since it doesnt exsist in metaattach command

should just be 

metattach d0 d20
metattach d1 d21

not metattach -f d0 d20

otherwise it works like a charm  :wink:&lt;/ul&gt;

sry  
metainit d0 -m d10
metainit d1 -m d11

thats it

reg</description>
		<content:encoded><![CDATA[<ul id="quote">
<h6>Reg wrote:</h6>
</ul>
<ul id="quote">
<h6>Anonymous wrote:</h6>
<p>on sol9:</p>
<p>bash-2.05# metainit -f d0 d10<br />
metainit: srv-e4500: d0: &#8220;d10&#8243;: syntax error</p>
<p>ideas?</ul>
<p>metainit d0 -m d10<br />
metainit d0 -m d10</p>
<p>the metattach further down should be left without the -f switch since it doesnt exsist in metaattach command</p>
<p>should just be </p>
<p>metattach d0 d20<br />
metattach d1 d21</p>
<p>not metattach -f d0 d20</p>
<p>otherwise it works like a charm  :wink:</p>
<p>sry<br />
metainit d0 -m d10<br />
metainit d1 -m d11</p>
<p>thats it</p>
<p>reg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reg</title>
		<link>http://www.tech-recipes.com/rx/225/solaris-software-raid/comment-page-1/#comment-2444</link>
		<dc:creator>Reg</dc:creator>
		<pubDate>Wed, 14 Dec 2005 05:42:25 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-2444</guid>
		<description>&lt;ul id=&quot;quote&quot;&gt;&lt;h6&gt;Anonymous wrote:&lt;/h6&gt;on sol9:

bash-2.05# metainit -f d0 d10
metainit: srv-e4500: d0: &quot;d10&quot;: syntax error

ideas?&lt;/ul&gt;

metainit d0 -m d10
metainit d0 -m d10

the metattach further down should be left without the -f switch since it doesnt exsist in metaattach command

should just be 

metattach d0 d20
metattach d1 d21

not metattach -f d0 d20

otherwise it works like a charm  :wink:</description>
		<content:encoded><![CDATA[<ul id="quote">
<h6>Anonymous wrote:</h6>
<p>on sol9:</p>
<p>bash-2.05# metainit -f d0 d10<br />
metainit: srv-e4500: d0: &#8220;d10&#8243;: syntax error</p>
<p>ideas?</ul>
<p>metainit d0 -m d10<br />
metainit d0 -m d10</p>
<p>the metattach further down should be left without the -f switch since it doesnt exsist in metaattach command</p>
<p>should just be </p>
<p>metattach d0 d20<br />
metattach d1 d21</p>
<p>not metattach -f d0 d20</p>
<p>otherwise it works like a charm  :wink:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.tech-recipes.com/rx/225/solaris-software-raid/comment-page-1/#comment-2014</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 22 Jun 2005 15:36:58 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-2014</guid>
		<description>&lt;ul id=&quot;quote&quot;&gt;&lt;h6&gt;Anonymous wrote:&lt;/h6&gt;on sol9:

bash-2.05# metainit -f d0 d10
metainit: srv-e4500: d0: &quot;d10&quot;: syntax error

ideas?&lt;/ul&gt;

from the metainit man page...

metainit d0 -r d10</description>
		<content:encoded><![CDATA[<ul id="quote">
<h6>Anonymous wrote:</h6>
<p>on sol9:</p>
<p>bash-2.05# metainit -f d0 d10<br />
metainit: srv-e4500: d0: &#8220;d10&#8243;: syntax error</p>
<p>ideas?</ul>
<p>from the metainit man page&#8230;</p>
<p>metainit d0 -r d10</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.tech-recipes.com/rx/225/solaris-software-raid/comment-page-1/#comment-1621</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 15 Apr 2005 07:50:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-1621</guid>
		<description>on sol9:

bash-2.05# metainit -f d0 d10
metainit: srv-e4500: d0: &quot;d10&quot;: syntax error

ideas?</description>
		<content:encoded><![CDATA[<p>on sol9:</p>
<p>bash-2.05# metainit -f d0 d10<br />
metainit: srv-e4500: d0: &#8220;d10&#8243;: syntax error</p>
<p>ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon malone</title>
		<link>http://www.tech-recipes.com/rx/225/solaris-software-raid/comment-page-1/#comment-235</link>
		<dc:creator>jon malone</dc:creator>
		<pubDate>Wed, 07 Jul 2004 00:59:52 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-235</guid>
		<description>got me out of a hole.

Two comments
why do you not put the metadb across 2 physical disks?  Would that not be part of the ideal of mirroring?  Or do the -af -c 2 done twice actually give you a -af -c 4 ?

You say edit vfstab and turn on logging.  For a linux person on solaris I aint too sure about that.  Any clues?

I would appreciate 10 seconds on lockfs -fa  - why not just sync?
 
Again nice article -  it just works, thanks</description>
		<content:encoded><![CDATA[<p>got me out of a hole.</p>
<p>Two comments<br />
why do you not put the metadb across 2 physical disks?  Would that not be part of the ideal of mirroring?  Or do the -af -c 2 done twice actually give you a -af -c 4 ?</p>
<p>You say edit vfstab and turn on logging.  For a linux person on solaris I aint too sure about that.  Any clues?</p>
<p>I would appreciate 10 seconds on lockfs -fa  &#8211; why not just sync?</p>
<p>Again nice article &#8211;  it just works, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qmchenry</title>
		<link>http://www.tech-recipes.com/rx/225/solaris-software-raid/comment-page-1/#comment-138</link>
		<dc:creator>qmchenry</dc:creator>
		<pubDate>Tue, 30 Mar 2004 19:58:39 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-138</guid>
		<description>Great catch!  You are correct.  The recipe has been fixed.  

Thank you for helping to make Tech-Recipes better!</description>
		<content:encoded><![CDATA[<p>Great catch!  You are correct.  The recipe has been fixed.  </p>
<p>Thank you for helping to make Tech-Recipes better!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.tech-recipes.com/rx/225/solaris-software-raid/comment-page-1/#comment-137</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 30 Mar 2004 19:35:55 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-137</guid>
		<description>Shouldn&#039;t this:

metadb -af -c 2 /dev/dsk/c0t0d0s3 /dev/dsk/c0t0d0s4
metadb -af -c 2 /dev/dsk/c0t1d0s3 /dev/dsk/c0t0d0s4 

Be this:

metadb -af -c 2 /dev/dsk/c0t0d0s3 /dev/dsk/c0t0d0s4
metadb -af -c 2 /dev/dsk/c0t1d0s3 /dev/dsk/c0t1d0s4 

bubba AT bubba.org</description>
		<content:encoded><![CDATA[<p>Shouldn&#8217;t this:</p>
<p>metadb -af -c 2 /dev/dsk/c0t0d0s3 /dev/dsk/c0t0d0s4<br />
metadb -af -c 2 /dev/dsk/c0t1d0s3 /dev/dsk/c0t0d0s4 </p>
<p>Be this:</p>
<p>metadb -af -c 2 /dev/dsk/c0t0d0s3 /dev/dsk/c0t0d0s4<br />
metadb -af -c 2 /dev/dsk/c0t1d0s3 /dev/dsk/c0t1d0s4 </p>
<p>bubba AT bubba.org</p>
]]></content:encoded>
	</item>
</channel>
</rss>
