{"id":8709,"date":"2016-08-05T12:43:00","date_gmt":"2016-08-05T10:43:00","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/"},"modified":"2016-08-05T12:43:00","modified_gmt":"2016-08-05T10:43:00","slug":"how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/","title":{"rendered":"How to do a Filesystem Resize (ext3\/ext4) on Redhat running on VMware"},"content":{"rendered":"<h2>By William Sescu<\/h2>\n<p>A filesystem resize can be done in several ways, online, offline, with LVM2 or without LVM2. \u00a0However, this blog will describe how to do an online resize of ext3\/ext4 filesystems where a virtual disk (vmdk) is online added to a VMware Redhat guest OS.<\/p>\n<p>So let\u2019s start with the online filesystem resize of ext3\/4 filesystems on the Redhat guest OS. \u00a0A new virutal disk (preferably an eagerd zero thick on VM running Oracle) was added as a pre requirement. Adding a new virtual disk is an online operation and no downtime is required to do it.<\/p>\n<p>The whole procedure in this document is described by using the command line only.\u00a0There is also a graphical user interface `system-config-lvm` that can perform the job, but that tool is out of scope in this document.<\/p>\n<h3>Online resize a ext3\/4 filesystem<\/h3>\n<p>There are several steps that have to be done. These are in general:<\/p>\n<ol>\n<li>Scanning for new LUN\u2019s<\/li>\n<li>Partition the new LUN\u2019s and partprobe<\/li>\n<li>Create the physical volume<\/li>\n<li>Extend the volume group and the logical volume<\/li>\n<li>Extend the filesystem online<\/li>\n<\/ol>\n<h4>Rescan for new LUN&#8217;s<\/h4>\n<p>Depending on the number of virtual controllers, you have to scan for your new LUN&#8217;s on each of these. In case you know on which the disk was added, then of course, you need to scan only the appropriate one.<\/p>\n<h4>Rescan for new LUN&#8217;s on the first SCSI Controller (LSI Logic Parallel)<\/h4>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\"># echo \"- - -\"  &gt; \/sys\/class\/scsi_host\/host0\/scan*<\/pre>\n<h4>Rescan for new LUN&#8217;s on the second SCSI Controller (Paravirtualized)<\/h4>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\"># echo \"- - -\"  &gt; \/sys\/class\/scsi_host\/host1\/scan*<\/pre>\n<h4>Create a Primary Partion on the new devices<\/h4>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\"># fdisk \/dev\/sdx??\n\n# fdisk \/dev\/sdy??<\/pre>\n<h4>Partprobe the new devices<\/h4>\n<p>Partprobe is a program that informs the operating system kernel of partition table changes, by requesting that the operating system re-read the partition table.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\"># partprobe \/dev\/sdx??\n\n# partprobe \/dev\/sdy??<\/pre>\n<h4>Create the Pysical Volumes<\/h4>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\"># pvcreate \/dev\/sdx??\n\nPhysical volume \"\/dev\/sdx??\" successfully created<\/pre>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\"># pvcreate \/dev\/sdy??\n\nPhysical volume \"\/dev\/sdy??\" successfully created<\/pre>\n<h4>Extend the Volume Group<\/h4>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\"># vgextend VGOracle \/dev\/sdx??\n\nVolume group \"VGOracle\" successfully extended<\/pre>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\"># vgextend VGOracle \/dev\/sdy??\n\nVolume group \"VGOracle\" successfully extended<\/pre>\n<h4>Extend the Logical Volume<\/h4>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\"># lvextend -L 72G \/dev\/VGOracle\/LVOracleu??\n\nExtending logical volume LVOracleu?? to 72.00 GB\n\nLogical volume LVOracleu01 successfully resized<\/pre>\n<h4>Online Resize the ext3\/ext4 Filesystem<\/h4>\n<p>After the logical volume is resized successfully, you can resize, in fact any filesystem that is online re-sizable. The following are examples for the ext3\/ext4 filesystems. The syntax for ext3 and ext4 differ only slightly. For ext3 you use `resize2fs` even if its ext3 and not ext2, and in case of ext4 you use `resize4fs` were the command name is more logically.<\/p>\n<h4>ext3<\/h4>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\"># resize2fs \/dev\/VGOracle\/LVOracleu??<\/pre>\n<h4>ext4<\/h4>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\"># resize4fs \/dev\/VGOracle\/LVOracleu??<\/pre>\n<p>&nbsp;<\/p>\n<p>That&#8217;s it. Now have fun with the bigger filesystem.<\/p>\n<p>Cheers,<\/p>\n<p>William<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By William Sescu A filesystem resize can be done in several ways, online, offline, with LVM2 or without LVM2. \u00a0However, this blog will describe how to do an online resize of ext3\/ext4 filesystems where a virtual disk (vmdk) is online added to a VMware Redhat guest OS. So let\u2019s start with the online filesystem resize [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,42],"tags":[73,266],"type_dbi":[],"class_list":["post-8709","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-operating-systems","tag-linux","tag-vmware"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to do a Filesystem Resize (ext3\/ext4) on Redhat running on VMware - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to do a Filesystem Resize (ext3\/ext4) on Redhat running on VMware\" \/>\n<meta property=\"og:description\" content=\"By William Sescu A filesystem resize can be done in several ways, online, offline, with LVM2 or without LVM2. \u00a0However, this blog will describe how to do an online resize of ext3\/ext4 filesystems where a virtual disk (vmdk) is online added to a VMware Redhat guest OS. So let\u2019s start with the online filesystem resize [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-05T10:43:00+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"How to do a Filesystem Resize (ext3\/ext4) on Redhat running on VMware\",\"datePublished\":\"2016-08-05T10:43:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/\"},\"wordCount\":402,\"commentCount\":0,\"keywords\":[\"Linux\",\"VMware\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Operating systems\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/\",\"name\":\"How to do a Filesystem Resize (ext3\/ext4) on Redhat running on VMware - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2016-08-05T10:43:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to do a Filesystem Resize (ext3\/ext4) on Redhat running on VMware\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to do a Filesystem Resize (ext3\/ext4) on Redhat running on VMware - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/","og_locale":"en_US","og_type":"article","og_title":"How to do a Filesystem Resize (ext3\/ext4) on Redhat running on VMware","og_description":"By William Sescu A filesystem resize can be done in several ways, online, offline, with LVM2 or without LVM2. \u00a0However, this blog will describe how to do an online resize of ext3\/ext4 filesystems where a virtual disk (vmdk) is online added to a VMware Redhat guest OS. So let\u2019s start with the online filesystem resize [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/","og_site_name":"dbi Blog","article_published_time":"2016-08-05T10:43:00+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"How to do a Filesystem Resize (ext3\/ext4) on Redhat running on VMware","datePublished":"2016-08-05T10:43:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/"},"wordCount":402,"commentCount":0,"keywords":["Linux","VMware"],"articleSection":["Database Administration &amp; Monitoring","Operating systems"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/","url":"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/","name":"How to do a Filesystem Resize (ext3\/ext4) on Redhat running on VMware - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2016-08-05T10:43:00+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/how-to-do-a-filesystem-resize-ext3ext4-on-redhat-running-on-vmware\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to do a Filesystem Resize (ext3\/ext4) on Redhat running on VMware"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/8709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=8709"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/8709\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=8709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=8709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=8709"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=8709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}