{"id":8032,"date":"2026-01-14T14:11:54","date_gmt":"2026-01-14T11:11:54","guid":{"rendered":"https:\/\/sunucun.com.tr\/bilgi\/?post_type=dt_articles&#038;p=8032"},"modified":"2026-01-14T14:12:59","modified_gmt":"2026-01-14T11:12:59","slug":"how-to-do-centos-disk-expantion","status":"publish","type":"post","link":"https:\/\/sunucun.com.tr\/blog\/how-to-do-centos-disk-expantion\/","title":{"rendered":"How To Do Centos Disk Expansion"},"content":{"rendered":"<figure class=\"wp-block-image aligncenter size-medium is-resized\">\n  <img src=\"https:\/\/sunucun.com.tr\/blog\/wp-content\/uploads\/2026\/01\/text-how-to-do-centos-disk-expansion.jpg\" class=\"size-medium aligncenter\" style=\"width:100%;\" alt=\"Centos Disk Expansion involves extending a partition to utilize newly available unallocated space.\" title=\"Growing a server partition into new disk space.\" loading=\"lazy\" decoding=\"async\"><figcaption>\n    Centos Disk Expansion involves extending a partition to utilize newly available unallocated space.<br \/>\n  <\/figcaption><\/figure>\n<p>\nHow To Do Centos Disk Expansion<\/p>\n<p>Running low on disk space on your CentOS server is a common and often critical issue, especially when operating within a virtualized environment where resources can be dynamically managed. Fortunately, performing a <strong>Centos disk expansion<\/strong> on a virtual machine is a well-established procedure that does not have to be a daunting task. This comprehensive guide provides a detailed, step-by-step approach to help you safely and effectively increase your system&#8217;s storage capacity. By following these instructions carefully, you can expand your available disk space without risking data loss.<\/p>\n<p>Regardless of whether your <a href=\"https:\/\/sunucun.com.tr\/en\/\" data-internallinksmanager029f6b8e52c=\"97\" title=\"Sunucun data center and infrastructure solutions\">infrastructure<\/a> utilizes VMware, VirtualBox, KVM, or another hypervisor, the fundamental principles of this process remain consistent. The procedure always begins at the hypervisor level, where you first allocate more storage to the virtual disk. However, after you have provisioned this extra capacity, the crucial second phase involves instructing the CentOS operating system to recognize and incorporate this newly available, unallocated space into its existing filesystem. This guide focuses on that second phase, ensuring your server can actually use the space you&#8217;ve added.<\/p>\n<p><\/p>\n<figure class=\"wp-block-image aligncenter size-medium is-resized\">\n  <img src=\"https:\/\/sunucun.com.tr\/blog\/wp-content\/uploads\/2026\/01\/text2-how-to-do-centos-disk-expansion.jpg\" class=\"size-medium aligncenter\" style=\"width:100%;\" alt=\"Centos Disk Expansion requires careful management of virtual server resources and filesystem commands.\" title=\"Server Storage Capacity Increase Visualization\" loading=\"lazy\" decoding=\"async\"><figcaption>\n    Centos Disk Expansion requires careful management of <a href=\"https:\/\/sunucun.com.tr\/en\/vps-server\" data-internallinksmanager029f6b8e52c=\"154\" title=\"SSD-powered VPS server plans\">virtual server<\/a> resources and filesystem commands.<br \/>\n  <\/figcaption><\/figure>\n<p><\/p>\n<h2>Pre-Expansion Checklist: Ensuring Data Integrity<\/h2>\n<p>Before making any modifications to your server&#8217;s partition table or filesystems, it is absolutely essential to perform a few preparatory checks. This diligent approach is foundational to preventing data loss and upholds the golden rule of <a href=\"https:\/\/sunucun.com.tr\/en\/server-maintenance\" data-internallinksmanager029f6b8e52c=\"160\" title=\"Professional server maintenance services\">system administration<\/a>: &#8220;Safety First.&#8221; Rushing this process can lead to irreversible errors, so take the time to complete the following steps thoroughly.<\/p>\n<ul>\n<li><strong>Create a Backup or Snapshot:<\/strong> This is the most critical safeguard. Always begin by creating a full and verified backup of your data or, if using a virtual machine, taking a complete snapshot. This action provides a reliable recovery point, ensuring that you can restore your system to its previous state should any unforeseen issues arise during the disk expansion process.<\/li>\n<li><strong>Identify Your Target Disk and Partition:<\/strong> You must accurately pinpoint the specific disk and partition that you intend to expand. Linux systems use commands such as <code><a href=\"https:\/\/man7.org\/linux\/man-pages\/man8\/lsblk.8.html\" rel=\"follow noopener\" target=\"_blank\">lsblk<\/a><\/code> or <code>fdisk -l<\/code> to list block devices and their associated partitions. The output will help you identify the correct device names, which are typically listed as <code>\/dev\/sda1<\/code> or <code>\/dev\/vda2<\/code>. Incorrectly identifying the target could lead to modifying the wrong partition.<\/li>\n<li><strong>Check Your Filesystem Type:<\/strong> The specific command used to resize your filesystem depends entirely on its type. You must determine whether you are using <strong>XFS<\/strong>, which is the default for modern CentOS and RHEL systems, or the older but still common <strong>EXT4<\/strong>. You can easily verify this information by running the <code>lsblk -f<\/code> command, which displays filesystem information alongside the device names.<\/li>\n<\/ul>\n<h2>A Step-by-Step Guide for Centos Disk Expansion<\/h2>\n<p>With your preparatory checklist complete and a reliable backup or snapshot in place, you are now ready to proceed with the technical steps of expanding the partition and filesystem. Following these instructions precisely is key to ensuring a smooth and successful increase in your server&#8217;s storage capacity.<\/p>\n<h3>Step 1: Notifying the OS of New Disk Space<\/h3>\n<p>After you have increased the virtual disk&#8217;s size within your hypervisor&#8217;s settings, the guest CentOS operating system will not automatically detect this change. While a simple server reboot would force the kernel to recognize the new disk geometry, this approach involves downtime. A more efficient and professional method is to trigger a rescan of the SCSI device. This forces the OS to re-read the disk&#8217;s properties without requiring a restart, making the expanded capacity visible to the system. The exact rescan command can vary, but its objective is to update the OS&#8217;s awareness of the underlying storage device&#8217;s size.<\/p>\n<h3>Step 2: Extending Your Disk Partition<\/h3>\n<p>The next vital step is to modify the partition table to make the existing partition grow into the newly available unallocated space. For modern CentOS systems, the recommended and safest tool for this operation is <code>growpart<\/code>. This utility is significantly simpler and less error-prone than using a tool like <code>fdisk<\/code>, which would require manually deleting and then recreating the partition with a new, larger size\u2014a process that carries a higher risk of user error. To extend the first partition on the disk <code>\/dev\/sda<\/code>, you would execute a command like: <code>growpart \/dev\/sda 1<\/code>. Always remember to replace the device name and partition number with the specific values that correspond to your virtual machine&#8217;s configuration.<\/p>\n<h3>Step 3: Resizing the Filesystem<\/h3>\n<p>Finally, after extending the partition, you must instruct the filesystem itself to grow and occupy the newly expanded partition space. This is the stage where the filesystem type you identified earlier becomes critical, as the command is different for XFS and EXT4. It&#8217;s a crucial step because until the filesystem is resized, the extra space remains unusable by the operating system. For an XFS filesystem, which is the standard for recent CentOS releases, you must use a specific command designed to grow the filesystem online. You can find detailed technical guides on how to properly manage and expand an XFS filesystem in official vendor resources, such as the <a href=\"https:\/\/access.redhat.com\/documentation\/en-us\/red_hat_enterprise_linux\/8\/html\/managing_file_systems\/proc_growing-an-xfs-file-system_managing-file-systems\" target=\"_blank\" rel=\"noopener\">Red Hat Enterprise Linux documentation<\/a>. The command to use is <code>xfs_growfs \/path\/to\/mountpoint<\/code> (for example, <code>xfs_growfs \/<\/code> to expand the root filesystem). For older EXT4 filesystems, the corresponding command is <code>resize2fs \/dev\/your_partition<\/code> (e.g., <code>resize2fs \/dev\/sda1<\/code>). Once this command completes its execution, the process is finished. You can immediately confirm the result by running the <code>df -h<\/code> command. The output should now reflect the increased disk space, indicating that your CentOS disk expansion task was completed successfully and the new storage is available for use.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Centos Disk Expansion involves extending a partition to utilize newly available unallocated space. How To Do Centos Disk Expansion Running low on disk space on your CentOS server is a common and often critical issue, especially when operating within a virtualized environment where resources can be dynamically managed. Fortunately, performing a Centos disk expansion on&hellip;<\/p>\n","protected":false},"author":1,"featured_media":18419,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1522,1471],"tags":[],"class_list":["post-8032","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-isletim-sistemleri","category-centos"],"_links":{"self":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts\/8032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/comments?post=8032"}],"version-history":[{"count":5,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts\/8032\/revisions"}],"predecessor-version":[{"id":18422,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/posts\/8032\/revisions\/18422"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/media\/18419"}],"wp:attachment":[{"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/media?parent=8032"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/categories?post=8032"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunucun.com.tr\/blog\/wp-json\/wp\/v2\/tags?post=8032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}