Extend root partition using growpart
Extend root partition xfs
PURPOSE: All documents are provided on this Blog just for educational purposes only. Please make sure that you run it in your test environment before to move on to production environment.
Now let's check on server side. Login to the server and execute following commands.
ls -l /dev/disk/by-path/
echo 1 > /sys/class/scsi_device/0\:0\:2\:0/device/rescan <<== put the correct scsi id
echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan
lsblk
growpart /dev/sda 2
lsblk
echo 1 > /sys/class/scsi_device/0\:0\:2\:0/device/rescan <<== put the correct scsi id
lsblk
growpart -h
fdisk -l /dev/sdc
growpart -h
fdisk -l /dev/sdc
growpart /dev/sdc 1 <<== you may don't need this line. It depends on the environment.
lsblk
xfs_growfs /data
df -hl
xfs_growfs /data
df -hl
Following steps are for the root Partition.
echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan
lsblk
growpart /dev/sda 2
lsblk
xfs_growfs /
Following steps are for extend the Multipath LUN.
# Current size is 1.5 TB
fdisk -l
Disk /dev/mapper/ORACLE_FASTRECOVERYAREA: 1572.9 GB, 1572864000000 bytes, 3072000000 sectors
# Add another 1.5 TB to the LUN-ID and use the following command to detect the new space
rescan-scsi-bus.sh -a -w -s
service multipathd restart
# Now we can see the another 1.5 TB assign to the LUN-ID
fdisk -l
Disk /dev/mapper/ORACLE_FASTRECOVERYAREA: 3145.7 GB, 3145728000000 bytes, 6144000000 sectors
# Now we need to increase xfs File System. Currently looks like as follow 1.5 TB
df -hl /fast_recovery_area
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ORACLE_FASTRECOVERYAREA 1.5T 981G 484G 67% /fast_recovery_area
# Using following command to increase the Filesystem
xfs_growfs /fast_recovery_area
# Now we can see the file system is increased
df -hl /fast_recovery_area
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ORACLE_FASTRECOVERYAREA 2.9T 981G 2.0T 34% /fast_recovery_area
Your comments are most valuable and it would help me to come up with better posts.