Posts

Showing posts with the label xfs_growfs

Extending root partition size online in RHEL or CentOS 7

Why do we need to extend root partition size? There are couple of reasons that root filesystem should always be having free space, else: 1. Without free space programs and OS can crash. 2. No new services or application can be started on the server. 3. Can't write anymore data resulting DU Hence admin will be left with two options either remove unnecessary files and free up some space or extend root partition size online i.e. without impacting running application or downtime. Below detailed steps will help you to extend your root partition space online: Step 1. Check current root partition size: # df -kh Filesystem               Size  Used Avail Use% Mounted on /dev/mapper/centos-root   46G  6.1G   40G  14% / Here root partition is of "46GB". Step 2. Add a new disk and re-scan HBA's to discover it: # fdisk -l Disk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512