{"id":188,"date":"2010-04-06T04:28:30","date_gmt":"2010-04-06T04:28:30","guid":{"rendered":"http:\/\/poojanwagh.opalstacked.com\/techblog\/?p=188"},"modified":"2010-04-06T04:33:07","modified_gmt":"2010-04-06T04:33:07","slug":"re-labeling-my-zfs-devices-with-glabel","status":"publish","type":"post","link":"https:\/\/tech.poojanblog.com\/blog\/un\/re-labeling-my-zfs-devices-with-glabel\/","title":{"rendered":"Re-labeling my ZFS devices with glabel"},"content":{"rendered":"<p>As I stated <a title=\"Adding cache device to ZFS\" href=\"http:\/\/poojanwagh.opalstacked.com\/techblog\/unix-linux\/adding-cache-device-to-zfs\/\">before<\/a>, I wanted to move the underlying devices in my ZFS pool to glabel-based naming.<br \/>\nTo do so, I did the following 3 commands:<\/p>\n<p><code>&gt; sudo zpool offline tank da2s1<br \/>\n&gt; sudo glabel label -v fantom_1tb \/dev\/da2<br \/>\nMetadata value stored on \/dev\/da2.<br \/>\nDone.<br \/>\n&gt; sudo zpool replace tank da2s1 \/dev\/label\/fantom_1tb<br \/>\n<\/code><br \/>\nThen, doing a <code>zpool status<\/code> yields:<br \/>\n<code>&gt; zpool status<br \/>\npool: tank<br \/>\nstate: DEGRADED<br \/>\nstatus: One or more devices is currently being resilvered.  The pool will<br \/>\ncontinue to function, possibly in a degraded state.<br \/>\naction: Wait for the resilver to complete.<br \/>\nscrub: resilver in progress for 0h1m, 0.45% done, 3h47m to go<br \/>\nconfig:<\/p>\n<p>NAME                    STATE     READ WRITE CKSUM<br \/>\ntank                    DEGRADED     0     0     0<br \/>\n   raidz1                DEGRADED     0     0     0<br \/>\n      da0s1               ONLINE       0     0     0  3.52M resilvered<br \/>\n      da1s1               ONLINE       0     0     0  3.51M resilvered<br \/>\n      replacing           DEGRADED     0     0     0<br \/>\n         da2s1             OFFLINE      0 4.55K     0<br \/>\n         label\/fantom_1tb  ONLINE       0     0     0  296M resilvered<br \/>\n      cache<br \/>\n         label\/pico_usb        ONLINE       0     0     0<\/p>\n<p>errors: No known data errors<br \/>\n<\/code><br \/>\nWhen the resilvering of <code>da2<\/code> is done, I&#8217;ll do <code>da1<\/code> and <code>da0<\/code> in a similar manner. This way, I don&#8217;t have to plug the USB drives into the exact same port every time. My ZFS pool will be more reliable, because it&#8217;s less sensitive to the USB port ordering.\n<\/p>\n<div class='wp_likes' id='wp_likes_post-188'><a class='like' href=\"javascript:wp_likes.like(188);\" title='' ><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/tech.poojanblog.com\/blog\/wp-content\/plugins\/wp-likes\/images\/like.png\" alt='' border='0'\/><\/a><span class='text'>Be the first to like.<\/span><\/p>\n<div class='like' ><a href=\"javascript:wp_likes.like(188);\">Like<\/a><\/div>\n<div class='unlike' ><a href=\"javascript:wp_likes.unlike(188);\">Unlike<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>As I stated before, I wanted to move the underlying devices in my ZFS pool to glabel-based naming. To do so, I did the following 3 commands: Then, doing a yields: When the resilvering of is done, I&#8217;ll do and in a similar manner. This way, I don&#8217;t have to plug the USB drives into [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[12,80,3],"class_list":["post-188","post","type-post","status-publish","format-standard","hentry","category-un","tag-freebsd","tag-glabel","tag-zfs"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/comments?post=188"}],"version-history":[{"count":7,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/188\/revisions"}],"predecessor-version":[{"id":195,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/posts\/188\/revisions\/195"}],"wp:attachment":[{"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/media?parent=188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/categories?post=188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.poojanblog.com\/blog\/wp-json\/wp\/v2\/tags?post=188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}