{"id":1218,"date":"2014-08-22T15:07:15","date_gmt":"2014-08-22T20:07:15","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=1218"},"modified":"2014-08-22T15:23:48","modified_gmt":"2014-08-22T20:23:48","slug":"linux-fun","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2014\/08\/linux-fun\/","title":{"rendered":"Linux Fun"},"content":{"rendered":"<p>I&#8217;ll probably break these out, but for now this is the title and location.<\/p>\n<p>We&#8217;re finally hiring a linux administrator (13 years experience) to replace me and my &#8220;hobby&#8221;.  Good thing is he&#8217;s way better than I can hope to be.  Bad thing is he doesn&#8217;t start for another couple weeks and I have a lot of Linux-y stuff going on.<\/p>\n<p>So here are some helpful commands:<br \/>\n<strong>What Linux Distribution Are You Using?<\/strong><br \/>\n<code>cat \/etc\/*-release<\/code><br \/>\nOR<br \/>\n<code>lsb_release -a<\/code><\/p>\n<p><strong>What Kernel Version Am I Running?<\/strong><br \/>\n<code>uname -a<\/code><\/p>\n<p><strong>What Processors Am I Using?<\/strong><br \/>\ncat \/proc\/cpuinfo<\/p>\n<p><strong>What Hardware Specs Do I Have?<\/strong> (Motherboard Model, BIOS revision, etc)<br \/>\n<code>dmidecode<\/code><br \/>\nOR, if installed<br \/>\n<code>hwinfo<\/code><\/p>\n<p><strong>How Do I Setup No-Password-Needed SSH?<\/strong><br \/>\n<code>ssh-keygen<\/code><br \/>\n<code>enter<\/code><br \/>\n<code>enter<\/code><br \/>\n<code>ssh-copy-id username@systemname<\/code><br \/>\n<code>userpassword<\/code><\/p>\n<p><strong>ZFS Replace A Drive<\/strong><br \/>\n<code>zpool offline poolname \/dev\/daX<\/code><br \/>\n<code>zpool replace poolname \/dev\/daX \/dev\/daY<\/code><br \/>\n<code>zpool status poolname<\/code><br \/>\nAfter Rebuild<br \/>\n<code>zpool detach poolname \/dev\/daX<\/code><\/p>\n<p><strong>LVM &#8211; Create Physical, Volume, and Logical<\/strong><br \/>\n<code>pvcreate \/dev\/sdb1<\/code><br \/>\n<code>vgcreate vgpool \/dev\/sdb1<\/code><br \/>\n<code>lvcreate -L 3G -n lvstuff vgpool<\/code><\/p>\n<p><strong>LVM &#8211; Display Current Status<\/strong><br \/>\n<code>pvdisplay<\/code><\/p>\n<p><strong>LVM &#8211; Add A New Disk<\/strong><br \/>\n<code>fdisk \/dev\/daX<\/code><br \/>\n<code>n, p, 1, t, 8e, w<\/code><br \/>\n<code>pvcreate \/dev\/daX1<\/code><\/p>\n<p><strong>LVM &#8211; Extend LVM Pool To New Disk<\/strong><br \/>\n<code>vgextend vgpool \/dev\/daX1<\/code><\/p>\n<p><strong>LVM &#8211; Resize File System (required for shrinking\/growing)<\/strong><br \/>\n<code>lvextend -L+8G \/dev\/vgpool\/lvstuff<\/code><br \/>\n<code>lvextend -L50GB \/dev\/vgpool\/lvstuff (extend to total of 50gb)<\/code><br \/>\n<code>resize2fs \/dev\/vgpool\/lvstuff<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ll probably break these out, but for now this is the title and location. We&#8217;re finally hiring a linux administrator (13 years experience) to replace me and my &#8220;hobby&#8221;. Good thing is he&#8217;s way better than I can hope to be. Bad thing is he doesn&#8217;t start for another couple weeks and I have a &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2014\/08\/linux-fun\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Linux Fun<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1218","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=1218"}],"version-history":[{"count":3,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1218\/revisions"}],"predecessor-version":[{"id":1221,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1218\/revisions\/1221"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=1218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=1218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=1218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}