{"id":108,"date":"2009-01-16T08:53:50","date_gmt":"2009-01-16T00:53:50","guid":{"rendered":"http:\/\/www.sysadmindayph.com\/blog\/?p=108"},"modified":"2009-01-16T08:53:50","modified_gmt":"2009-01-16T00:53:50","slug":"replacing-a-failed-disk-in-solaris-mirror-svm","status":"publish","type":"post","link":"https:\/\/www.sysadmindayph.com\/blog\/replacing-a-failed-disk-in-solaris-mirror-svm\/","title":{"rendered":"Replacing a Failed Disk in Solaris Mirror (SVM)"},"content":{"rendered":"<p>This one is about Solaris Volume Manager and all those meta commands you can think of.. (metadb, metadettach, metattach, metaclear etc)&#8230;<\/p>\n<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>\n<p>c1t1d0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Soft Errors: 440 Hard Errors: 12 Transport Errors: 124<br \/>\nVendor: FUJITSU\u00a0 Product: MAY2073RCSUN72G\u00a0 Revision: 0501 Serial No: 0711S0935R<br \/>\nSize: 73.40GB &lt;73400057856 bytes&gt;<\/p>\n<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>\n<p>Here&#8217;s what we&#8217;re supposed to do:<\/p>\n<ul>\n<li>we could delete the meta data base that corresponds to the failed disk<\/li>\n<li>detached the failed disk\/slices to the mirror<\/li>\n<li>clear it<\/li>\n<li>unconfigure the disk<\/li>\n<li>replace the disk<\/li>\n<li>configure the disk<\/li>\n<li>create new meta device database<\/li>\n<li>Initialize the disk<\/li>\n<li>Attached it to mirror<\/li>\n<li>and sync<\/li>\n<\/ul>\n<p>Here&#8217;s the detailed job:<\/p>\n<p><!--more--><\/p>\n<p>Info:<br \/>\nmetadb | grep c1t1<br \/>\nmetadb \u2013d c1t1d0s7<\/p>\n<p>Detach:<br \/>\nmetadetach d30 d32<br \/>\nmetadetach d40 d42<br \/>\nmetadetach d20 d22<br \/>\nmetadetach d10 d12<\/p>\n<p>metaclear d32<br \/>\nmetaclear d42<br \/>\nmetaclear d22<br \/>\nmetaclear d12<\/p>\n<p>Verify:<br \/>\nmetastat -p | grep c1t1d0<br \/>\nmetadb  | grep c1t1d0<br \/>\n[root@localhost] \/&gt; cfgadm -al<br \/>\nAp_Id                          Type         Receptacle   Occupant     Condition<br \/>\nc0                             scsi-bus     connected    configured   unknown<br \/>\nc0::dsk\/c0t0d0                 CD-ROM       connected    configured   unknown<br \/>\nc1                             scsi-bus     connected    configured   unknown<br \/>\nc1::dsk\/c1t0d0                 disk         connected    configured   unknown<br \/>\nc1::dsk\/c1t1d0                 disk         connected    configured   unknown<br \/>\nc1::dsk\/c1t2d0                 disk         connected    configured   unknown<br \/>\nc1::dsk\/c1t3d0                 disk         connected    configured   unknown<br \/>\nusb0\/1                         unknown      empty        unconfigured ok<br \/>\nusb0\/2                         unknown      empty        unconfigured ok<br \/>\nusb1\/1.1                       unknown      empty        unconfigured ok<br \/>\nusb1\/1.2                       unknown      empty        unconfigured ok<br \/>\nusb1\/1.3                       unknown      empty        unconfigured ok<br \/>\nusb1\/1.4                       unknown      empty        unconfigured ok<br \/>\nusb1\/2                         unknown      empty        unconfigured ok<\/p>\n<p>Unconfigure:<br \/>\ncfgadm -c unconfigure c1::dsk\/c1t1d0<\/p>\n<p>Verify ulit, note the red text above:<br \/>\ncfgadm \u2013al<br \/>\nSWAP DISK<\/p>\n<p>Undo what has been done\u2026.<\/p>\n<p>Configure:<br \/>\ncfgadm -c configure c1::dsk\/c1t1d0<\/p>\n<p>format (to label disk)<\/p>\n<p>prtvtoc \/dev\/rdsk\/c1t0d0s2 | fmthard -s &#8211; \/dev\/rdsk\/c1t1d0s2<\/p>\n<p>metadb -a \u2013c 2 c1t1d0s7<\/p>\n<p>Attach!!<\/p>\n<p>metainit d32 1 1 c1t1d0s6<br \/>\nmetainit d42 1 1 c1t1d0s4<br \/>\nmetainit d22 1 1 c1t1d0s1<br \/>\nmetainit d12 1 1 c1t1d0s0<br \/>\nmetattach d30 d32<br \/>\nmetattach d40 d42<br \/>\nmetattach d20 d22<br \/>\nmetattach d10 d12<br \/>\nmetastat -p<br \/>\nmetadevadm -u c1t1d0<\/p>\n<p>And you&#8217;re done! Grab a cup of coffee and wait till the synchronization is done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,25,36],"tags":[108,107,110,106,109,372,111,112],"class_list":["post-108","post","type-post","status-publish","format-standard","hentry","category-commands","category-solaris-10","category-tutorial","tag-metaclear","tag-metadb","tag-metadettach","tag-metadevice","tag-metattache","tag-solaris","tag-svm","tag-volume-manager"],"_links":{"self":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":0,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}