Solved

Add space to Red Hat directory

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

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux boot cd to do hardware report on PC? 3 97
php56-php-mcrypt for rhel7 php56 1 158
Server 2008 Not services listed 23 73
Windows 10 linux VM 30 90
Are client relationship the only driver of a successful MSP? While important, client relationships are only one component. Learn how else MSPs can broaden their horizon and differentiate themselves.
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

738 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