Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Add space to Red Hat directory

Posted on 2013-10-25
4
Medium Priority
?
504 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
[X]
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
  • 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 2000 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

Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

Question has a verified solution.

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

Introducing Priority Question, our latest feature.
Article by: Shawn
IT teams define success as solving problems quickly. To enable ITSM modernization we have to think of adopting the tools and methods that will enable resolution of ITSM issues more quickly.
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.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

618 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