{"id":183,"date":"2008-08-03T21:14:36","date_gmt":"2008-08-04T01:14:36","guid":{"rendered":"http:\/\/theblane.com\/blog\/archives\/183"},"modified":"2008-08-03T21:14:36","modified_gmt":"2008-08-04T01:14:36","slug":"removing-a-primary-filesystem-to-create-new-logical-filesystems","status":"publish","type":"post","link":"http:\/\/www.theblane.com\/blog\/archives\/183","title":{"rendered":"Removing a primary filesystem to create new logical filesystems"},"content":{"rendered":"<p>Okay, so sometimes you need a refresher on how to do something.<\/p>\n<p>Let&#8217;s say, for example, that you have some filesystems that look something like this<\/p>\n<p>\/dev\/hda1   &#8211;> \/boot<br \/>\n\/dev\/hda2   &#8211;> \/<br \/>\n\/dev\/hda3   &#8211;> swap<br \/>\n\/dev\/hda4   &#8211;> \/logs<\/p>\n<p>You&#8217;ve noticed that your \/ partition is filling up rather quickly as you didn&#8217;t allocate enough space to it for the OS and the user files or applications.  What do you do?  Add another drive?<\/p>\n<p>Well, let&#8217;s also say that you have allocate 9GB to root, 2GB to swap and 20GB to logs&#8230;.but you have a 120GB hard drive.  You obviously have a ton of space that you aren&#8217;t using.  Here&#8217;s what I&#8217;d do.<\/p>\n<p>1:  Copy all of the files in \/logs to another PC\/server<br \/>\n2:  fdisk \/dev\/hda and remove hda4<br \/>\n3:  in fdisk, create a new extended filesystem<br \/>\n4:  reboot to recognize the new extended filesystem  (\/dev\/hda4)<br \/>\n5:  fdisk and create 2 logical partitions, one for \/test (example) and one for your old \/logs filesystem<br \/>\n6:  reboot<br \/>\n7:  mkfs -t ext3 (or ext2, reiser..whatever) \/dev\/hda5 and \/dev\/hda6<br \/>\n8:  mount \/dev\/hda5 \/test &#038;&#038; mount \/dev\/hda6 \/logs<br \/>\n9:  copy your logs from your pc\/server to the machine where you created the new filesystems<br \/>\n10:  EDIT \/etc\/fstab so that it&#8217;ll mount after a reboot.<\/p>\n<p>Just had to do this.  It works.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Okay, so sometimes you need a refresher on how to do something. Let&#8217;s say, for example, that you have some&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-183","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/www.theblane.com\/blog\/wp-json\/wp\/v2\/posts\/183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.theblane.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.theblane.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.theblane.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.theblane.com\/blog\/wp-json\/wp\/v2\/comments?post=183"}],"version-history":[{"count":1,"href":"http:\/\/www.theblane.com\/blog\/wp-json\/wp\/v2\/posts\/183\/revisions"}],"predecessor-version":[{"id":1301,"href":"http:\/\/www.theblane.com\/blog\/wp-json\/wp\/v2\/posts\/183\/revisions\/1301"}],"wp:attachment":[{"href":"http:\/\/www.theblane.com\/blog\/wp-json\/wp\/v2\/media?parent=183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.theblane.com\/blog\/wp-json\/wp\/v2\/categories?post=183"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.theblane.com\/blog\/wp-json\/wp\/v2\/tags?post=183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}