Problem description:
Default Cloudcache data disk which 1 TB is full i.e 100%, or a larger deployment size is needed.
Filesystem: /dev/mapper/vg1-vol1 Mounted on : /mnt/data Use%: 100%
Cause
Cloudcache store size is full
Resolution
When you need to increase the size of an existing disk in a Linux environment, follow these steps:
Increase Disk Size in VMware
Navigate to the settings of your virtual machine in VMware.
Increase the size of the desired disk. For example, extend the disk to 400 GB.
Connect to the Linux Server
Use a terminal client like PuTTY to log in to the Linux server.
Verify Current Disk Size and Structure
Run the following commands to check disk usage and structure:
df -h
: Displays disk usage and mounted partitions.
fdisk -l
: Lists all available disks and partitions.Example output:
#df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 20G 10G 10G 50% /
# fdisk -l
Disk /dev/sda: 40 GB, 40000000000 bytes
Resize the Physical Volume
Use the pvresize command to resize the physical volume so the system recognizes the increased size:
pvresize /dev/sdb
Replace
/dev/sdb
with the correct disk name identified in step 3.
Extend the Logical Volume Group (VG)
Resize the Filesystem
Expand the filesystem to utilize the new space:
For ext4 or similar filesystems:
resize2fs /dev/mapper/vg1-vol1
For XFS:
xfs_growfs /dev/mapper/vg1-vol1
Verify the New Size
Check the updated size:
df -h
Adding an Additional Disk in Linux
Adding a new disk to your system involves initializing the disk and incorporating it into your volume group.
Shutdown the Virtual Machine
Power off the virtual machine before adding the new disk.
Attach a New Volume in VMware
Add a new virtual disk to the machine with the desired size (e.g., 400 GB).
Power on the Virtual Machine
Start the virtual machine and log in via SSH.
Identify the New Disk
Run the following command to identify the newly added disk:
fdisk -l | grep -i /dev/sd
Example output:
Disk /dev/sdc: 400 GB, 400000000000 bytes
Here,
/dev/sdc
is the new disk.
Initialize the New Disk as a Physical Volume
Format the new disk for use with LVM:
pvcreate /dev/sdc
Extend the Volume Group
Add the new physical volume to your existing volume group:
vgextend vg1 /dev/sdc
Extend the Logical Volume
Verify the New Size
Check the updated volume and filesystem size:
df -h vgs
Example for Adding a 400 GB Disk
For a scenario where you’ve added a 400 GB disk (/dev/sdc
):