How to more space to a folder

Latest response

Currently under /dev/mapper/rhel-home i have 92 Gigs free space. Please see the below output.

[admin@localhost ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 50G 3.8G 47G 8% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 444K 3.9G 1% /dev/shm
tmpfs 3.9G 9.0M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/rhel-home 92G 78M 92G 1% /home
/dev/sda1 497M 124M 373M 25% /boot
[admin@localhost ~]$

As a part of a software installation one of application will ask for around 60 gigs of free space under the folder "/etc/arcsight". The Folder "arcsight" under /etc will e created while we installing the application.

Now, i want to assign 60 GB space from /dev/mapper/rhel-home to /etc/arcsight. Can some one tell me how to do it.

Please let me know the commands also. Since, i don't linux OS those commands will be helpfull for me.

Thanks,
Vishnu.

Responses

First step is to confirm that you are running LVM by using the following command as root

vgdisplay

This will tell you if there is any available/unallocated disk which you can allocate to the logical volume (if LVM is enabled).

If there isn't any available the basic process is (as long as you have ext4 which can shrink.. if you are using xfs it's going to be a longer process)

1. shrink /dev/mapper/rhel-home filesystem
2. shrink /dev/mapper/rhel-home logical volume
3. Allocate available space in volume group to /dev/mapper/rhel-root logical volume
4. Grow filesystem on /dev/mapper/rhel-root logical volume

That aside, I have to ask the question of why you are installing 60G of application data in /etc.

Hello, I got the below output when i ran the command vgdisplay. So, i believe LVM is enabled. and i have a question over here. I am little bit confused about shrink command . Can you explain that command using "/dev/mapper/rhel-home" and "/etc/archsight".

My confusion was, which is filesystem and which is logical volume. Thanks in advance.

[root@localhost ~]# vgdisplay --- Volume group --- VG Name rhel System ID
Format lvm2 Metadata Areas 1 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 3 Max PV 0 Cur PV 1 Act PV 1 VG Size 149.51 GiB PE Size 4.00 MiB Total PE 38274 Alloc PE / Size 38258 / 149.45 GiB Free PE / Size 16 / 64.00 MiB VG UUID 7NX4rG-nYQB-AzSG-EVgW-Ae91-Hq9h-uj7Ll0

deleted, see PixelDrift's comments above - he covers it.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.