{"id":5307,"date":"2017-09-11T16:32:33","date_gmt":"2017-09-11T13:32:33","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=5307"},"modified":"2017-09-11T16:32:41","modified_gmt":"2017-09-11T13:32:41","slug":"solaris-%d1%80%d0%b0%d0%b7%d0%b2%d0%b0%d0%bb%d0%b8%d0%bb%d1%81%d1%8f-zpool-mirror-%d0%bf%d1%80%d0%b8-%d0%bf%d0%b5%d1%80%d0%b5%d1%81%d1%82%d1%80%d0%be%d0%b5%d0%bd%d0%b8%d0%b8","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=5307","title":{"rendered":"[Solaris] \u0420\u0430\u0437\u0432\u0430\u043b\u0438\u043b\u0441\u044f zpool mirror \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438"},"content":{"rendered":"<p>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e <strong>ZFS<\/strong>. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f <strong>resilvering&#8217;a<\/strong> \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0437\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430\u043c\u0438 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438. \u0418 \u0442\u0430\u043a, \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f <strong>resilvering&#8217;a<\/strong> \u043f\u0443\u043b \u043f\u0435\u0440\u0435\u0448\u0451\u043b \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <strong>suspended<\/strong>:<\/p>\n<p><!--more--><\/p>\n<pre># zpool status rpool\r\n  pool: rpool\r\n state: SUSPENDED\r\nstatus: One or more devices are unavailable in response to IO failures.\r\n        The pool is suspended.\r\naction: Make sure the affected devices are connected, then run 'zpool clear' or \r\n        'fmadm repaired'.\r\n        Run 'zpool status -v' to see device specific details.\r\n   see: http:\/\/support.oracle.com\/msg\/ZFS-8000-HC\r\n  scan: resilvered 4.90M in 34m11s with 233252 errors on Mon Sep 11 08:24:46 2017\r\n\r\nconfig:\r\n\r\n        NAME              STATE     READ WRITE CKSUM\r\n        rpool             SUSPENDED  228K     0     0\r\n          mirror-0        DEGRADED  490K     0     0\r\n            replacing-0   DEGRADED  490K     0     0\r\n              c9t0d0\/old  OFFLINE      0     0     0\r\n              c3t0d0      ONLINE       0     0     0\r\n            c3t1d0        UNAVAIL      0     0     0\r\n<\/pre>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0431\u043e\u0439\u043d\u044b\u0435 \u0434\u0438\u0441\u043a\u0438 \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u0443\u043b\u043e\u043c:<\/p>\n<p><code># zpool remove rpool c9t0d0<br \/>\ncannot remove c9t0d0: no such device in pool<br \/>\n# zpool remove rpool c9t0d0\/old<br \/>\ncannot remove c9t0d0\/old: log device has unplayed intent logs<br \/>\n# zpool export rpool<br \/>\ncannot export 'rpool': pool I\/O is currently suspended<br \/>\n# zpool import rpool<br \/>\ncannot import 'rpool': a pool with that name is already created\/imported,<br \/>\nand no additional pools with that name were found<br \/>\n# zpool export -f rpool<br \/>\ncannot export 'rpool': pool I\/O is currently suspended<\/code><\/p>\n<p>\u041d\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u0442. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 <strong>fmadm<\/strong>:<\/p>\n<p><code># fmadm faulty<\/code><\/p>\n<p>\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0442\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0430\u0448\u0435\u043c \u043f\u0443\u043b\u0435. \u041f\u043e\u043c\u0435\u0447\u0430\u0435\u043c \u0435\u0451 \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u043e\u0439:<\/p>\n<p><code># fmadm repaired zfs:\/\/pool=8e5ff5a927d0f403\/pool_name=rpool<br \/>\nfmadm: recorded repair to zfs:\/\/pool=8e5ff5a927d0f403\/pool_name=rpool<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0443\u043b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043e\u043f\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f:<\/p>\n<pre># zpool status\r\n  pool: rpool\r\n state: DEGRADED\r\nstatus: One or more devices is currently being resilvered.  The pool will\r\n        continue to function in a degraded state.\r\naction: Wait for the resilver to complete.\r\n        Run 'zpool status -v' to see device specific details.\r\n  scan: resilver in progress since Mon Sep 11 08:41:43 2017\r\n    64.8G scanned\r\n    68.3M resilvered at 72.1M\/s, 0.00% done, 10m20s to go\r\nconfig:\r\n\r\n        NAME              STATE     READ WRITE CKSUM\r\n        rpool             DEGRADED     0     0     0\r\n          mirror-0        DEGRADED     0     0     0\r\n            replacing-0   DEGRADED     6     0     0\r\n              c9t0d0\/old  OFFLINE      0     0     0\r\n              c3t0d0      ONLINE       0     0     0  (resilvering)\r\n            c3t1d0        DEGRADED     0     0     0  (resilvering)\r\n\r\nerrors: No known data errors\r\n<\/pre>\n<p>\u041f\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044e, \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u043b\u043e:<\/p>\n<pre># zpool status rpool\r\n  pool: rpool\r\n state: DEGRADED\r\nstatus: One or more devices has experienced an error resulting in data\r\n        corruption.  Applications may be affected.\r\naction: Restore the file in question if possible. Otherwise restore the\r\n        entire pool from backup.\r\n        Run 'zpool status -v' to see device specific details.\r\n   see: http:\/\/support.oracle.com\/msg\/ZFS-8000-8A\r\n  scan: resilvered 43.3G in 1h25m with 57 errors on Mon Sep 11 10:07:28 2017\r\n\r\nconfig:\r\n\r\n        NAME              STATE     READ WRITE CKSUM\r\n        rpool             DEGRADED    57     0     0\r\n          mirror-0        DEGRADED    57     0     0\r\n            replacing-0   DEGRADED   435     0     0\r\n              c9t0d0\/old  OFFLINE      0     0     0\r\n              c3t0d0      ONLINE       0     0     0\r\n            c3t1d0        ONLINE      57     0     0\r\n\r\nerrors: 38 data errors, use '-v' for a list\r\n<\/pre>\n<p>\u0410\u0433\u0430, 38 \u0444\u0430\u0439\u043b\u043e\u0432. \u0421\u043c\u043e\u0442\u0440\u0438\u043c:<\/p>\n<pre># zpool status -v pool\r\n\u2026\r\nerrors: Permanent errors have been detected in the following files:\r\n\r\n        rpool\/VARSHARE\/zones\/zone\/rpool\/ROOT\/solaris:\/opt\/0.2.1-b6-RC\/logs\/storage.log.6\r\n        rpool\/VARSHARE\/zones\/zone\/rpool\/ROOT\/solaris:\/opt\/0.2.3-1-RELEASE\/logs\/storage.log.4\r\n        rpool\/VARSHARE\/zones\/zone\/rpool\/ROOT\/solaris:\/opt\/0.2.1-b6-RC\/activemq-data\/localhost\/db-12.log\r\n        rpool\/VARSHARE\/zones\/zone\/rpool\/ROOT\/solaris:\/opt\/0.2.0-2-RELEASE\/logs\/storage.log.6\r\n...\r\n<\/pre>\n<p>\u041d\u0443 \u0447\u0442\u043e \u0436, \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0441\u0442\u043e (\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u0431\u043b\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u043d\u043e \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043b\u043e\u0433\u0430\u043c\u0438 + \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a) \u0442\u0430\u043a \u0438\u0445 \u043d\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u043f\u044f\u0442\u044c <strong>zpool status -v<\/strong> \u0438 \u0432\u044b\u0434\u0438\u043c:<\/p>\n<p><code>errors: Permanent errors have been detected in the following files:<br \/>\n...<br \/>\nrpool\/VARSHARE\/zones\/zone\/rpool\/ROOT\/solaris:&lt;0x1031b&gt;<br \/>\nrpool\/VARSHARE\/zones\/zone\/rpool\/ROOT\/solaris:&lt;0x10420&gt;<br \/>\nrpool\/VARSHARE\/zones\/zone\/rpool\/ROOT\/solaris:&lt;0x10634&gt;<br \/>\nrpool\/VARSHARE\/zones\/zone\/rpool\/ROOT\/solaris:&lt;0x1083a&gt;<\/code><\/p>\n<p>\u0414\u0430, \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0435\u0442, \u043d\u043e \u043c\u0435\u0442\u0430\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c. \u0414\u0435\u043b\u0430\u043c <strong>zpool export\/import<\/strong> \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c:<\/p>\n<pre># zpool status rpool\r\n  pool: rpool\r\n state: ONLINE\r\n  scan: resilvered 277M in 1m16s with 0 errors on Mon Sep 11 10:59:48 2017\r\n\r\nconfig:\r\n\r\n        NAME        STATE     READ WRITE CKSUM\r\n        rpool       ONLINE       0     0     0\r\n          mirror-0  ONLINE       0     0     0\r\n            c3t0d0  ONLINE       0     0     0\r\n            c3t1d0  ONLINE       0     0     0\r\n\r\nerrors: No known data errors\r\n<\/pre>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0443\u043b \u0431\u044b\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c (\u0430 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441 <strong>liveCD<\/strong>) \u0442\u043e \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0437\u0430\u043d\u043e\u0432\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a:<\/p>\n<p><code># bootadm install-bootloader -f -P rpool<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u041e\u0421 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0430\u0441\u044c. \u042f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b <strong>pkg fix &#8211;accept<\/strong>, \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043e\u043d \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u043c\u043d\u043e\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041f\u0440\u0438\u0447\u0451\u043c \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c 2-\u0434\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0430 \u043d\u0435 \u0432\u0441\u0451 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u043e (\u0445\u043e\u0442\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u043e, \u0447\u0442\u043e \u0432\u0441\u0451).<br \/>\n\u0415\u0441\u043b\u0438 \u041e\u0421 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f, \u0442\u043e \u0433\u0440\u0443\u0437\u0438\u0442\u0435\u0441\u044c \u0441 <strong>liveCD<\/strong>, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0443\u043b, \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043e \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:<\/p>\n<p><code># pkg -R \/path\/to\/pool\/root fix --accept<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e ZFS. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f resilvering&#8217;a \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0437\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430\u043c\u0438 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438. \u0418 \u0442\u0430\u043a, \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f resilvering&#8217;a \u043f\u0443\u043b \u043f\u0435\u0440\u0435\u0448\u0451\u043b \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 suspended:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-5307","post","type-post","status-publish","format-standard","hentry","category-solaris"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5307"}],"version-history":[{"count":2,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5307\/revisions"}],"predecessor-version":[{"id":5309,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/5307\/revisions\/5309"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}