Solved

Add space to Red Hat directory

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
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…
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…

813 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

17 Experts available now in Live!

Get 1:1 Help Now