{"id":1344,"date":"2017-08-17T21:53:02","date_gmt":"2017-08-18T02:53:02","guid":{"rendered":"https:\/\/it.thelibrarie.com\/weblog\/?p=1344"},"modified":"2017-08-17T21:53:02","modified_gmt":"2017-08-18T02:53:02","slug":"add-second-drive-to-linux","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2017\/08\/add-second-drive-to-linux\/","title":{"rendered":"Add Second Drive to Linux"},"content":{"rendered":"<p>I added a new disk using PVE (Proxmox) as a secondary IDE drive. Primary is 30GB. Running Ubuntu 14.04LTS (I know I should upgrade to 16, but I&#8217;m lazy)<br \/>\nSecondary drive is 400GB and I marked it NO Backup.<br \/>\nAdding a secondary HDD to linux is pretty easy.<\/p>\n<p><strong>List all of the drives<\/strong><br \/>\n<code>fdisk -l<\/code><\/p>\n<p>In my case it showed that \/dev\/sdb didn&#8217;t have a partition table. That fact, added to the other fact I know I was using sda already, made my choice pretty easy. Don&#8217;t take my word for it and actually fact-check against your own equipment!<\/p>\n<p><strong>Create partition on the drive<\/strong><br \/>\n<code>fdisk \/dev\/sdb<\/code><br \/>\n<code>n<\/code><br \/>\n<code>p<\/code><br \/>\n<code>1<\/code><br \/>\n<code>Enter<\/code><br \/>\n<code>w<\/code><\/p>\n<p>&#8220;N&#8221; for new, &#8220;P&#8221; for primary partition, &#8220;1&#8221; for partition number, &#8220;w&#8221; to write table to disk and exit. Most of these are the defaults anyway, so hitting &#8220;enter&#8221; a bunch of times works.<\/p>\n<p><strong>Create the filesystem<\/strong><br \/>\n<code>mkfs.ext4 \/dev\/sdb1<\/code><br \/>\nEnter a bunch of times<\/p>\n<p><strong>Display the UUID of the new partition\/drive<\/strong><br \/>\n<code>blkid \/dev\/sdb1<\/code><br \/>\nShould get something back like \/dev\/sdb1: UUID=&#8221;98d83dk-e4c3-38cd89-3830c0909903&#8243; TYPE=&#8221;ext4&#8243;<\/p>\n<p><strong>Add to FSTAB<\/strong><br \/>\n*note* Adam will laugh at my use of NANO, but I&#8217;m a creature of habit.<br \/>\n<code>nano \/etc\/fstab<\/code><br \/>\nAdd the UUID to the bottom:<br \/>\n<code>#\/dev\/sdb1      \/mnt\/sdb      ext4    defaults        0       0<\/code><br \/>\n<code>UUID=98d83dk-e4c3-38cd89-3830c0909903 \/mnt\/sdb ext4 defaults 0 0<\/code><\/p>\n<p><strong>Make directory and Mount the drive<\/strong><br \/>\n<code>mkdir \/mnt\/sdb<\/code><br \/>\n<code>mount -a<\/code><\/p>\n<p>Profit!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I added a new disk using PVE (Proxmox) as a secondary IDE drive. Primary is 30GB. Running Ubuntu 14.04LTS (I know I should upgrade to 16, but I&#8217;m lazy) Secondary drive is 400GB and I marked it NO Backup. Adding a secondary HDD to linux is pretty easy. List all of the drives fdisk -l &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2017\/08\/add-second-drive-to-linux\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Add Second Drive to Linux<\/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-1344","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1344","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=1344"}],"version-history":[{"count":1,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1344\/revisions"}],"predecessor-version":[{"id":1345,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1344\/revisions\/1345"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=1344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=1344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=1344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}