Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Add space to Red Hat directory

Posted on 2013-10-25
4
484 Views
Last Modified: 2013-10-25
Greetings,
Below are the results of running df -h on our red hat server.

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/rootvg-rootvol
                      4.0G  3.5G  310M  92% /
tmpfs                  16G     0   16G   0% /dev/shm
/dev/sda1             194M   73M  111M  40% /boot
/dev/mapper/rootvg-homevol
                      2.0G  1.2G  694M  64% /home
/dev/mapper/rootvg-tmpvol
                      4.5G   18M  4.2G   1% /tmp
/dev/mapper/rootvg-varvol
                       22G  3.8G   17G  19% /var
/dev/mapper/rootvg-datavol
                       16G  2.9G   13G  19% /data
/dev/mapper/rootvg-sqlvol
                      142G  135G     0 100% /var/lib/mysql
/dev/mapper/rootvg-logvol
                       16G  248M   15G   2% /var/log

How do I add more space to the /var/lib/mysql (its at 100%) using lvm? Thank you.
0
Comment
Question by:centem
  • 2
  • 2
4 Comments
 
LVL 13

Expert Comment

by:Daniel Helgenberger
ID: 39601084
Please have a look at:
vgdisplay
witch shows you available space in the Volume Group. Is there anything left?
0
 

Author Comment

by:centem
ID: 39601098
These are the results of that command.

  --- Volume group ---
  VG Name               rootvg
  System ID
  Format                lvm2
  Metadata Areas        3
  Metadata Sequence No  14
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                8
  Open LV               8
  Max PV                0
  Cur PV                3
  Act PV                3
  VG Size               607.72 GiB
  PE Size               32.00 MiB
  Total PE              19447
  Alloc PE / Size       6704 / 209.50 GiB
  Free  PE / Size       12743 / 398.22 GiB
0
 
LVL 13

Accepted Solution

by:
Daniel Helgenberger earned 500 total points
ID: 39601156
Ok, you can add up to about 400GiB to your LV. For sake of example I add 100GiB, change this to your needs.
All this can be done on a running system. Also, I assume you have an EXT filesystem on the volume sqlvol? Please make sure with mount; if not then do not run resize2fs!
$ lvextend -L +100G /dev/mapper/rootvg-sqlvol
$ resize2fs /dev/mapper/rootvg-sqlvol
$ df -h /dev/mapper/rootvg-sqlvol

Open in new window

resize2fs will claim all available space on the LV.

If you need to add more space, then you would first need to add a new PV the your rootvg; in general this means some downtime.
0
 

Author Closing Comment

by:centem
ID: 39601200
Great explanation. Worked! Thanks.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Learn how ViaSat reduced average response times for IT incidents from 10 minutes to 30 seconds.
Why pager replacement is still an issue OnPage has what some might call a “hate/hate” relationship with pagers. Not much room for love. As we see it, pagers are an antiquated bit of technology. Pagers are dinosaurs which, like most dinosaurs, sho…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question