how to increase space in linux production server

D_wathi used Ask the Experts™
Dear Experts:

We are running crm on redhat enterprise Linux with LVM partitions now that var partition is filled I would like to shrink /opt and increase /var as crm is in /var.

Also this server is in VMware snapshot once taken and this should be deleted.

Please suggest , first should I have delete the snap shot and then do the LVM extension for /var.

attached log of disk layout and lvm output

please suggest, thanks in advance.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
if you need to change the virtual disk size (e.g. the vmdk), you must FIRST, delete the snapshot, before any changes to the virtual disk (vmdk) can be done.
What Linux distro is this?


linux distro redhat enterprise linux
If you are merely migrating space from one LV to another, I suggest keeping the snapshot, steps I typically use -

1. Snapshot the vm.
2. Shrink the file system and the LV:
fsck -f /lvm-path
resize2fs -p /lvm-path 'shrinked_size'
lvreduce -vL 'shrinked_size' /lvm-path

Open in new window

3. Extend the LV and the file system:
lvextend -vl +100%FREE /target_lvm-path
resize2fs -p /target_lvm-path

Open in new window


Thanks for the reply.

Disk provisioned size: 165 GB thin provision #  for the VM when checked from Vcenter

Actual operating system :
# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2        82G   76G  1.6G  98% /
udev            1.9G   88K  1.9G   1% /dev
tmpfs           1.9G  932K  1.9G   1% /dev/shm

#fdisk -l /dev/sda

Disk /dev/sda: 177.2 GB, 177167400960 bytes
255 heads, 63 sectors/track, 21539 cylinders, total 346030080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00002a1b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63     4209029     2104483+  82  Linux swap / Solaris
/dev/sda2   *     4209030   178257239    87024105   83  Linux

since the server is suse enterprise linux 11 with SP3
it is not LVM

Please suggest the step by step to increase the space as actual used is 82 GB would like to make use of rest. does it require to boot from single user, please suggest step by step.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial