how to increase space in linux production server

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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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?
D_wathiAuthor Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
D_wathiAuthor Commented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.