{"id":825,"date":"2012-10-23T00:08:18","date_gmt":"2012-10-23T00:08:18","guid":{"rendered":"http:\/\/kraftek.com\/blog\/?p=825"},"modified":"2012-10-23T00:08:18","modified_gmt":"2012-10-23T00:08:18","slug":"liveupgrade-if-you-have-svm-metadevices","status":"publish","type":"post","link":"\/blog\/index.php\/liveupgrade-if-you-have-svm-metadevices\/","title":{"rendered":"liveupgrade if you have SVM metadevices"},"content":{"rendered":"<p>if you have SVM (solaris volume manager,disk suite,metadevices), you can still liveupgrade&#8230;.<\/p>\n<p>consider this scenario, the OS lives in mirrored disks d0,d3,d4,d6:<\/p>\n<pre>root@myserver # df -h | grep -i md\n\/dev\/md\/dsk\/d0 4.9G 3.2G 1.7G 66% \/\n\/dev\/md\/dsk\/d3 9.9G 4.1G 5.7G 42% \/usr\n\/dev\/md\/dsk\/d4 9.9G 3.4G 6.3G 35% \/var\n\/dev\/md\/dsk\/d6 101G 7.5G 93G 8% \/opt\n\/dev\/md\/dsk\/d5 4.9G 4.6G 336M 94% \/spare<\/pre>\n<p>the metadevices look like this:<\/p>\n<pre>d0 -m d10 d20 1\nd10 1 1 c1t0d0s0\nd20 1 1 c1t1d0s0\nd6 -m d16 d26 1\nd16 1 1 c1t0d0s6\nd26 1 1 c1t1d0s6\nd5 -m d15 d25 1\nd15 1 1 c1t0d0s5\nd25 1 1 c1t1d0s5\nd4 -m d14 d24 1\nd14 1 1 c1t0d0s4\nd24 1 1 c1t1d0s4\nd3 -m d13 d23 1\nd13 1 1 c1t0d0s3\nd23 1 1 c1t1d0s3\nd1 -m d11 d21 1\nd11 1 1 c1t0d0s1\nd21 1 1 c1t1d0s1<\/pre>\n<p>So we create two Boot Environments (BE), sol10u6(the current), and sol10u9(the one that will be upgraded)<\/p>\n<pre>lucreate -c sol10u6 -n sol10u9\u00a0<\/pre>\n<pre>-m \/:\/dev\/md\/dsk\/d40:ufs,mirror -m \/:\/dev\/dsk\/c1t0d0s0:detach,attach,preserve <\/pre>\n<pre>-m \/usr:\/dev\/md\/dsk\/d43:ufs,mirror -m \/usr:\/dev\/dsk\/c1t0d0s3:detach,attach,preserve <\/pre>\n<pre>-m \/var:\/dev\/md\/dsk\/d44:ufs,mirror -m \/var:\/dev\/dsk\/c1t0d0s4:detach,attach,preserve <\/pre>\n<pre>-m \/opt:\/dev\/md\/dsk\/d46:ufs,mirror -m \/opt:\/dev\/dsk\/c1t0d0s6:detach,attach,preserve<\/pre>\n<p>Notice we create the alternate metadevices d40,d43,d44 and d46, to substitute d0,d3,d4 and d6 in the sol10u9 BE.<\/p>\n<p>when we boot from the sol10u6 BE we will still see d0,d3,d4 and d6, when we boot the sol10u9 BE we will see\u00a0\u00a0d40,d43,d44 and d46.<\/p>\n<p>Next, we create the file to skip auto registration:<\/p>\n<pre># echo \"autoreg=disable\" &gt; \/var\/tmp\/no-autoreg<\/pre>\n<p>Now we run the upgrade:<\/p>\n<pre># luupgrade -k \/var\/tmp\/no-autoreg -u -n sol10u9 -s \/sol10u9<\/pre>\n<p>after the upgrade, we activate the sol10u9 BE<\/p>\n<pre># luactivate sol10u9<\/pre>\n<p>Now, we restart the server, do not use &#8220;reboot&#8221;!<\/p>\n<pre># init 6<\/pre>\n<p>Luckily the server comes up with sol10u9<\/p>\n","protected":false},"excerpt":{"rendered":"<p>if you have SVM (solaris volume manager,disk suite,metadevices), you can still liveupgrade&#8230;. consider this scenario, the OS lives in mirrored disks d0,d3,d4,d6: root@myserver # df -h | grep -i md \/dev\/md\/dsk\/d0 4.9G 3.2G 1.7G 66% \/ \/dev\/md\/dsk\/d3 9.9G 4.1G 5.7G 42% \/usr \/dev\/md\/dsk\/d4 9.9G 3.4G 6.3G 35% \/var \/dev\/md\/dsk\/d6 101G 7.5G 93G 8% \/opt \/dev\/md\/dsk\/d5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-825","post","type-post","status-publish","format-standard","hentry","category-solaris"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=825"}],"version-history":[{"count":0,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/825\/revisions"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=825"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}