<?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>Unix Sysadmin &#187; svm</title>
	<atom:link href="http://www.sysadmindayph.com/blog/tag/svm/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sysadmindayph.com/blog</link>
	<description>SysAdmin Blog, TechTips and Reviews</description>
	<lastBuildDate>Fri, 27 Jan 2012 04:36:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Solutions for Solaris SVM Needs Maintenance and Last Erred status</title>
		<link>http://www.sysadmindayph.com/blog/solutions-for-solaris-svm-needs-maintenance-and-last-erred-status/</link>
		<comments>http://www.sysadmindayph.com/blog/solutions-for-solaris-svm-needs-maintenance-and-last-erred-status/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 02:36:55 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[kernel patch]]></category>
		<category><![CDATA[mirror disk]]></category>
		<category><![CDATA[needs maintenance]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[solaris patch]]></category>
		<category><![CDATA[svm]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/?p=227</guid>
		<description><![CDATA[This post is because while patching a Solaris 10 server with patch level Generic_142900-02 to Generic_142900-13.. There&#8217;s a need maintenance error on one of the sub mirror: When a slice in a mirror or RAID5 metadevice device experiences errors, DiskSuite puts the slice in the &#8220;Maintenance&#8221; state. No further reads or writes are performed to &#8230; <a href="http://www.sysadmindayph.com/blog/solutions-for-solaris-svm-needs-maintenance-and-last-erred-status/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>This post is because while patching a Solaris 10 server with patch level Generic_142900-02 to Generic_142900-13.. There&#8217;s a need maintenance error on one of the sub mirror:</p>
<p>When a slice in a mirror or RAID5 metadevice device experiences errors,<br />
DiskSuite puts the slice in the &#8220;Maintenance&#8221; state. No further reads or<br />
writes are performed to a slice in the &#8220;Maintenance&#8221; state. Subsequent<br />
errors on other slices in the same metadevice are handled differently,<br />
depending on the type of the metadevice.</p>
<p>A mirror may be able to tolerate many slices in the &#8220;Maintenance&#8221; state and still be read from and written to. A RAID5 metadevice, by definition, can only tolerate a single slice in the &#8220;Maintenance&#8221; state. When either a mirror or RAID5 metadevice has a slice in the &#8220;Last Erred&#8221; state, I/O is still attempted to the slice marked &#8220;Last Erred&#8221;. This is because a &#8220;Last Erred&#8221; slice contains the last good copy of data from DiskSuite&#8217;s point of view.</p>
<p><span id="more-227"></span><br />
With a slice in the &#8220;Last Erred&#8221; state, metadevice behaves like a normal<br />
device (disk) and returns I/O errors to an application. Usually, at this<br />
point some data has been lost.<br />
Always replace slices in the &#8220;Maintenance&#8221; state, followed by those in the<br />
&#8220;Last Erred&#8221; state. After a slice is replaced and resynched, use the metastat<br />
command to verify its state, then validate data to make sure it is good.<br />
Here are the specifics for Mirrors and RAID5 devices:<br />
1. Mirrors<br />
If slices are in the &#8220;Maintenance&#8221; state, no data has been lost. You can<br />
safely replace or enable the slices in any order. If a slice is in the &#8220;Last<br />
Erred&#8221; state, you cannot replace it until you first replace all the other<br />
mirrored slices in the &#8220;Maintenance&#8221; state. Replacing or enabling a slice in<br />
the &#8220;Last Erred&#8221; state usually means that some data has been lost. Be sure<br />
to validate the data on the mirror after repairing it.<br />
2. RAID5 metadevices<br />
A RAID5 metadevice can tolerate a single slice failure. You can safely<br />
replace a single slice in the &#8220;Maintenance&#8221; state without losing data. If<br />
an error on another slice occurs, it is put into the &#8220;Last Erred&#8221; state. At<br />
this point, the RAID5 metadevice is a read-only device; you need to perform<br />
some type of error recovery so that the state of the RAID5 metadevice is<br />
non-errored and the possibility of data loss is reduced. If a RAID5<br />
metadevice reaches a &#8220;Last Erred&#8221; state, there is a good chance it has<br />
lost data. Be sure to validate the data on the RAID5 metadevice after<br />
repairing it.<br />
How to remove &#8220;maintenance&#8221; and &#8220;last erred&#8221; example, In this point maybe pay attention<br />
in some case The &#8220;lost Erred&#8221; sub-mirror side have contained &#8220;maintenance&#8221; and &#8220;Okey&#8221; state</p>
<p>Metastat gives :<br />
d0: Mirror<br />
Submirror 0: d10<br />
State: Needs maintenance<br />
Submirror 1: d20<br />
State: Needs maintenance<br />
Pass: 1<br />
Read option: roundrobin (default)<br />
Write option: parallel (default)<br />
Size: 8395200 blocksd10: Submirror of d0<br />
State: Needs maintenance<br />
Invoke: after replacing &#8220;Maintenance&#8221; components:<br />
metareplace d0 c1t0d0s0<br />
Size: 8395200 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t0d0s0 0 No Last Erred<br />
d20: Submirror of d0<br />
State: Needs maintenance<br />
Invoke: metareplace d0 c1t1d0s0<br />
Size: 8395200 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t1d0s0 0 No Maintenance<br />
d1: Mirror<br />
Submirror 0: d11<br />
State: Okay<br />
Submirror 1: d21<br />
State: Okay<br />
Pass: 1<br />
Read option: roundrobin (default)<br />
Write option: parallel (default)<br />
Size: 8395200 blocksd11: Submirror of d1<br />
State: Okay<br />
Size: 8395200 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t0d0s1 0 No Okay<br />
d21: Submirror of d1<br />
State: Okay<br />
Size: 8395200 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t1d0s1 0 No Okay<br />
d4: Mirror<br />
Submirror 0: d14<br />
State: Needs maintenance<br />
Submirror 1: d24<br />
State: Needs maintenance<br />
Pass: 1<br />
Read option: roundrobin (default)<br />
Write option: parallel (default)<br />
Size: 4202688 blocksd14: Submirror of d4<br />
State: Needs maintenance<br />
Invoke: after replacing &#8220;Maintenance&#8221; components:<br />
metareplace d4 c1t0d0s4<br />
Size: 4202688 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t0d0s4 0 No Last Erred<br />
d24: Submirror of d4<br />
State: Needs maintenance<br />
Invoke: metareplace d4 c1t1d0s4<br />
Size: 4202688 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t1d0s4 0 No Maintenance<br />
d5: Mirror<br />
Submirror 0: d15<br />
State: Okay<br />
Submirror 1: d25<br />
State: Okay<br />
Pass: 1<br />
Read option: roundrobin (default)<br />
Write option: parallel (default)<br />
Size: 62918208 blocksd15: Submirror of d5<br />
State: Okay<br />
Size: 62918208 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t0d0s5 0 No Okay<br />
d25: Submirror of d5<br />
State: Okay<br />
Size: 62918208 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t1d0s5 0 No Okay<br />
d6: Mirror<br />
Submirror 0: d16<br />
State: Needs maintenance<br />
Submirror 1: d26<br />
State: Okay<br />
Pass: 1<br />
Read option: roundrobin (default)<br />
Write option: parallel (default)<br />
Size: 52436928 blocksd16: Submirror of d6<br />
State: Needs maintenance<br />
Invoke: metareplace d6 c1t0d0s6<br />
Size: 52436928 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t0d0s6 0 No Maintenance<br />
d26: Submirror of d6<br />
State: Okay<br />
Size: 52436928 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t1d0s6 0 No Okay<br />
d7: Mirror<br />
Submirror 0: d17<br />
State: Okay<br />
Submirror 1: d27<br />
State: Needs maintenance<br />
Pass: 1<br />
Read option: roundrobin (default)<br />
Write option: parallel (default)<br />
Size: 6970560 blocksd17: Submirror of d7<br />
State: Okay<br />
Size: 6970560 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t0d0s7 0 No Okay<br />
d27: Submirror of d7<br />
State: Needs maintenance<br />
Invoke: metareplace d7 c1t1d0s7<br />
Size: 6970560 blocks<br />
Stripe 0:<br />
Device Start Block Dbase State Hot Spare<br />
c1t1d0s7 0 No Maintenance<br />
-First dettach,delete master slice6 and resync with mirror side slice6,Because in this way the intact data only in mirror side:<br />
# metadetach d6 d16<br />
# metaclear d16<br />
# metainit d16 1 1 c1t0d0s6<br />
# metattach d6 d16<br />
- Wait for &#8220;Okay&#8221; status for the master slice6,<br />
- Then replace &#8220;Last erred&#8221; state disk before.<br />
Run &#8220;metadetach&#8221; to detach all the sub-mirrors on the mirror disk from<br />
their respective mirrors (see the following):<br />
[b]# metadetach -f [/b]<br />
NOTE: The &#8220;-f&#8221; option is not required if the metadevice is in an &#8220;okay&#8221;<br />
state.<br />
Then run metaclear to remove the configuration from the disk:<br />
[b]# metaclear [/b]<br />
# metadb -d c1t1d0s3<br />
# luxadm remove_device /dev/rdsk/c1t1d0s2 (physical remove disk when prompt to pull out disk)<br />
# devfsadm -C -c disk -v<br />
# luxadm insert_device /dev/rdsk/c1t1d0s2 (physical insert disk when prompt to pull in disk)<br />
# prtvtoc /dev/rdsk/c1t0d0s2 |fmthard -s &#8211; /dev/rdsk/c1t1d0s2<br />
# metadb -afc 3 c1t1d0s3<br />
Use &#8220;metainit&#8221; and &#8220;metattach&#8221; to re-create and attach those submirrors to<br />
the mirrors to start the resync:<br />
[b]# metainit 1 1 c#t#d#s#[/b]<br />
[b]# metattach [/b]<br />
When all slice resync are finished,Begin replace &#8220;Last Erred&#8221; master disk<br />
Run &#8220;metadetach&#8221; to detach all the sub-mirrors on the master disk from<br />
their respective mirrors (see the following):<br />
[b]# metadetach -f [/b]<br />
NOTE: The &#8220;-f&#8221; option is not required if the metadevice is in an &#8220;okay&#8221;<br />
state.<br />
Then run metaclear to remove the configuration from the disk:<br />
[b]# metaclear [/b]<br />
# metadb -d c1t1d0s3<br />
# luxadm remove_device /dev/rdsk/c1t0d0s2 (physical remove disk when prompt to pull out disk)<br />
# devfsadm -C -c disk -v<br />
# luxadm insert_device /dev/rdsk/c1t0d0s2 (physical insert disk when prompt to pull in disk)<br />
# prtvtoc /dev/rdsk/c1t1d0s2 |fmthard -s &#8211; /dev/rdsk/c1t0d0s2<br />
# metadb -afc 3 c1t0d0s3<br />
Use &#8220;metainit&#8221; and &#8220;metattach&#8221; to re-create and attach those submirrors to<br />
the mirrors to start the resync:<br />
[b]# metainit 1 1 c#t#d#s#[/b]<br />
[b]# metattach [/b]<br />
When all slice resync finished,the two sub-mirror is normal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/solutions-for-solaris-svm-needs-maintenance-and-last-erred-status/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Metastat Needs Maintenance Metareplace</title>
		<link>http://www.sysadmindayph.com/blog/metastat-needs-maintenance-metareplace/</link>
		<comments>http://www.sysadmindayph.com/blog/metastat-needs-maintenance-metareplace/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 16:41:57 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[meta device]]></category>
		<category><![CDATA[metareplace]]></category>
		<category><![CDATA[metastat]]></category>
		<category><![CDATA[svm]]></category>
		<category><![CDATA[volume manager]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/?p=174</guid>
		<description><![CDATA[Guilty! Putting all those Metastat keywords on one subject, that&#8217;s me! ANyway, I don&#8217;t want to stale this blog so once in a while I&#8217;m going to be posting some bits and pieces of Unix tools/tips.. and here&#8217;s a new one about SVM&#8230; Responding to Disk Errors courtesy of BigAdmin! Got a page.. something like &#8230; <a href="http://www.sysadmindayph.com/blog/metastat-needs-maintenance-metareplace/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>Guilty! Putting all those Metastat keywords on one subject, that&#8217;s me! ANyway, I don&#8217;t want to stale this blog so once in a while I&#8217;m going to be posting some bits and pieces of Unix tools/tips.. and here&#8217;s a new one about SVM&#8230; Responding to Disk Errors courtesy of BigAdmin!</p>
<p><span id="more-174"></span></p>
<p>Got a page.. something like &#8220;Fault found by metastat&#8221; in short description in Remedy&#8230; </p>
<p><code># metastat | grep Need<br />
      State: Needs maintenance<br />
    State: Needs maintenance </code></p>
<p>Which disk?</p>
<p><code># metastat d9<br />
d9: Mirror<br />
    Submirror 0: d19<br />
      State: Needs maintenance<br />
    Submirror 1: d29<br />
      State: Okay<br />
    Pass: 1<br />
    Read option: roundrobin (default)<br />
    Write option: parallel (default)<br />
    Size: 134221440 blocks (64 GB)</p>
<p><strong>d19: Submirror of d9</strong><br />
    State: Needs maintenance<br />
    Invoke: metareplace d9 c0t2d0s5 <new device><br />
    Size: 134221440 blocks (64 GB)<br />
    Stripe 0:<br />
        <strong>Device </strong>    Start Block  Dbase        State Reloc Hot Spare<br />
        <strong>c0t2d0s5</strong>          0     No     Maintenance   Yes </p>
<p>d29: Submirror of d9<br />
    State: Okay<br />
    Size: 134221440 blocks (64 GB)<br />
    Stripe 0:<br />
        Device     Start Block  Dbase        State Reloc Hot Spare<br />
        c0t3d0s5          0     No            Okay   Yes </p>
<p>Device Relocation Information:<br />
Device   Reloc  Device ID<br />
c0t2d0   Yes    id1,sd@SSEAGATE_ST373307LSUN72G_3HZ6Y1EN000074312CVW<br />
c0t3d0   Yes    id1,sd@SSEAGATE_ST373307LSUN72G_3HZ6Y46Y0000743249BK<br />
</code></p>
<p>Check for hard errors to verify if this disk can really be replaced&#8230; if it passed (on your criteria), you can try re-syncing it&#8230;</p>
<p><code>c# metareplace -e  d9 c0t2d0s5<br />
d9: device c0t2d0s5 is enabled</code></p>
<p>Verify that it&#8217;s doing what it is expected..</p>
<p><code># metastat d9<br />
d9: Mirror<br />
    Submirror 0: d19<br />
      State: Resyncing<br />
    Submirror 1: d29<br />
      State: Okay<br />
    Resync in progress: 0 % done<br />
    Pass: 1<br />
    Read option: roundrobin (default)<br />
    Write option: parallel (default)<br />
    Size: 134221440 blocks (64 GB)</p>
<p></code></p>
<p>And we wait&#8230;..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/metastat-needs-maintenance-metareplace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing a Failed Disk in Solaris Mirror (SVM)</title>
		<link>http://www.sysadmindayph.com/blog/replacing-a-failed-disk-in-solaris-mirror-svm/</link>
		<comments>http://www.sysadmindayph.com/blog/replacing-a-failed-disk-in-solaris-mirror-svm/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 00:53:50 +0000</pubDate>
		<dc:creator>elizar</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[metaclear]]></category>
		<category><![CDATA[metadb]]></category>
		<category><![CDATA[metadettach]]></category>
		<category><![CDATA[metadevice]]></category>
		<category><![CDATA[metattache]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[svm]]></category>
		<category><![CDATA[volume manager]]></category>

		<guid isPermaLink="false">http://www.sysadmindayph.com/blog/?p=108</guid>
		<description><![CDATA[This one is about Solaris Volume Manager and all those meta commands you can think of.. (metadb, metadettach, metattach, metaclear etc)&#8230; Yesterday we had to replace a failed disk that belongs to a mirror. The disk is running in a Sparc Solaris 10 box. It&#8217;s a 72GB from Fujitsu c1t1d0           Soft Errors: 440 Hard Errors: &#8230; <a href="http://www.sysadmindayph.com/blog/replacing-a-failed-disk-in-solaris-mirror-svm/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>This one is about Solaris Volume Manager and all those meta commands you can think of.. (metadb, metadettach, metattach, metaclear etc)&#8230;</p>
<p>Yesterday we had to replace a failed disk that belongs to a mirror. The disk is running in a Sparc Solaris 10 box. It&#8217;s a 72GB from Fujitsu</p>
<p>c1t1d0           Soft Errors: 440 Hard Errors: 12 Transport Errors: 124<br />
Vendor: FUJITSU  Product: MAY2073RCSUN72G  Revision: 0501 Serial No: 0711S0935R<br />
Size: 73.40GB &lt;73400057856 bytes&gt;</p>
<p>As you can see from the iostat -En command, the disk is spitting hard errors and must be replaced before it can cause a lot more headache. It&#8217;s in c1t1, right.</p>
<p>Here&#8217;s what we&#8217;re supposed to do:</p>
<ul>
<li>we could delete the meta data base that corresponds to the failed disk</li>
<li>detached the failed disk/slices to the mirror</li>
<li>clear it</li>
<li>unconfigure the disk</li>
<li>replace the disk</li>
<li>configure the disk</li>
<li>create new meta device database</li>
<li>Initialize the disk</li>
<li>Attached it to mirror</li>
<li>and sync</li>
</ul>
<p>Here&#8217;s the detailed job:</p>
<p><span id="more-108"></span></p>
<p>Info:<br />
metadb | grep c1t1<br />
metadb –d c1t1d0s7</p>
<p>Detach:<br />
metadetach d30 d32<br />
metadetach d40 d42<br />
metadetach d20 d22<br />
metadetach d10 d12</p>
<p>metaclear d32<br />
metaclear d42<br />
metaclear d22<br />
metaclear d12</p>
<p>Verify:<br />
metastat -p | grep c1t1d0<br />
metadb  | grep c1t1d0<br />
[root@localhost] /&gt; cfgadm -al<br />
Ap_Id                          Type         Receptacle   Occupant     Condition<br />
c0                             scsi-bus     connected    configured   unknown<br />
c0::dsk/c0t0d0                 CD-ROM       connected    configured   unknown<br />
c1                             scsi-bus     connected    configured   unknown<br />
c1::dsk/c1t0d0                 disk         connected    configured   unknown<br />
c1::dsk/c1t1d0                 disk         connected    configured   unknown<br />
c1::dsk/c1t2d0                 disk         connected    configured   unknown<br />
c1::dsk/c1t3d0                 disk         connected    configured   unknown<br />
usb0/1                         unknown      empty        unconfigured ok<br />
usb0/2                         unknown      empty        unconfigured ok<br />
usb1/1.1                       unknown      empty        unconfigured ok<br />
usb1/1.2                       unknown      empty        unconfigured ok<br />
usb1/1.3                       unknown      empty        unconfigured ok<br />
usb1/1.4                       unknown      empty        unconfigured ok<br />
usb1/2                         unknown      empty        unconfigured ok</p>
<p>Unconfigure:<br />
cfgadm -c unconfigure c1::dsk/c1t1d0</p>
<p>Verify ulit, note the red text above:<br />
cfgadm –al<br />
SWAP DISK</p>
<p>Undo what has been done….</p>
<p>Configure:<br />
cfgadm -c configure c1::dsk/c1t1d0</p>
<p>format (to label disk)</p>
<p>prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s &#8211; /dev/rdsk/c1t1d0s2</p>
<p>metadb -a –c 2 c1t1d0s7</p>
<p>Attach!!</p>
<p>metainit d32 1 1 c1t1d0s6<br />
metainit d42 1 1 c1t1d0s4<br />
metainit d22 1 1 c1t1d0s1<br />
metainit d12 1 1 c1t1d0s0<br />
metattach d30 d32<br />
metattach d40 d42<br />
metattach d20 d22<br />
metattach d10 d12<br />
metastat -p<br />
metadevadm -u c1t1d0</p>
<p>And you&#8217;re done! Grab a cup of coffee and wait till the synchronization is done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadmindayph.com/blog/replacing-a-failed-disk-in-solaris-mirror-svm/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

