Solved

Add space to Red Hat directory

Posted on 2013-10-25
4
478 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This is a based on my experience in IT role and also my role before that, a builder. These 1st contact rules have helped me and more importantly help past, present and hopefully future client/people I get to work/assist. Via Telephone: 1.      Answ…
Not many admins are aware that GPOs can be activated and deactivated time-based. Time to change that :)
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now