No space in volume group. How to create a file system using existing logical volume

Hello Guys,

I want to create a file system dedicated for an application installation. But there is no space in volume group to create a new logical volume. There is enough space in other logical volume which is being mounted on /var.

I know we can use that logical volume and create a virtual file system. Unfortunately I couldn't recollect the procedure.

Scenario:
/dev/vg00/lvvar is mounted on /var

I want to use the same logical volume lvvar to create another file system /patrol without dismounting /var. Please let me know the complete procedure..

Thanks in advance :slight_smile:

You can not have 2 FS on 1 LV.
With LVM2 you can shrink a LV with the commands lvreduce or lvresize .
You will have to unmount the LV though.
After shrinking the existing, you will need to make room on the VG and create a second LV and FS.

Here are the schematics of LVM components:
https://www.redhat.com/magazine/009jul05/features/lvm2/

https://access.redhat.com/documentation/en-US/Red\_Hat\_Enterprise\_Linux/6/html/Logical\_Volume\_Manager_Administration/

I googled an easy HowTo for you:
Reducing a logical volume

Thanks for the reply.

I got the answer. Actually I need a file system to be created with a specific name to execute application level scripts. I don't have enough space in vgs to create a new file system. So I created the directory I wanted under / and linked it to the other folder in /var file system. So virtually I have created a file system. But in reality, Files will be placed under /var folder.

1 Like