{"id":8,"date":"2007-05-10T16:51:29","date_gmt":"2007-05-10T23:51:29","guid":{"rendered":"http:\/\/www.kernelcrash.com\/blog\/2007\/05\/10\/ext3-online-resize\/"},"modified":"2007-05-31T19:46:29","modified_gmt":"2007-06-01T02:46:29","slug":"ext3-online-resize","status":"publish","type":"post","link":"https:\/\/www.kernelcrash.com\/blog\/ext3-online-resize\/2007\/05\/10\/","title":{"rendered":"ext3 online resize"},"content":{"rendered":"<p>Having used Debian Sarge for a while, and just using the default versions of e2fsprogs, I got used to unmounting logical volumes in order to resize them. However, now that I&#8217;ve upgraded to Etch, I can now finally do online resizing (yeah, yeah, I know I could have compiled the newer e2fsprogs for sarge &#8230;). If you have a system full of logical volumes, online resizing does make life a lot easier. The main problem I&#8217;ve discovered is that all the existing ext3 filesystems I&#8217;ve created refuse to do online resizing, and only new ones can be resized.<\/p>\n<p>Apparently there is a relatively new &#8216;resize_inode&#8217; feature in ext3. tune2fs won&#8217;t let me add this feature in, so at the moment I&#8217;m left with either offline resizing or to copy my data into new filesystems. I&#8217;m opting for the latter , which is time consuming and does rely on having enough spare disk space to do it.<\/p>\n<p>Anyway, a typical resize is as simple as:<\/p>\n<p>lvextend -l +10 \/dev\/myvg\/lvone<\/p>\n<p>resize2fs \/dev\/myvg\/lvone<br \/>\n(I&#8217;m using 2GB extents so adding 10 extents means 20GB)<\/p>\n<p>If you don&#8217;t have much experience with managing a system with logical volumes, one important thing to consider is to start out with smallish logical volumes and grow them as required. Just because you have a lot of disk space, doesn&#8217;t mean you need to preallocate it. To me the key advantage of logical volume systems is that you don&#8217;t have to get your disk space allocations correct first time.  Just create logical volumes that are a bit bigger than what you need, and then as data grows use online resizing. Sure, many filesystems are meant to have degraded performance when they hit 90% full. If you think that&#8217;s the case, then factor that in when you work out how big you want each logical volume.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having used Debian Sarge for a while, and just using the default versions of e2fsprogs, I got used to unmounting logical volumes in order to resize them. However, now that I&#8217;ve upgraded to Etch, I can now finally do online resizing (yeah, yeah, I know I could have compiled the newer e2fsprogs for sarge &#8230;). [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":0,"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}