<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Tech-Recipes - Latest Comments in Solaris software RAID | Solaris system administration | Tech-Recipes</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><language>en</language><lastBuildDate>Wed, 21 Jun 2006 05:26:53 -0000</lastBuildDate><item><title>Re: Solaris software RAID | Solaris system administration | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/225/solaris-software-raid/#comment-2767160</link><description>The quick way of making a stripe:&lt;br&gt;&lt;br&gt;partition each of your disks with a 10mb partition, (I use slice3) to hold your metadb's, assigning the rest of the space to slice 7&lt;br&gt;&lt;br&gt;Create you metadb's&lt;br&gt;metadb -a -f -c 3 /dev/dsk/c1t1d0s3 /dev/dsk/c1t2d0s3 /dev/dsk/c1t3d0s3&lt;br&gt;&lt;br&gt;At the following to /etc/lvm/md.tab&lt;br&gt;&lt;br&gt;d0 3 1 dev/dsk/c1t1d0s7 1  /dev/dsk/c1t2d0s7 1  /dev/dsk/c1t3d0s7&lt;br&gt;&lt;br&gt;Build the stripe:&lt;br&gt;&lt;br&gt;metainit d0&lt;br&gt;&lt;br&gt;create the file system:&lt;br&gt;&lt;br&gt;newfs  /dev/md/rdsk/d0&lt;br&gt;&lt;br&gt;mount the file system to check it works:&lt;br&gt;&lt;br&gt;mount /dev/md/dsk/d0 /mnt&lt;br&gt;&lt;br&gt;write to it, df it, fsck it, etc.&lt;br&gt;&lt;br&gt;then edit /etc/vfstab &lt;br&gt;&lt;br&gt;/dev/md/dsk/d0   /dev/md/rdsk/d0  /mnt  ufs  2  yes  quota&lt;br&gt;&lt;br&gt;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.&lt;br&gt;&lt;br&gt;Note: it'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.&lt;br&gt;&lt;br&gt;Note also, that if you ever screw your metadevice you can still mount the individual disks manually:&lt;br&gt;&lt;br&gt;mount /dev/dsk /dev/dsk/c1t1d0s7 /mnt&lt;br&gt;&lt;br&gt;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.&lt;br&gt;&lt;br&gt;To build a mirror, same rules for partitions&lt;br&gt;&lt;br&gt;Edit /etc/lvm/md.tab&lt;br&gt;&lt;br&gt;d0 -m /dev/md/dsk/d1 /dev/md/dsk/d2&lt;br&gt;d1 1 1 /dev/dsk/c1t1d0s7&lt;br&gt;d2 1 1 /dev/dsk/c1t2d0s7&lt;br&gt;&lt;br&gt;The rest is the same.&lt;br&gt;&lt;br&gt;If ever a mirror disk goes bad, you can do a soft replace with the following command:&lt;br&gt;&lt;br&gt;metareplace -e d0 c1t2d0s7&lt;br&gt;&lt;br&gt;It will then try to resync the disk.&lt;br&gt;&lt;br&gt;If a mirrored disk dies and has to be replaced use the following:&lt;br&gt;&lt;br&gt;metadb -d /dev/dsk/c1t1d0s3 (to delete the state databases)&lt;br&gt;replace physical disk (c1t1)&lt;br&gt;prtvtoc /dev/rdsk/c1t2d0s2 | fmthard –s - /dev/rdsk/c1t1d0s2 (to mirror the partition table, working drive -&amp;gt; new drive)&lt;br&gt;metadb -a -c 3 /dev/dsk/c1t1d0s3 (to rebuild the state databases)&lt;br&gt;metareplace -e d0 c1t1d0s7 (to replace the failed mirror)&lt;br&gt;&lt;br&gt;Note:&lt;br&gt;You can replace the disk on the fly, repartition and metareplace. *THEN* metadb -d &amp;amp; metadb -a -c 3 with the system up...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 21 Jun 2006 05:26:53 -0000</pubDate></item><item><title>Re: Solaris software RAID | Solaris system administration | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/225/solaris-software-raid/#comment-2767159</link><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><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 27 Mar 2006 04:08:01 -0000</pubDate></item><item><title>Re: Solaris software RAID | Solaris system administration | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/225/solaris-software-raid/#comment-2767158</link><description>&amp;lt;ul id="quote"&amp;gt;&amp;lt;h6&amp;gt;Reg wrote:&amp;lt;/h6&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;ul id="quote"&amp;gt;&amp;lt;h6&amp;gt;Anonymous wrote:&amp;lt;/h6&amp;gt;on sol9:&lt;br&gt;&lt;br&gt;bash-2.05# metainit -f d0 d10&lt;br&gt;metainit: srv-e4500: d0: "d10": syntax error&lt;br&gt;&lt;br&gt;ideas?&amp;lt;/ul&amp;gt;&lt;br&gt;&lt;br&gt;metainit d0 -m d10&lt;br&gt;metainit d0 -m d10&lt;br&gt;&lt;br&gt;the metattach further down should be left without the -f switch since it doesnt exsist in metaattach command&lt;br&gt;&lt;br&gt;should just be &lt;br&gt;&lt;br&gt;metattach d0 d20&lt;br&gt;metattach d1 d21&lt;br&gt;&lt;br&gt;not metattach -f d0 d20&lt;br&gt;&lt;br&gt;otherwise it works like a charm  :wink:&lt;br&gt;&lt;br&gt;sry  &lt;br&gt;metainit d0 -m d10&lt;br&gt;metainit d1 -m d11&lt;br&gt;&lt;br&gt;thats it&lt;br&gt;&lt;br&gt;reg</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reg</dc:creator><pubDate>Wed, 14 Dec 2005 00:44:58 -0000</pubDate></item><item><title>Re: Solaris software RAID | Solaris system administration | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/225/solaris-software-raid/#comment-2767157</link><description>&amp;lt;ul id="quote"&amp;gt;&amp;lt;h6&amp;gt;Anonymous wrote:&amp;lt;/h6&amp;gt;on sol9:&lt;br&gt;&lt;br&gt;bash-2.05# metainit -f d0 d10&lt;br&gt;metainit: srv-e4500: d0: "d10": syntax error&lt;br&gt;&lt;br&gt;ideas?&amp;lt;/ul&amp;gt;&lt;br&gt;&lt;br&gt;metainit d0 -m d10&lt;br&gt;metainit d0 -m d10&lt;br&gt;&lt;br&gt;the metattach further down should be left without the -f switch since it doesnt exsist in metaattach command&lt;br&gt;&lt;br&gt;should just be &lt;br&gt;&lt;br&gt;metattach d0 d20&lt;br&gt;metattach d1 d21&lt;br&gt;&lt;br&gt;not metattach -f d0 d20&lt;br&gt;&lt;br&gt;otherwise it works like a charm  :wink:</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reg</dc:creator><pubDate>Wed, 14 Dec 2005 00:42:25 -0000</pubDate></item><item><title>Re: Solaris software RAID | Solaris system administration | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/225/solaris-software-raid/#comment-2767156</link><description>&amp;lt;ul id="quote"&amp;gt;&amp;lt;h6&amp;gt;Anonymous wrote:&amp;lt;/h6&amp;gt;on sol9:&lt;br&gt;&lt;br&gt;bash-2.05# metainit -f d0 d10&lt;br&gt;metainit: srv-e4500: d0: "d10": syntax error&lt;br&gt;&lt;br&gt;ideas?&amp;lt;/ul&amp;gt;&lt;br&gt;&lt;br&gt;from the metainit man page...&lt;br&gt;&lt;br&gt;metainit d0 -r d10</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 22 Jun 2005 11:36:58 -0000</pubDate></item><item><title>Re: Solaris software RAID | Solaris system administration | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/225/solaris-software-raid/#comment-2767155</link><description>on sol9:&lt;br&gt;&lt;br&gt;bash-2.05# metainit -f d0 d10&lt;br&gt;metainit: srv-e4500: d0: "d10": syntax error&lt;br&gt;&lt;br&gt;ideas?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 15 Apr 2005 03:50:00 -0000</pubDate></item><item><title>Re: Solaris software RAID | Solaris system administration | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/225/solaris-software-raid/#comment-2767154</link><description>got me out of a hole.&lt;br&gt;&lt;br&gt;Two comments&lt;br&gt;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 ?&lt;br&gt;&lt;br&gt;You say edit vfstab and turn on logging.  For a linux person on solaris I aint too sure about that.  Any clues?&lt;br&gt;&lt;br&gt;I would appreciate 10 seconds on lockfs -fa  - why not just sync?&lt;br&gt; &lt;br&gt;Again nice article -  it just works, thanks</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jon malone</dc:creator><pubDate>Tue, 06 Jul 2004 20:59:52 -0000</pubDate></item><item><title>Re: Solaris software RAID | Solaris system administration | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/225/solaris-software-raid/#comment-2767153</link><description>Great catch!  You are correct.  The recipe has been fixed.  &lt;br&gt;&lt;br&gt;Thank you for helping to make Tech-Recipes better!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">qmchenry</dc:creator><pubDate>Tue, 30 Mar 2004 14:58:39 -0000</pubDate></item><item><title>Re: Solaris software RAID | Solaris system administration | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/225/solaris-software-raid/#comment-2767152</link><description>Shouldn't this:&lt;br&gt;&lt;br&gt;metadb -af -c 2 /dev/dsk/c0t0d0s3 /dev/dsk/c0t0d0s4&lt;br&gt;metadb -af -c 2 /dev/dsk/c0t1d0s3 /dev/dsk/c0t0d0s4 &lt;br&gt;&lt;br&gt;Be this:&lt;br&gt;&lt;br&gt;metadb -af -c 2 /dev/dsk/c0t0d0s3 /dev/dsk/c0t0d0s4&lt;br&gt;metadb -af -c 2 /dev/dsk/c0t1d0s3 /dev/dsk/c0t1d0s4 &lt;br&gt;&lt;br&gt;bubba AT &lt;a href="http://bubba.org" rel="nofollow"&gt;bubba.org&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 30 Mar 2004 14:35:55 -0000</pubDate></item></channel></rss>